Documentation
¶
Index ¶
- Variables
- func Must(err error, ec *Error) error
- func Wrap(err error, ec *Error) error
- type Error
- func (e *Error) Error() string
- func (e *Error) Is(target error) bool
- func (e *Error) WithDetail(err error) *Error
- func (e *Error) WithDetailStr(err string) *Error
- func (e *Error) WithDetailf(format string, a ...interface{}) *Error
- func (e *Error) Wrap(err error) error
- func (e *Error) WrapIfNot(err error) error
- type ErrorGroup
- type UnmarshalError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Success = _eg.CreateError(0, "success") UnknownError = _eg.CreateError(1, "unknown") ParameterError = _eg.CreateError(2, "parameter error") InternalError = _eg.CreateError(3, "internal error") RepositoryInitError = _eg.CreateError(4, "repository init error") )
Functions ¶
Types ¶
type Error ¶
Error struct for pb.Error
func CreateError ¶
func (*Error) WithDetail ¶
func (*Error) WithDetailStr ¶
func (*Error) WithDetailf ¶ added in v0.2.5
type ErrorGroup ¶
func NewErrorGroup ¶
func NewErrorGroup(groupCode int, name string) *ErrorGroup
func WithErrGroup ¶
func WithErrGroup(groupCode int) *ErrorGroup
func (*ErrorGroup) CreateError ¶
func (e *ErrorGroup) CreateError(code int, message string) *Error
func (*ErrorGroup) IsInGroup ¶
func (e *ErrorGroup) IsInGroup(err error) bool
type UnmarshalError ¶ added in v0.3.2
type UnmarshalError struct {
Error error
}
func (*UnmarshalError) UnmarshalJSON ¶ added in v0.3.2
func (ue *UnmarshalError) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.