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

Method mutate

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

Source from the content-addressed store, hash-verified

533}
534
535func (c *APITokenClient) mutate(ctx context.Context, m *APITokenMutation) (Value, error) {
536 switch m.Op() {
537 case OpCreate:
538 return (&APITokenCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
539 case OpUpdate:
540 return (&APITokenUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
541 case OpUpdateOne:
542 return (&APITokenUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
543 case OpDelete, OpDeleteOne:
544 return (&APITokenDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx)
545 default:
546 return nil, fmt.Errorf("ent: unknown APIToken mutation op: %q", m.Op())
547 }
548}
549
550// AttestationClient is a client for the Attestation schema.
551type AttestationClient 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