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

Function withGroupMembershipID

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

withGroupMembershipID sets the ID field of the mutation.

(id uuid.UUID)

Source from the content-addressed store, hash-verified

4805
4806// withGroupMembershipID sets the ID field of the mutation.
4807func withGroupMembershipID(id uuid.UUID) groupmembershipOption {
4808 return func(m *GroupMembershipMutation) {
4809 var (
4810 err error
4811 once sync.Once
4812 value *GroupMembership
4813 )
4814 m.oldValue = func(ctx context.Context) (*GroupMembership, error) {
4815 once.Do(func() {
4816 if m.done {
4817 err = errors.New("querying old values post mutation is not allowed")
4818 } else {
4819 value, err = m.Client().GroupMembership.Get(ctx, id)
4820 }
4821 })
4822 return value, err
4823 }
4824 m.id = &id
4825 }
4826}
4827
4828// withGroupMembership sets the old GroupMembership of the mutation.
4829func withGroupMembership(node *GroupMembership) groupmembershipOption {

Callers 1

UpdateOneIDMethod · 0.85

Calls 3

DoMethod · 0.80
GetMethod · 0.65
ClientMethod · 0.45

Tested by

no test coverage detected