| 682 | } |
| 683 | |
| 684 | func (c *AttestationClient) mutate(ctx context.Context, m *AttestationMutation) (Value, error) { |
| 685 | switch m.Op() { |
| 686 | case OpCreate: |
| 687 | return (&AttestationCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) |
| 688 | case OpUpdate: |
| 689 | return (&AttestationUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) |
| 690 | case OpUpdateOne: |
| 691 | return (&AttestationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) |
| 692 | case OpDelete, OpDeleteOne: |
| 693 | return (&AttestationDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) |
| 694 | default: |
| 695 | return nil, fmt.Errorf("ent: unknown Attestation mutation op: %q", m.Op()) |
| 696 | } |
| 697 | } |
| 698 | |
| 699 | // CASBackendClient is a client for the CASBackend schema. |
| 700 | type CASBackendClient struct { |