MCPcopy Create free account
hub / github.com/crowdsecurity/crowdsec / OnlyIDX

Method OnlyIDX

pkg/database/ent/alert_query.go:251–257  ·  view source on GitHub ↗

OnlyIDX is like OnlyID, but panics if an error occurs.

(ctx context.Context)

Source from the content-addressed store, hash-verified

249
250// OnlyIDX is like OnlyID, but panics if an error occurs.
251func (_q *AlertQuery) OnlyIDX(ctx context.Context) int {
252 id, err := _q.OnlyID(ctx)
253 if err != nil {
254 panic(err)
255 }
256 return id
257}
258
259// All executes the query and returns a list of Alerts.
260func (_q *AlertQuery) All(ctx context.Context) ([]*Alert, error) {

Callers

nothing calls this directly

Calls 1

OnlyIDMethod · 0.95

Tested by

no test coverage detected