serverErr

package
v0.0.0-...-9b45bd6 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonRsp

func CommonRsp(
	err error,
) *userInfoPb.CommonRsp

func RegisterErrRsp

func RegisterErrRsp(
	err error,
) *userInfoPb.RegisterRsp

Types

type ErrCode

type ErrCode uint32
const (
	OKCode ErrCode = iota + 0
	// 注册相关
	ErrUserInfoNotProvided
	ErrParamsTypeErrorInServer
	ErrMySqlError
	ErrEmailAlreadyUsed
	ErrEmailNotProvided
	ErrPasswordNotProvided
	ErrGenderInvalid
	ErrUserTypeInvalid
	ErrPhoneNumberAlreadyUsed
	ErrGenerateTokenFailed
	ErrSetRedisFailed
	// 登录相关
	ErrorUserNotFound
	ErrorPasswordNotRight
)

type ErrorImpl

type ErrorImpl struct {
	ErrorCode ErrCode
	ErrorMsg  string
}

ErrorImpl

func New

func New(code ErrCode) ErrorImpl

New

func (ErrorImpl) Error

func (e ErrorImpl) Error() string

Error

Jump to

Keyboard shortcuts

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