Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExist = Business("file already exist (%s)", "DE:001")
Functions ¶
This section is empty.
Types ¶
type BusinessError ¶
func Business ¶
func Business(message, code string) BusinessError
func (BusinessError) Msgf ¶
func (e BusinessError) Msgf(params ...interface{}) BusinessError
type NotFoundError ¶
type NotFoundError struct {
BusinessError
}
type SystemError ¶
type SystemError struct { BusinessError Reason error `json:"reason"` }
func System ¶
func System(reason error, message, code string) SystemError
func (SystemError) Error ¶
func (e SystemError) Error() string
func (SystemError) WithErr ¶
func (e SystemError) WithErr(err error) SystemError
type ValidationError ¶
type ValidationError struct { BusinessError Details []error `json:"details,omitempty"` }
func Validation ¶
func Validation(message, code string, details ...error) ValidationError
Validation error build.
Click to show internal directories.
Click to hide internal directories.