Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorBuilder ¶
type ErrorBuilder struct {
// contains filtered or unexported fields
}
ErrorBuilder builds an error from the fields in a string map
func BuildError ¶
func BuildError(fields Fields) *ErrorBuilder
BuildError builds an error from the fields in a string map
func (*ErrorBuilder) CreateError ¶
func (eb *ErrorBuilder) CreateError(code int, message string) JSONableError
CreateError builds an error from a HTTP-style error code, a message string, and the fields map
type Fields ¶
type Fields map[string]interface{}
Fields is a string map holding information about an error
type JSONableError ¶
JSONableError is a JSON-compatible error
func CreateError ¶
func CreateError(code int, message string) JSONableError
CreateError builds an error from a HTTP-style error code and a message string
Click to show internal directories.
Click to hide internal directories.