-
Notifications
You must be signed in to change notification settings - Fork 1
/
errors.go
35 lines (26 loc) · 910 Bytes
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package filters
import "fmt"
func UnsupportedOperator(op Operator) error {
return fmt.Errorf("failed to add filter: unsupported operator %s", op.String())
}
func InvalidPolicy(policy string) error {
return fmt.Errorf("invalid policy: %s", policy)
}
func InvalidExpression(expression string) error {
return fmt.Errorf("invalid filter expression: %s", expression)
}
func InvalidValue(value string) error {
return fmt.Errorf("invalid filter value %s", value)
}
func InvalidEventName(event string) error {
return fmt.Errorf("invalid event name in filter: %s", event)
}
func InvalidEventArgument(argument string) error {
return fmt.Errorf("invalid filter event argument: %s", argument)
}
func InvalidContextField(field string) error {
return fmt.Errorf("invalid event context field: %s", field)
}
func FailedToRetreiveHostNS() error {
return fmt.Errorf("failed to retrieve host mount namespace")
}