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

Method mutate

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

Source from the content-addressed store, hash-verified

847}
848
849func (c *CASBackendClient) mutate(ctx context.Context, m *CASBackendMutation) (Value, error) {
850 switch m.Op() {
851 case OpCreate:
852 return (&CASBackendCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
853 case OpUpdate:
854 return (&CASBackendUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
855 case OpUpdateOne:
856 return (&CASBackendUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
857 case OpDelete, OpDeleteOne:
858 return (&CASBackendDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx)
859 default:
860 return nil, fmt.Errorf("ent: unknown CASBackend mutation op: %q", m.Op())
861 }
862}
863
864// CASMappingClient is a client for the CASMapping schema.
865type CASMappingClient 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