MCPcopy
hub / github.com/crowdsecurity/crowdsec / withLock

Function withLock

pkg/database/ent/mutation.go:8422–8429  ·  view source on GitHub ↗

withLock sets the old Lock of the mutation.

(node *Lock)

Source from the content-addressed store, hash-verified

8420
8421// withLock sets the old Lock of the mutation.
8422func withLock(node *Lock) lockOption {
8423 return func(m *LockMutation) {
8424 m.oldValue = func(context.Context) (*Lock, error) {
8425 return node, nil
8426 }
8427 m.id = &node.ID
8428 }
8429}
8430
8431// Client returns a new `ent.Client` from the mutation. If the mutation was
8432// 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…