2016-12-18 05:21:29 +00:00
|
|
|
package portainer
|
|
|
|
|
|
|
|
// General errors.
|
|
|
|
const (
|
|
|
|
ErrUnauthorized = Error("Unauthorized")
|
|
|
|
)
|
|
|
|
|
|
|
|
// User errors.
|
|
|
|
const (
|
|
|
|
ErrUserNotFound = Error("User not found")
|
|
|
|
)
|
|
|
|
|
2016-12-25 20:34:02 +00:00
|
|
|
// Endpoint errors.
|
|
|
|
const (
|
|
|
|
ErrEndpointNotFound = Error("Endpoint not found")
|
|
|
|
ErrNoActiveEndpoint = Error("Undefined Docker endpoint")
|
|
|
|
)
|
|
|
|
|
2016-12-18 05:21:29 +00:00
|
|
|
// Crypto errors.
|
|
|
|
const (
|
|
|
|
ErrCryptoHashFailure = Error("Unable to hash data")
|
|
|
|
)
|
|
|
|
|
|
|
|
// JWT errors.
|
|
|
|
const (
|
|
|
|
ErrSecretGeneration = Error("Unable to generate secret key")
|
|
|
|
ErrInvalidJWTToken = Error("Invalid JWT token")
|
|
|
|
)
|
|
|
|
|
2016-12-25 20:34:02 +00:00
|
|
|
// File errors.
|
|
|
|
const (
|
|
|
|
ErrUndefinedTLSFileType = Error("Undefined TLS file type")
|
|
|
|
)
|
|
|
|
|
2016-12-18 05:21:29 +00:00
|
|
|
// Error represents an application error.
|
|
|
|
type Error string
|
|
|
|
|
|
|
|
// Error returns the error message.
|
|
|
|
func (e Error) Error() string { return string(e) }
|