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

Method mutate

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

Source from the content-addressed store, hash-verified

1523}
1524
1525func (c *IntegrationClient) mutate(ctx context.Context, m *IntegrationMutation) (Value, error) {
1526 switch m.Op() {
1527 case OpCreate:
1528 return (&IntegrationCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
1529 case OpUpdate:
1530 return (&IntegrationUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
1531 case OpUpdateOne:
1532 return (&IntegrationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
1533 case OpDelete, OpDeleteOne:
1534 return (&IntegrationDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx)
1535 default:
1536 return nil, fmt.Errorf("ent: unknown Integration mutation op: %q", m.Op())
1537 }
1538}
1539
1540// IntegrationAttachmentClient is a client for the IntegrationAttachment schema.
1541type IntegrationAttachmentClient 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