Documentation
¶
Index ¶
- type RestErr
- func CheckRestError(path string, err error, resp *resty.Response) RestErr
- func NewBadRequestError(path string, message string, cause string) RestErr
- func NewConflictError(path string, message string) RestErr
- func NewGoneError(path string, message string) RestErr
- func NewInternalServerError(path string, code string, msg string) RestErr
- func NewNotFoundError(path string, message string) RestErr
- func NewRestError(message string, status int, cause string) RestErr
- func NewRestErrorFromBytes(bytes []byte) (RestErr, error)
- func NewServiceUnavailableError(path string, message string) RestErr
- func NewUnauthorizedError(path string, message string) RestErr
- func NewUnprocessableEntityError(path string, message string) RestErr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RestErr ¶
type RestErr interface { Status() int // HTTP status code Title() string // A string representation of the Status Code Path() string // Only used for Logging: The path of the error. Ex: "controller/controllerfunc/service/servicefunc/dbclient/dblientfunc" WrapPath(string) // Only used for Logging: Wrapper func to keep track of the path of the error Code() string // Only used for Logging: Raw error code Message() string // Only used for Logging: Raw error message not returned to the client Error() string // string representation of a restErr }
func CheckRestError ¶
func NewBadRequestError ¶
func NewConflictError ¶
func NewGoneError ¶
func NewInternalServerError ¶
constructors
func NewNotFoundError ¶
func NewRestErrorFromBytes ¶
func NewUnauthorizedError ¶
Click to show internal directories.
Click to hide internal directories.