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

Method Get

pkg/database/ent/client.go:385–387  ·  view source on GitHub ↗

Get returns a Alert entity by its id.

(ctx context.Context, id int)

Source from the content-addressed store, hash-verified

383
384// Get returns a Alert entity by its id.
385func (c *AlertClient) Get(ctx context.Context, id int) (*Alert, error) {
386 return c.Query().Where(alert.ID(id)).Only(ctx)
387}
388
389// GetX is like Get, but panics if an error occurs.
390func (c *AlertClient) GetX(ctx context.Context, id int) *Alert {

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