Documentation
¶
Index ¶
- Variables
- type Error
- func (e *Error) Error() string
- func (e *Error) Is(target error) bool
- func (e *Error) MarshalJSON() ([]byte, error)
- func (e *Error) UnmarshalJSON(b []byte) (err error)
- func (e *Error) WithDetail(err error) *Error
- func (e *Error) WithDetailStr(err string) *Error
- func (e *Error) WithDetailf(format string, a ...interface{}) *Error
- type ErrorGroup
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 ¶
This section is empty.
Types ¶
type Error ¶
Error struct for pb.Error
func CreateError ¶
func (*Error) MarshalJSON ¶
func (*Error) UnmarshalJSON ¶
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
Click to show internal directories.
Click to hide internal directories.