pb_error

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorCommonReason_name = map[int32]string{
		0: "DATA_NOT_FOUND",
		1: "CREATE_DATA_ERROR",
		2: "PARAMETER_ERROR",
		3: "EDIT_DATA_ERROR",
		4: "DELETE_DATA_ERROR",
		5: "GET_DATA_ERROR",
		6: "SIGN_DATA_ERROR",
	}
	ErrorCommonReason_value = map[string]int32{
		"DATA_NOT_FOUND":    0,
		"CREATE_DATA_ERROR": 1,
		"PARAMETER_ERROR":   2,
		"EDIT_DATA_ERROR":   3,
		"DELETE_DATA_ERROR": 4,
		"GET_DATA_ERROR":    5,
		"SIGN_DATA_ERROR":   6,
	}
)

Enum value maps for ErrorCommonReason.

View Source
var File_api_common_pb_error_pb_common_error_proto protoreflect.FileDescriptor

Functions

func ErrorCreateDataError

func ErrorCreateDataError(format string, args ...interface{}) *errors.Error

创建失败

func ErrorDataNotFound

func ErrorDataNotFound(format string, args ...interface{}) *errors.Error

数据未找到

func ErrorDeleteDataError

func ErrorDeleteDataError(format string, args ...interface{}) *errors.Error

删除失败

func ErrorEditDataError

func ErrorEditDataError(format string, args ...interface{}) *errors.Error

编辑失败

func ErrorGetDataError

func ErrorGetDataError(format string, args ...interface{}) *errors.Error

获取数据失败

func ErrorParameterError

func ErrorParameterError(format string, args ...interface{}) *errors.Error

参数错误

func ErrorSignDataError

func ErrorSignDataError(format string, args ...interface{}) *errors.Error

签名失败

func IsCreateDataError

func IsCreateDataError(err error) bool

创建失败

func IsDataNotFound

func IsDataNotFound(err error) bool

数据未找到

func IsDeleteDataError

func IsDeleteDataError(err error) bool

删除失败

func IsEditDataError

func IsEditDataError(err error) bool

编辑失败

func IsGetDataError

func IsGetDataError(err error) bool

获取数据失败

func IsParameterError

func IsParameterError(err error) bool

参数错误

func IsSignDataError

func IsSignDataError(err error) bool

签名失败

Types

type ErrorCommonReason

type ErrorCommonReason int32

公共错误

const (
	// 数据未找到
	ErrorCommonReason_DATA_NOT_FOUND ErrorCommonReason = 0
	// 创建失败
	ErrorCommonReason_CREATE_DATA_ERROR ErrorCommonReason = 1
	// 参数错误
	ErrorCommonReason_PARAMETER_ERROR ErrorCommonReason = 2
	// 编辑失败
	ErrorCommonReason_EDIT_DATA_ERROR ErrorCommonReason = 3
	// 删除失败
	ErrorCommonReason_DELETE_DATA_ERROR ErrorCommonReason = 4
	// 获取数据失败
	ErrorCommonReason_GET_DATA_ERROR ErrorCommonReason = 5
	// 签名失败
	ErrorCommonReason_SIGN_DATA_ERROR ErrorCommonReason = 6
)

func (ErrorCommonReason) Descriptor

func (ErrorCommonReason) Enum

func (ErrorCommonReason) EnumDescriptor deprecated

func (ErrorCommonReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use ErrorCommonReason.Descriptor instead.

func (ErrorCommonReason) Number

func (ErrorCommonReason) String

func (x ErrorCommonReason) String() string

func (ErrorCommonReason) Type

Jump to

Keyboard shortcuts

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