errors

package
v0.0.0-...-5718ce5 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(id, detail string) error

func Forbidden

func Forbidden(id, detail string) error

func InternalServerError

func InternalServerError(id, detail string) error

func New

func New(id, detail string, code int32) error

func NotFound

func NotFound(id, detail string) error

func Unauthorized

func Unauthorized(id, detail string) error

Types

type Error

type Error struct {
	Id     string `json:"id"`
	Code   int32  `json:"code"`
	Detail string `json:"detail"`
	Status string `json:"status"`
}

Errors provide a way to return detailed information for an RPC request error. The error is normally JSON encoded.

func Parse

func Parse(err string) *Error

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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