Documentation ¶
Index ¶
- func EAlreadyExists(msg string, err error) error
- func EInternal(msg string, err error) error
- func EMalformed(msg string, err error) error
- func ENotExists(msg string, err error) error
- func EValidation(msg string, err error) error
- func Is(t Type, err error) bool
- func IsContextError(err error) error
- func New(t Type, msg string, err error) error
- type Error
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EAlreadyExists ¶
EAlreadyExists creates an error of type EAlreadyExistsl
func EMalformed ¶
EMalformed creates an error of type Malformed
func ENotExists ¶
ENotExists creates an error of type NotExist
func EValidation ¶
EValidation creates an error of type Validationn
func IsContextError ¶ added in v1.4.1
IsContextError creates an error of type Cancelled or Deadline
Types ¶
type Type ¶
type Type string
Type defines the type of an error
const ( // Internal error Internal Type = "internal" // NotFound error means that a specific item does not exist NotFound Type = "not_found" // Malformed error represents data that not respect the standard format Malformed Type = "malformed" // Validation error Validation Type = "validation" // AlreadyExists error AlreadyExists Type = "already_exists" // Timeout error Timeout Type = "timeout" // Cancelled error Cancelled Type = "cancelled" )
Click to show internal directories.
Click to hide internal directories.