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

Function withAPIToken

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

withAPIToken sets the old APIToken of the mutation.

(node *APIToken)

Source from the content-addressed store, hash-verified

140
141// withAPIToken sets the old APIToken of the mutation.
142func withAPIToken(node *APIToken) apitokenOption {
143 return func(m *APITokenMutation) {
144 m.oldValue = func(context.Context) (*APIToken, error) {
145 return node, nil
146 }
147 m.id = &node.ID
148 }
149}
150
151// Client returns a new `ent.Client` from the mutation. If the mutation was
152// executed in a transaction (ent.Tx), a transactional client is returned.

Callers 1

UpdateOneMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected