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

Method Get

pkg/database/ent/client.go:1295–1297  ·  view source on GitHub ↗

Get returns a Event entity by its id.

(ctx context.Context, id int)

Source from the content-addressed store, hash-verified

1293
1294// Get returns a Event entity by its id.
1295func (c *EventClient) Get(ctx context.Context, id int) (*Event, error) {
1296 return c.Query().Where(event.ID(id)).Only(ctx)
1297}
1298
1299// GetX is like Get, but panics if an error occurs.
1300func (c *EventClient) GetX(ctx context.Context, id int) *Event {

Callers 1

GetXMethod · 0.95

Calls 4

QueryMethod · 0.95
IDFunction · 0.92
OnlyMethod · 0.45
WhereMethod · 0.45

Tested by

no test coverage detected