-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.go
42 lines (32 loc) · 1.81 KB
/
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
36
37
38
39
40
41
42
package errors
import (
"errors"
)
// -----------------------------------------------------------------------------
// Objects conversion - Errors
// -----------------------------------------------------------------------------
// ErrUnexpectedObject is a custom error that must be used when the cast of a object to an expected
// type fails.
var ErrUnexpectedObject = errors.New("unexpected object type provided")
// -----------------------------------------------------------------------------
// Gateway - Errors
// -----------------------------------------------------------------------------
// ErrUnsupportedGateway is an error which indicates that a provided Gateway
// is not supported because it's GatewayClass was not associated with this
// controller.
var ErrUnsupportedGateway = errors.New("gateway not supported")
// ErrTooManyDataPlaneNetworkPolicies is an error which indicates that a DataPlane
// has too many NetworkPolicies configured.
var ErrTooManyDataPlaneNetworkPolicies = errors.New("too many data plane network policies")
// -----------------------------------------------------------------------------
// GatewayClass - Errors
// -----------------------------------------------------------------------------
// ErrObjectMissingParametersRef is a custom error that must be used when the
// .spec.ParametersRef field of the given object is nil
var ErrObjectMissingParametersRef = errors.New("no reference to related objects")
// -----------------------------------------------------------------------------
// Controlplane - Errors
// -----------------------------------------------------------------------------
// ErrDataPlaneNotSet is a custom error that must be used when a specific OwnerReference
// is expected to be on an object, but it is not found.
var ErrDataPlaneNotSet = errors.New("no dataplane name set")