rpc

package
v0.0.0-...-f70a1fa Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBizStatusError

func NewBizStatusError(code ErrorType, err error) kerrors.BizStatusErrorIface

Types

type ErrorType

type ErrorType int
const (
	ErrorTypeInvalid ErrorType = iota
	// 数据重复错误
	ErrorTypeDBDataRepeat
	// 数据无效
	ErrorTypeDataInvalid
	//数据库操作错误
	ErrorTypeDBHandle
	//network 内部网络处理错误
	ErrorTypeNetwork
	//JsonMarshal json 转换错误
	ErrorTypeJsonMarshal
	// UnMarshal json 解析错误
	ErrorTypeJsonUnMarshal
	// 数据为空
	ErrorTypeDataEmpty
	// 数据插入四百
	ErrorTypeDataInsertFailure
	//RPC 网络层错误
	ErrTypeRpcError
)

func ParseBizStatusError

func ParseBizStatusError(err error) (errType ErrorType, publicErrMsg string, privateErrMsg string)

Jump to

Keyboard shortcuts

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