codes

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: LGPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code uint32

A Code is an unsigned 32-bit error code as defined in the spec.

const (
	// OK OK is returned on success.
	OK Code = 0

	// Unknown 未知错误
	Unknown Code = 1000

	// NotImplemented 方法未实现
	NotImplemented Code = 1001

	// Internal 内部错误
	Internal Code = 1002

	// Unavailable 服务不可用
	Unavailable Code = 1003

	// InvalidArgument 非法的参数
	InvalidArgument Code = 1004

	// OutOfRange 参数超出范围
	OutOfRange Code = 1005

	// InvalidRequest 非法的 Request 消息
	InvalidRequest Code = 1006

	// Unauthenticated 未认证
	Unauthenticated Code = 1007

	// PermissionDenied 拒绝访问
	PermissionDenied Code = 1008

	// NotFound 资源未找到
	NotFound Code = 1009

	// AlreadyExists 资源已存在
	AlreadyExists Code = 1010

	// Canceled 已取消
	Canceled Code = 1011

	// DataLoss 数据丢失
	DataLoss Code = 1012

	// DataAccessFailed 数据访问失败
	DataAccessFailed Code = 1013

	// InvalidOperation 非法的操作
	InvalidOperation Code = 1014
)

func (*Code) Message

func (c *Code) Message() string

Message returns a description message of the code

func (*Code) UnmarshalJSON

func (c *Code) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals b into the Code.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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