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

Function IsConstraintError

pkg/database/ent/ent.go:300–306  ·  view source on GitHub ↗

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

(err error)

Source from the content-addressed store, hash-verified

298
299// IsConstraintError returns a boolean indicating whether the error is a constraint failure.
300func IsConstraintError(err error) bool {
301 if err == nil {
302 return false
303 }
304 var e *ConstraintError
305 return errors.As(err, &e)
306}
307
308// selector embedded by the different Select/GroupBy builders.
309type selector struct {

Callers 3

AcquireLockMethod · 0.92
IsLockedMethod · 0.92
CreateBouncerMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…