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

Method Get

pkg/database/ent/client.go:880–882  ·  view source on GitHub ↗

Get returns a Bouncer entity by its id.

(ctx context.Context, id int)

Source from the content-addressed store, hash-verified

878
879// Get returns a Bouncer entity by its id.
880func (c *BouncerClient) Get(ctx context.Context, id int) (*Bouncer, error) {
881 return c.Query().Where(bouncer.ID(id)).Only(ctx)
882}
883
884// GetX is like Get, but panics if an error occurs.
885func (c *BouncerClient) GetX(ctx context.Context, id int) *Bouncer {

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