| 1885 | } |
| 1886 | |
| 1887 | func (c *MembershipClient) mutate(ctx context.Context, m *MembershipMutation) (Value, error) { |
| 1888 | switch m.Op() { |
| 1889 | case OpCreate: |
| 1890 | return (&MembershipCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) |
| 1891 | case OpUpdate: |
| 1892 | return (&MembershipUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) |
| 1893 | case OpUpdateOne: |
| 1894 | return (&MembershipUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) |
| 1895 | case OpDelete, OpDeleteOne: |
| 1896 | return (&MembershipDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) |
| 1897 | default: |
| 1898 | return nil, fmt.Errorf("ent: unknown Membership mutation op: %q", m.Op()) |
| 1899 | } |
| 1900 | } |
| 1901 | |
| 1902 | // OrgInvitationClient is a client for the OrgInvitation schema. |
| 1903 | type OrgInvitationClient struct { |