MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / pbMembershipItemToAction

Function pbMembershipItemToAction

app/cli/pkg/action/membership_list.go:163–177  ·  view source on GitHub ↗
(in *pb.OrgMembershipItem)

Source from the content-addressed store, hash-verified

161}
162
163func pbMembershipItemToAction(in *pb.OrgMembershipItem) *MembershipItem {
164 if in == nil {
165 return nil
166 }
167
168 return &MembershipItem{
169 ID: in.GetId(),
170 CreatedAt: toTimePtr(in.GetCreatedAt().AsTime()),
171 UpdatedAt: toTimePtr(in.GetCreatedAt().AsTime()),
172 Org: pbOrgItemToAction(in.Org),
173 Default: in.Current,
174 Role: pbRoleToString(in.Role),
175 User: pbUserItemToAction(in.User),
176 }
177}
178
179type Role string
180

Callers 5

ChangeRoleMethod · 0.85
ListOrgsMethod · 0.85
ListMembersMethod · 0.85
RunMethod · 0.85
RunMethod · 0.85

Calls 6

pbOrgItemToActionFunction · 0.85
pbRoleToStringFunction · 0.85
pbUserItemToActionFunction · 0.85
toTimePtrFunction · 0.70
GetIdMethod · 0.45
GetCreatedAtMethod · 0.45

Tested by

no test coverage detected