MCPcopy Index your code
hub / github.com/crowdsecurity/crowdsec / GetX

Method GetX

pkg/database/ent/client.go:1582–1588  ·  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

1580
1581// GetX is like Get, but panics if an error occurs.
1582func (c *MachineClient) GetX(ctx context.Context, id int) *Machine {
1583 obj, err := c.Get(ctx, id)
1584 if err != nil {
1585 panic(err)
1586 }
1587 return obj
1588}
1589
1590// QueryAlerts queries the alerts edge of a Machine.
1591func (c *MachineClient) QueryAlerts(_m *Machine) *AlertQuery {

Callers

nothing calls this directly

Calls 1

GetMethod · 0.95

Tested by

no test coverage detected