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

Method OnlyIDX

pkg/database/ent/machine_query.go:178–184  ·  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

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

Callers

nothing calls this directly

Calls 1

OnlyIDMethod · 0.95

Tested by

no test coverage detected