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

Method Get

pkg/database/ent/client.go:1146–1148  ·  view source on GitHub ↗

Get returns a Decision entity by its id.

(ctx context.Context, id int)

Source from the content-addressed store, hash-verified

1144
1145// Get returns a Decision entity by its id.
1146func (c *DecisionClient) Get(ctx context.Context, id int) (*Decision, error) {
1147 return c.Query().Where(decision.ID(id)).Only(ctx)
1148}
1149
1150// GetX is like Get, but panics if an error occurs.
1151func (c *DecisionClient) GetX(ctx context.Context, id int) *Decision {

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