Documentation ¶
Index ¶
- Variables
- func Decode(r *http.Request, val interface{}) error
- func Message(k string, v interface{}) interface{}
- func NewRequestError(err error, status int) error
- func Respond(w http.ResponseWriter, data interface{}, statusCode int) error
- func RespondError(w http.ResponseWriter, err error)
- type RequestError
- type Validation
- type Validator
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInternalServer = errors.New("Something went wrong, we are aware of the problem") ErrValidation = errors.New("Validation error") )
Functions ¶
func NewRequestError ¶
func RespondError ¶
func RespondError(w http.ResponseWriter, err error)
Types ¶
type RequestError ¶
func (*RequestError) Error ¶
func (re *RequestError) Error() string
type Validation ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func NewValidator() *Validator
Click to show internal directories.
Click to hide internal directories.