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

Method mutate

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

Source from the content-addressed store, hash-verified

3168}
3169
3170func (c *UserClient) mutate(ctx context.Context, m *UserMutation) (Value, error) {
3171 switch m.Op() {
3172 case OpCreate:
3173 return (&UserCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
3174 case OpUpdate:
3175 return (&UserUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
3176 case OpUpdateOne:
3177 return (&UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
3178 case OpDelete, OpDeleteOne:
3179 return (&UserDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx)
3180 default:
3181 return nil, fmt.Errorf("ent: unknown User mutation op: %q", m.Op())
3182 }
3183}
3184
3185// WorkflowClient is a client for the Workflow schema.
3186type WorkflowClient struct {

Callers 2

TestCredentials_ValidateFunction · 0.45
MutateMethod · 0.45

Calls 4

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

Tested by 1

TestCredentials_ValidateFunction · 0.36