newAPITokenMutation creates new mutation for the APIToken entity.
(c config, op Op, opts ...apitokenOption)
| 104 | |
| 105 | // newAPITokenMutation creates new mutation for the APIToken entity. |
| 106 | func newAPITokenMutation(c config, op Op, opts ...apitokenOption) *APITokenMutation { |
| 107 | m := &APITokenMutation{ |
| 108 | config: c, |
| 109 | op: op, |
| 110 | typ: TypeAPIToken, |
| 111 | clearedFields: make(map[string]struct{}), |
| 112 | } |
| 113 | for _, opt := range opts { |
| 114 | opt(m) |
| 115 | } |
| 116 | return m |
| 117 | } |
| 118 | |
| 119 | // withAPITokenID sets the ID field of the mutation. |
| 120 | func withAPITokenID(id uuid.UUID) apitokenOption { |
no outgoing calls
no test coverage detected