httperrs

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2015 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Package httperrs provide error types help interactive over http

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code int
const (
	BadRequest  Code = 400
	UnAuth      Code = 401
	NoPayment   Code = 402
	Forbidden   Code = 403
	NotFound    Code = 404
	NotAllowed  Code = 405
	NotAccept   Code = 406
	ProxyUnAuth Code = 407
	Timeout     Code = 408
	Conflict    Code = 409
	Gone        Code = 410
	NoLength    Code = 411
	Frequently  Code = 429

	Server         Code = 500
	NotImplemented Code = 501
	Service        Code = 503
)

func (Code) New

func (c Code) New(err error) Error

func (Code) NewS

func (c Code) NewS(err string) Error

type Error

type Error interface {
	error
	Code() int
}

func Must

func Must(err error) Error

func New

func New(err error, code int) Error

func NewS

func NewS(err string, code int) Error

type HTTPError

type HTTPError struct {
	// contains filtered or unexported fields
}

func (HTTPError) Code

func (e HTTPError) Code() int

Jump to

Keyboard shortcuts

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