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

Method Get

pkg/database/ent/client.go:1577–1579  ·  view source on GitHub ↗

Get returns a Machine entity by its id.

(ctx context.Context, id int)

Source from the content-addressed store, hash-verified

1575
1576// Get returns a Machine entity by its id.
1577func (c *MachineClient) Get(ctx context.Context, id int) (*Machine, error) {
1578 return c.Query().Where(machine.ID(id)).Only(ctx)
1579}
1580
1581// GetX is like Get, but panics if an error occurs.
1582func (c *MachineClient) GetX(ctx context.Context, id int) *Machine {

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