Versions in this module Expand all Collapse all v1 v1.0.0 Nov 3, 2016 Changes in this version + var ErrorCodeUnknown = Register("errcode", ErrorDescriptor{ ... }) + var ErrorCodeUnsupported = Register("errcode", ErrorDescriptor{ ... }) + func ServeJSON(w http.ResponseWriter, err error) error + type Error struct + Code ErrorCode + Detail interface{} + Message string + func (e Error) Error() string + func (e Error) ErrorCode() ErrorCode + func (e Error) WithArgs(args ...interface{}) Error + func (e Error) WithDetail(detail interface{}) Error + type ErrorCode int + func Register(group string, descriptor ErrorDescriptor) ErrorCode + func (ec *ErrorCode) UnmarshalText(text []byte) error + func (ec ErrorCode) Descriptor() ErrorDescriptor + func (ec ErrorCode) Error() string + func (ec ErrorCode) ErrorCode() ErrorCode + func (ec ErrorCode) MarshalText() ([]byte, error) + func (ec ErrorCode) Message() string + func (ec ErrorCode) String() string + func (ec ErrorCode) WithArgs(args ...interface{}) Error + func (ec ErrorCode) WithDetail(detail interface{}) Error + func (ec ErrorCode) WithMessage(message string) Error + type ErrorCoder interface + ErrorCode func() ErrorCode + type ErrorDescriptor struct + Code ErrorCode + Description string + HTTPStatusCode int + Message string + Value string + type Errors []error + func (errs *Errors) UnmarshalJSON(data []byte) error + func (errs Errors) Error() string + func (errs Errors) Len() int + func (errs Errors) MarshalJSON() ([]byte, error)