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

Method GetX

pkg/database/ent/client.go:1300–1306  ·  view source on GitHub ↗

GetX is like Get, but panics if an error occurs.

(ctx context.Context, id int)

Source from the content-addressed store, hash-verified

1298
1299// GetX is like Get, but panics if an error occurs.
1300func (c *EventClient) GetX(ctx context.Context, id int) *Event {
1301 obj, err := c.Get(ctx, id)
1302 if err != nil {
1303 panic(err)
1304 }
1305 return obj
1306}
1307
1308// QueryOwner queries the owner edge of a Event.
1309func (c *EventClient) QueryOwner(_m *Event) *AlertQuery {

Callers

nothing calls this directly

Calls 1

GetMethod · 0.95

Tested by

no test coverage detected