serrors

package
v1.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OK                = 200
	Fail              = 201
	InvalidParam      = 202
	WrongUser         = 203
	WrongPassword     = 204
	WrongPhoneNumber  = 205
	InsertFail        = 206
	UpdateFail        = 207
	DeleteFail        = 208
	ModifyFail        = 209
	UploadFail        = 210
	SelectFail        = 211
	ProcessCreateFail = 300
	ProcessStartFail  = 301
	ProcessDuplicate  = 302
	ProcessUnexist    = 303
	ProcessDelFail    = 304
	ProcessFileLack   = 305
)

错误代码

Variables

This section is empty.

Functions

func Msg

func Msg(code int) string

Types

type Response

type Response struct {
	Code      int         `json:"code" example:"200"`
	Message   interface{} `json:"message"`
	Result    interface{} `json:"result"`
	Success   bool        `json:"success"  example:"true"`
	Timestamp int64       `json:"timestamp"`
}

type SError

type SError struct {
	// contains filtered or unexported fields
}

SError 三三物联网Error定义

func NewSError

func NewSError(code int) *SError

func (*SError) Code

func (e *SError) Code() int

func (*SError) Equal

func (e *SError) Equal(errorCode int) bool

func (*SError) Error

func (e *SError) Error() string

func (*SError) Msg

func (e *SError) Msg() string

Jump to

Keyboard shortcuts

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