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

Method Get

pkg/database/ent/client.go:731–733  ·  view source on GitHub ↗

Get returns a AllowListItem entity by its id.

(ctx context.Context, id int)

Source from the content-addressed store, hash-verified

729
730// Get returns a AllowListItem entity by its id.
731func (c *AllowListItemClient) Get(ctx context.Context, id int) (*AllowListItem, error) {
732 return c.Query().Where(allowlistitem.ID(id)).Only(ctx)
733}
734
735// GetX is like Get, but panics if an error occurs.
736func (c *AllowListItemClient) GetX(ctx context.Context, id int) *AllowListItem {

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