errno

package
v0.12.5 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0:   "internal_server",
		1:   "bad_request",
		401: "invalid_token",

		403: "un_authorized",
		404: "not_found",
		409: "conflict",
	}
	ErrorReason_value = map[string]int32{
		"internal_server": 0,
		"bad_request":     1,
		"invalid_token":   401,
		"token_revoked":   401,
		"no_login":        401,
		"un_authorized":   403,
		"not_found":       404,
		"conflict":        409,
	}
)

Enum value maps for ErrorReason.

View Source
var File_errno_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ErrorReason

type ErrorReason int32

#errno

const (
	// #[errno(code=500,message="服务器错误")]
	ErrorReason_internal_server ErrorReason = 0
	// 请求参数错误
	// #[errno(code=400)]
	ErrorReason_bad_request ErrorReason = 1
	// 令牌无效或令牌已过期
	ErrorReason_invalid_token ErrorReason = 401
	// 令牌已失效
	ErrorReason_token_revoked ErrorReason = 401
	// 未登录
	ErrorReason_no_login ErrorReason = 401
	// 未授权
	ErrorReason_un_authorized ErrorReason = 403
	// 没有找到,已删除或不存在
	ErrorReason_not_found ErrorReason = 404
	// 资源冲突
	ErrorReason_conflict ErrorReason = 409
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

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

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

Jump to

Keyboard shortcuts

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