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

Function entInviteToBiz

app/controlplane/pkg/data/orginvitation.go:157–180  ·  view source on GitHub ↗
(i *ent.OrgInvitation)

Source from the content-addressed store, hash-verified

155}
156
157func entInviteToBiz(i *ent.OrgInvitation) *biz.OrgInvitation {
158 if i == nil {
159 return nil
160 }
161
162 res := &biz.OrgInvitation{
163 ID: i.ID,
164 ReceiverEmail: i.ReceiverEmail,
165 CreatedAt: toTimePtr(i.CreatedAt),
166 Status: i.Status,
167 Role: i.Role,
168 Context: &i.Context,
169 }
170
171 if i.Edges.Organization != nil {
172 res.Org = entOrgToBizOrg(i.Edges.Organization)
173 }
174
175 if i.Edges.Sender != nil {
176 res.Sender = entUserToBizUser(i.Edges.Sender)
177 }
178
179 return res
180}

Callers 6

PendingInvitationMethod · 0.85
PendingInvitationsMethod · 0.85
FindByIDMethod · 0.85
ListByOrgMethod · 0.85

Calls 3

entOrgToBizOrgFunction · 0.85
entUserToBizUserFunction · 0.85
toTimePtrFunction · 0.70

Tested by

no test coverage detected