herror

package
v1.0.0-rc.2.0...-638eaff Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(err ...interface{}) error

func Conflict

func Conflict(err ...interface{}) error

func Forbidden

func Forbidden(err ...interface{}) error

func HTTPError

func HTTPError(code int, err interface{}) error

func InternalServerError

func InternalServerError(err error) error

func NotFound

func NotFound(err ...interface{}) error

func Panic

func Panic(err error) error

func Unauthorized

func Unauthorized(err ...interface{}) error

Types

type InternalError

type InternalError struct {
	// Err エラー
	Err error
	// Stack スタックトレース
	Stack []byte
	// Fields zapログ用フィールド
	Fields []zap.Field
	// Panic panicが発生したかどうか
	Panic bool
}

InternalError 内部エラー

func (*InternalError) Error

func (i *InternalError) Error() string

Jump to

Keyboard shortcuts

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