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

Function withOrgInvitationID

app/controlplane/pkg/data/ent/mutation.go:8168–8187  ·  view source on GitHub ↗

withOrgInvitationID sets the ID field of the mutation.

(id uuid.UUID)

Source from the content-addressed store, hash-verified

8166
8167// withOrgInvitationID sets the ID field of the mutation.
8168func withOrgInvitationID(id uuid.UUID) orginvitationOption {
8169 return func(m *OrgInvitationMutation) {
8170 var (
8171 err error
8172 once sync.Once
8173 value *OrgInvitation
8174 )
8175 m.oldValue = func(ctx context.Context) (*OrgInvitation, error) {
8176 once.Do(func() {
8177 if m.done {
8178 err = errors.New("querying old values post mutation is not allowed")
8179 } else {
8180 value, err = m.Client().OrgInvitation.Get(ctx, id)
8181 }
8182 })
8183 return value, err
8184 }
8185 m.id = &id
8186 }
8187}
8188
8189// withOrgInvitation sets the old OrgInvitation of the mutation.
8190func withOrgInvitation(node *OrgInvitation) orginvitationOption {

Callers 1

UpdateOneIDMethod · 0.85

Calls 3

DoMethod · 0.80
GetMethod · 0.65
ClientMethod · 0.45

Tested by

no test coverage detected