Documentation ¶ Index ¶ type Error type Errors func New(errs ...Error) *Errors func (ae *Errors) AddError(err error, opts ...Option) *Errors func (ae Errors) Error() string func (ae *Errors) SetHttpCode(code int) *Errors type Option func WithField(v string) Option Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Error ¶ type Error struct { Message string `json:"message"` Field string `json:"field,omitempty"` } // @name APIError type Errors ¶ type Errors struct { Errors []Error `json:"errors"` HttpCode int `json:"code"` } // @name APIErrors func New ¶ func New(errs ...Error) *Errors func (*Errors) AddError ¶ func (ae *Errors) AddError(err error, opts ...Option) *Errors func (Errors) Error ¶ func (ae Errors) Error() string func (*Errors) SetHttpCode ¶ func (ae *Errors) SetHttpCode(code int) *Errors type Option ¶ type Option func(*Error) func WithField ¶ func WithField(v string) Option Source Files ¶ View all Source files apierror.gooption.go Click to show internal directories. Click to hide internal directories.