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

Function newAPITokenMutation

app/controlplane/pkg/data/ent/mutation.go:106–117  ·  view source on GitHub ↗

newAPITokenMutation creates new mutation for the APIToken entity.

(c config, op Op, opts ...apitokenOption)

Source from the content-addressed store, hash-verified

104
105// newAPITokenMutation creates new mutation for the APIToken entity.
106func 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.
120func withAPITokenID(id uuid.UUID) apitokenOption {

Callers 5

CreateMethod · 0.85
UpdateMethod · 0.85
UpdateOneMethod · 0.85
UpdateOneIDMethod · 0.85
DeleteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected