-
Notifications
You must be signed in to change notification settings - Fork 4
/
errors.go
29 lines (22 loc) · 907 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
package errors
const (
ErrInstanceNotFoundMsg = "instance not found"
ErrInstanceNotInstalledMsg = "instance is not installed"
ErrInstanceNotHealthyMsg = "instance is not healthy"
ErrRegistryNotReadyMsg = "instance is not ready"
)
// ErrInstanceNotFound is called when the corresponding Harbor instance could not be found.
type ErrInstanceNotFound struct{}
func (e *ErrInstanceNotFound) Error() string {
return ErrInstanceNotFoundMsg
}
// ErrInstanceNotInstalled is called when the corresponding Harbor instance is not yet installed properly.
type ErrInstanceNotInstalled struct{}
func (e *ErrInstanceNotInstalled) Error() string {
return ErrInstanceNotInstalledMsg
}
// ErrRegistryNotReady is called when the corresponding RegistryCR (registries.Registry) is not ready.
type ErrRegistryNotReady struct{}
func (e *ErrRegistryNotReady) Error() string {
return ErrRegistryNotReadyMsg
}