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

Function newLockMutation

pkg/database/ent/mutation.go:8386–8397  ·  view source on GitHub ↗

newLockMutation creates new mutation for the Lock entity.

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

Source from the content-addressed store, hash-verified

8384
8385// newLockMutation creates new mutation for the Lock entity.
8386func newLockMutation(c config, op Op, opts ...lockOption) *LockMutation {
8387 m := &LockMutation{
8388 config: c,
8389 op: op,
8390 typ: TypeLock,
8391 clearedFields: make(map[string]struct{}),
8392 }
8393 for _, opt := range opts {
8394 opt(m)
8395 }
8396 return m
8397}
8398
8399// withLockID sets the ID field of the mutation.
8400func withLockID(id int) lockOption {

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

Used in the wild real call sites across dependent graphs

searching dependent graphs…