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

Method Get

pkg/database/ent/client.go:582–584  ·  view source on GitHub ↗

Get returns a AllowList entity by its id.

(ctx context.Context, id int)

Source from the content-addressed store, hash-verified

580
581// Get returns a AllowList entity by its id.
582func (c *AllowListClient) Get(ctx context.Context, id int) (*AllowList, error) {
583 return c.Query().Where(allowlist.ID(id)).Only(ctx)
584}
585
586// GetX is like Get, but panics if an error occurs.
587func (c *AllowListClient) GetX(ctx context.Context, id int) *AllowList {

Callers 1

GetXMethod · 0.95

Calls 4

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

Tested by

no test coverage detected