errors

package
v0.0.0-...-6bcf8dd Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadGateway

func BadGateway(act, msg string) error

func BadRequest

func BadRequest(act, msg string) error

func Forbidden

func Forbidden(act, msg string) error

func InternalServerError

func InternalServerError(act, msg string) error

func MethodNotAllowed

func MethodNotAllowed(act, msg string) error

func NotFound

func NotFound(act, msg string) error

func NotImplemented

func NotImplemented(act, msg string) error

func PaymentRequired

func PaymentRequired(act, msg string) error

func ServiceUnavailable

func ServiceUnavailable(act, msg string) error

func Unauthorized

func Unauthorized(act, msg string) error

Types

type Error

type Error struct {
	Act     string `json:"-"`
	Code    int    `json:"c"`
	Message string `json:"m"`
}

func New

func New(act string, code int, errMessage string) *Error

func (Error) Append

func (e Error) Append(format string, a ...interface{}) Error

func (Error) AppendErr

func (e Error) AppendErr(err error) Error

func (Error) Error

func (e Error) Error() string

func (Error) Format

func (e Error) Format(args ...interface{}) Error

func (Error) Panic

func (e Error) Panic()

func (Error) Panicf

func (e Error) Panicf(args ...interface{})

func (Error) String

func (e Error) String() string

Jump to

Keyboard shortcuts

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