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

Method mutate

app/controlplane/pkg/data/ent/client.go:1887–1900  ·  view source on GitHub ↗
(ctx context.Context, m *MembershipMutation)

Source from the content-addressed store, hash-verified

1885}
1886
1887func (c *MembershipClient) mutate(ctx context.Context, m *MembershipMutation) (Value, error) {
1888 switch m.Op() {
1889 case OpCreate:
1890 return (&MembershipCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
1891 case OpUpdate:
1892 return (&MembershipUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
1893 case OpUpdateOne:
1894 return (&MembershipUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
1895 case OpDelete, OpDeleteOne:
1896 return (&MembershipDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx)
1897 default:
1898 return nil, fmt.Errorf("ent: unknown Membership mutation op: %q", m.Op())
1899 }
1900}
1901
1902// OrgInvitationClient is a client for the OrgInvitation schema.
1903type OrgInvitationClient struct {

Callers

nothing calls this directly

Calls 4

HooksMethod · 0.95
SaveMethod · 0.65
ExecMethod · 0.65
OpMethod · 0.45

Tested by

no test coverage detected