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

Method GetX

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

1149
1150// GetX is like Get, but panics if an error occurs.
1151func (c *DecisionClient) GetX(ctx context.Context, id int) *Decision {
1152 obj, err := c.Get(ctx, id)
1153 if err != nil {
1154 panic(err)
1155 }
1156 return obj
1157}
1158
1159// QueryOwner queries the owner edge of a Decision.
1160func (c *DecisionClient) QueryOwner(_m *Decision) *AlertQuery {

Callers

nothing calls this directly

Calls 1

GetMethod · 0.95

Tested by

no test coverage detected