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

Method Get

pkg/database/ent/client.go:1444–1446  ·  view source on GitHub ↗

Get returns a Lock entity by its id.

(ctx context.Context, id int)

Source from the content-addressed store, hash-verified

1442
1443// Get returns a Lock entity by its id.
1444func (c *LockClient) Get(ctx context.Context, id int) (*Lock, error) {
1445 return c.Query().Where(lock.ID(id)).Only(ctx)
1446}
1447
1448// GetX is like Get, but panics if an error occurs.
1449func (c *LockClient) GetX(ctx context.Context, id int) *Lock {

Callers 15

GetXMethod · 0.95
pollMethod · 0.45
GetValueMethod · 0.45
GetValueMethod · 0.45
ValueMethod · 0.45
ValueMethod · 0.45
ValueMethod · 0.45
ValueMethod · 0.45
ValueMethod · 0.45
ValueMethod · 0.45
GetValueMethod · 0.45
GetValueMethod · 0.45

Calls 4

QueryMethod · 0.95
IDFunction · 0.92
OnlyMethod · 0.45
WhereMethod · 0.45

Tested by

no test coverage detected