def

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: MIT Imports: 1 Imported by: 13

Documentation

Index

Constants

View Source
const (
	LiteMode = 1
	ViewMode = 2
)
View Source
const (
	// Success 成功
	Success = iota
	// Failed 失败
	Failed
	// IllegalParam 非法参数
	IllegalParam
	// InvalidAuthority 非法授权
	InvalidAuthority
	// NoExist 对象不存在
	NoExist
	// Redirect 对象转移
	Redirect
	// UnExpected 意外错误
	UnExpected
)

Variables

This section is empty.

Functions

func GetError

func GetError(errCode ErrorCode, reason string) error

Types

type ErrorCode

type ErrorCode int

type Result

type Result struct {
	ErrorCode ErrorCode `json:"errorCode"`
	Reason    string    `json:"reason"`
}

Result 处理结果 ErrorCode 错误码 Reason 错误信息

func (*Result) Error

func (s *Result) Error() error

func (*Result) Fail

func (s *Result) Fail() bool

Fail 失败

func (*Result) Success

func (s *Result) Success() bool

Success 成功

Jump to

Keyboard shortcuts

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