errs

package
v0.0.0-...-100be9c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2018 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound     = errors.New("Not Found")
	ErrBadRequest   = errors.New("Bad Request")
	ErrExists       = errors.New("Exists")
	ErrConflict     = errors.New("Conflict")
	ErrUnauthorized = errors.New("Unauthorized")
)

Functions

func BadRequest

func BadRequest(s string, p ...interface{}) error

func ErrToStr

func ErrToStr(err error) string

func ErrorDecoder

func ErrorDecoder(r *http.Response) error

func ErrorEncoder

func ErrorEncoder(_ context.Context, err error, w http.ResponseWriter)

func NotFound

func NotFound(s string, p ...interface{}) error

func StrToErr

func StrToErr(s string) error

func Unauthorized

func Unauthorized(s string, p ...interface{}) error

Types

type ErrorWrapper

type ErrorWrapper struct {
	Error string `json:"error"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL