Documentation ¶ Index ¶ Variables type Error func NewError(code uint16, message string) *Error func (e *Error) AddError(err error) *Error func (e *Error) AddMessage(message string) *Error func (e *Error) Error() string func (e *Error) Marshal() []byte Constants ¶ This section is empty. Variables ¶ View Source var ( // Errors used across different packages ErrServerInternal = NewError(1000, "server internal error") ) Functions ¶ This section is empty. Types ¶ type Error ¶ type Error struct { Code uint16 `json:"code"` Message string `json:"message"` } func NewError ¶ func NewError(code uint16, message string) *Error func (*Error) AddError ¶ func (e *Error) AddError(err error) *Error func (*Error) AddMessage ¶ func (e *Error) AddMessage(message string) *Error func (*Error) Error ¶ func (e *Error) Error() string func (*Error) Marshal ¶ func (e *Error) Marshal() []byte Source Files ¶ View all Source files error.go Click to show internal directories. Click to hide internal directories.