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

Method Use

pkg/database/ent/client.go:240–247  ·  view source on GitHub ↗

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

(hooks ...Hook)

Source from the content-addressed store, hash-verified

238// Use adds the mutation hooks to all the entity clients.
239// In order to add hooks to a specific client, call: `client.Node.Use(...)`.
240func (c *Client) Use(hooks ...Hook) {
241 for _, n := range []interface{ Use(...Hook) }{
242 c.Alert, c.AllowList, c.AllowListItem, c.Bouncer, c.ConfigItem, c.Decision,
243 c.Event, c.Lock, c.Machine, c.Meta, c.Metric,
244 } {
245 n.Use(hooks...)
246 }
247}
248
249// Intercept adds the query interceptors to all the entity clients.
250// In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

Callers 2

NewServerFunction · 0.45
NewV1Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected