result

package
v1.0.57 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Zlib Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSame         = fmt.Errorf("the value is same")
	ErrNotImplement = fmt.Errorf("NOT implement")
	ErrNotSupported = fmt.Errorf("NOT support")
	ErrExpired      = fmt.Errorf("the value is expired")
	ErrInvalid      = fmt.Errorf("the value is invalid")
	ErrNotFound     = fmt.Errorf("NOT found")
	ErrObjectNil    = fmt.Errorf("the object is nil")
	ErrParam        = fmt.Errorf("the param is not error")
	ErrException    = fmt.Errorf("the exception")
	ErrExisted      = fmt.Errorf("the object is existed")
)

Functions

This section is empty.

Types

type Result

type Result struct {
	Code    int32
	SubCode string
	Msg     string
	Raw     interface{}
}

func Error

func Error(code int32, err string) Result

func SubError

func SubError(code int32, subCode string, err string) Result

func Succeed

func Succeed() Result

func TryCount

func TryCount() Result

func (Result) Error

func (r Result) Error() string

error.Error interface

func (Result) GetCode added in v1.0.28

func (r Result) GetCode() int32

func (Result) GetMsg added in v1.0.28

func (r Result) GetMsg() string

func (Result) GetSubCode added in v1.0.28

func (r Result) GetSubCode() string

func (Result) IsTokenError

func (r Result) IsTokenError() bool

func (Result) IsTryCount

func (r Result) IsTryCount() bool

func (Result) Ok

func (r Result) Ok() bool

Jump to

Keyboard shortcuts

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