errorsi

package
v0.0.0-...-1f4ee57 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrCode

type ErrCode uint32

func (ErrCode) ErrRep

func (x ErrCode) ErrRep() *ErrRep

func (ErrCode) Error

func (x ErrCode) Error() string

func (ErrCode) GRPCStatus

func (x ErrCode) GRPCStatus() *status.Status

example 实现

func (ErrCode) Log

func (x ErrCode) Log(err error) *ErrRep

func (ErrCode) MarshalJSON

func (x ErrCode) MarshalJSON() ([]byte, error)

func (ErrCode) Message

func (x ErrCode) Message(msg string) *ErrRep

func (ErrCode) Response

func (x ErrCode) Response(w http.ResponseWriter)

func (ErrCode) String

func (x ErrCode) String() string

func (ErrCode) Warp

func (x ErrCode) Warp(err error) *ErrRep

type ErrRep

type ErrRep struct {
	Code    ErrCode `json:"code"`
	Message string  `json:"message,omitempty"`
}

func (*ErrRep) Error

func (x *ErrRep) Error() string

func (*ErrRep) GRPCStatus

func (x *ErrRep) GRPCStatus() *status.Status

func (*ErrRep) MarshalJSON

func (x *ErrRep) MarshalJSON() ([]byte, error)

func (*ErrRep) Response

func (x *ErrRep) Response(w http.ResponseWriter)

Directories

Path Synopsis
Package multierr allows combining one or more errors together.
Package multierr allows combining one or more errors together.

Jump to

Keyboard shortcuts

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