Package errors
Package errors implements all the errors catalog available.
- Constants
- func GetErrorJson(errorCode int) (int, string, error)
- func GetErrorJsonMessage(errorCode int, msg string) (int, string, error)
- func ReplyWithError(w *http.ResponseWriter, errorCode int, customHeaders *map[string]string)
- func ReplyWithErrorMessage(w *http.ResponseWriter, errorCode int, msg string, customHeaders *map[string]string)
- type ErrorAPIGet
- func (e ErrorAPIGet) Error() string
- type ErrorAPIPost
- func (e ErrorAPIPost) Error() string
- type ErrorJSONDecoding
- func (e ErrorJSONDecoding) Error() string
- type ErrorJSONEncode
- func (e ErrorJSONEncode) Error() string
- type ErrorReply
Package files
api_errors.go
errors.go
other_errors.go
reply_errors.go
Constants
const (
GenericError int = 1
DBError int = 2
GenericNotFoundError int = 3
InputNotValid int = 4
FaasConnectError int = 5
MarshalError int = 6
ServiceNotValid int = 100
GenericDeployError int = 200
GenericOpenFaasError int = 300
JobCannotBeScheduledError int = 400
JobDeliberatelyRejected int = 401
CannotRetrieveAction int = 402
JobCouldNotBeForwarded int = 403
PeerResponseNil int = 404
CannotRetrieveRecipientNode int = 405
DBDuplicateKey int = 11000
)
func GetErrorJson(errorCode int) (int, string, error)
func GetErrorJsonMessage(errorCode int, msg string) (int, string, error)
func ReplyWithError(w *http.ResponseWriter, errorCode int, customHeaders *map[string]string)
func ReplyWithErrorMessage(w *http.ResponseWriter, errorCode int, msg string, customHeaders *map[string]string)
type ErrorAPIGet struct {
URL string
}
func (ErrorAPIGet) Error
¶
func (e ErrorAPIGet) Error() string
type ErrorAPIPost struct {
URL string
}
func (ErrorAPIPost) Error
¶
func (e ErrorAPIPost) Error() string
type ErrorJSONDecoding struct{}
func (ErrorJSONDecoding) Error
¶
func (e ErrorJSONDecoding) Error() string
type ErrorJSONEncode struct{}
func (ErrorJSONEncode) Error
¶
func (e ErrorJSONEncode) Error() string
type ErrorReply struct {
Code int `json:"code,omitempty"`
Message string `json:"message,omitempty"`
Err error `json:"err,omitempty"`
}