Documentation ¶
Index ¶
- func RegisterErrCode(code ErrCode, msg string)
- type DefaultErrRep
- type ErrCode
- func (x ErrCode) ErrRep() *ErrRep
- func (x ErrCode) Error() string
- func (x ErrCode) GrpcStatus() *status.Status
- func (x ErrCode) Log(err error) *ErrRep
- func (x ErrCode) MarshalJSON() ([]byte, error)
- func (x ErrCode) Message(msg string) *ErrRep
- func (x ErrCode) Response(w http.ResponseWriter)
- func (x ErrCode) String() string
- func (x ErrCode) Warp(err error) *ErrRep
- type ErrRep
- type GrpcStatus
- type Is
- type Unwrap
- type WarpError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterErrCode ¶ added in v1.0.9
Types ¶
type DefaultErrRep ¶
type DefaultErrRep interface {
ErrRep() *ErrRep
}
type ErrCode ¶
type ErrCode uint32
func (ErrCode) GrpcStatus ¶ added in v1.2.12
example 实现
func (ErrCode) MarshalJSON ¶
func (ErrCode) Response ¶
func (x ErrCode) Response(w http.ResponseWriter)
type ErrRep ¶
func (*ErrRep) GrpcStatus ¶ added in v1.2.12
func (*ErrRep) MarshalJSON ¶
func (*ErrRep) Response ¶
func (x *ErrRep) Response(w http.ResponseWriter)
type GrpcStatus ¶ added in v1.2.12
Click to show internal directories.
Click to hide internal directories.