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

Method OnlyIDX

pkg/database/ent/event_query.go:177–183  ·  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

175
176// OnlyIDX is like OnlyID, but panics if an error occurs.
177func (_q *EventQuery) OnlyIDX(ctx context.Context) int {
178 id, err := _q.OnlyID(ctx)
179 if err != nil {
180 panic(err)
181 }
182 return id
183}
184
185// All executes the query and returns a list of Events.
186func (_q *EventQuery) All(ctx context.Context) ([]*Event, error) {

Callers

nothing calls this directly

Calls 1

OnlyIDMethod · 0.95

Tested by

no test coverage detected