Documentation ¶
Index ¶
- Variables
- func IsAlreadyExists(err error) bool
- func IsInvalidCredentials(err error) bool
- func IsNotFound(err error) bool
- func IsTimeoutExceeded(err error) bool
- func IsUnknownProvider(err error) bool
- func IsUnsupportedProvider(err error) bool
- func New(msg string, code ErrorCode) error
- type Error
- type ErrorCode
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidCredentials = New("invalid credentials", InvalidCredentials) ErrNotFound = New("entity not found", NotFound) ErrAlreadyExists = New("entity already exists", EntityAlreadyExists) ErrUnknownProvider = New("unknown provider type", UnknownProvider) ErrUnsupportedProvider = New("unsupported provider", UnsupportedProvider) ErrInvalidJson = New("invalid json", InvalidJSON) ErrNilValue = New("nil value", NilValue) ErrTokenExpired = New("token has been expire", TokenExpired) ErrNilEntity = New("nil entity", NilEntity) ErrTimeoutExceeded = New("timeout exceeded", TimeoutExceeded) )
Functions ¶
func IsAlreadyExists ¶
func IsInvalidCredentials ¶
func IsNotFound ¶
func IsTimeoutExceeded ¶
func IsUnknownProvider ¶
func IsUnsupportedProvider ¶
Types ¶
type ErrorCode ¶
type ErrorCode int
const ( UnknownError ErrorCode = 1000 ValidationFailed ErrorCode = 1001 InvalidCredentials ErrorCode = 1003 NotFound ErrorCode = 1004 InvalidJSON ErrorCode = 1005 CantChangeID ErrorCode = 1006 EntityAlreadyExists ErrorCode = 1007 UnknownProvider ErrorCode = 1008 UnsupportedProvider ErrorCode = 1009 NilValue ErrorCode = 1010 TokenExpired ErrorCode = 1011 AlreadyExists ErrorCode = 1010 NilEntity ErrorCode = 1011 TimeoutExceeded ErrorCode = 1012 )
Click to show internal directories.
Click to hide internal directories.