Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("no data") ErrBadRequest = errors.New("bad request") ErrInternal = errors.New("interal error") ErrNotAuthorized error = BaseRichError{ HTTPCode: http.StatusForbidden, ErrorCode: "NOT_AUTHORIZED", DebugMessage: "not authorized", } )
Functions ¶
func IsErrorLikeResult ¶
func NewForbiddenError ¶
Types ¶
type BaseRichError ¶
func (BaseRichError) Error ¶
func (e BaseRichError) Error() string
func (BaseRichError) GetCode ¶
func (e BaseRichError) GetCode() string
func (BaseRichError) GetHTTPCode ¶
func (e BaseRichError) GetHTTPCode() int
func (BaseRichError) GetMessage ¶
func (e BaseRichError) GetMessage() string
type ContinueError ¶
type ContinueError struct {
URL string `json:"continueUrl"`
}
ContinueError behaves like RedirectError but instead it's API friendly and uses status code 202 with json body.
func NewContinueError ¶
func NewContinueError(url string) *ContinueError
func (ContinueError) Error ¶
func (e ContinueError) Error() string
func (ContinueError) IsErrorLikeResult ¶
func (e ContinueError) IsErrorLikeResult() bool
type ErrorLikeResult ¶
type ErrorLikeResult interface {
IsErrorLikeResult() bool
}
type ErrorWithCode ¶
type ErrorWithCode interface {
GetCode() string
}
type ErrorWithHTTPCode ¶
type ErrorWithHTTPCode interface {
GetHTTPCode() int
}
type LocalizedError ¶
type LocalizedError interface {
GetMessage() string
}
type NotAcceptableError ¶
type NotAcceptableError struct {
// contains filtered or unexported fields
}
func NewNotAcceptableError ¶
func NewNotAcceptableError(code string) *NotAcceptableError
func (NotAcceptableError) Error ¶
func (e NotAcceptableError) Error() string
func (NotAcceptableError) GetCode ¶
func (e NotAcceptableError) GetCode() string
func (NotAcceptableError) GetMessage ¶
func (e NotAcceptableError) GetMessage() string
func (NotAcceptableError) WithMessage ¶
func (e NotAcceptableError) WithMessage(format string, args ...interface{}) *NotAcceptableError
type PendingError ¶
type PendingError struct{}
func (PendingError) Error ¶
func (e PendingError) Error() string
func (PendingError) IsErrorLikeResult ¶
func (e PendingError) IsErrorLikeResult() bool
type RaceConditionError ¶
type RaceConditionError struct {
// contains filtered or unexported fields
}
func NewRaceConditionError ¶
func NewRaceConditionError(m string) *RaceConditionError
func (RaceConditionError) Error ¶
func (e RaceConditionError) Error() string
func (RaceConditionError) GetMessage ¶
func (e RaceConditionError) GetMessage() string
type RedirectError ¶
func NewTemporaryRedirectError ¶
func NewTemporaryRedirectError(url string) *RedirectError
func (RedirectError) Error ¶
func (e RedirectError) Error() string
func (RedirectError) IsErrorLikeResult ¶
func (e RedirectError) IsErrorLikeResult() bool
Click to show internal directories.
Click to hide internal directories.