reason

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "INTERNAL",
		1: "TOO_MANY_REQUESTS",
		2: "ILLEGAL_PARAMETER",
		3: "NOT_FOUND",
		4: "UNAUTHORIZED",
		5: "FORBIDDEN",
	}
	ErrorReason_value = map[string]int32{
		"INTERNAL":          0,
		"TOO_MANY_REQUESTS": 1,
		"ILLEGAL_PARAMETER": 2,
		"NOT_FOUND":         3,
		"UNAUTHORIZED":      4,
		"FORBIDDEN":         5,
	}
)

Enum value maps for ErrorReason.

View Source
var File_reason_proto_reason_proto protoreflect.FileDescriptor

Functions

func ErrorForbidden

func ErrorForbidden(format string, args ...interface{}) *errors.Error

func ErrorIllegalParameter

func ErrorIllegalParameter(format string, args ...interface{}) *errors.Error

func ErrorInternal added in v1.1.0

func ErrorInternal(format string, args ...interface{}) *errors.Error

func ErrorNotFound

func ErrorNotFound(format string, args ...interface{}) *errors.Error

func ErrorTooManyRequests

func ErrorTooManyRequests(format string, args ...interface{}) *errors.Error

func ErrorUnauthorized

func ErrorUnauthorized(format string, args ...interface{}) *errors.Error

func IsForbidden

func IsForbidden(err error) bool

func IsIllegalParameter

func IsIllegalParameter(err error) bool

func IsInternal added in v1.1.0

func IsInternal(err error) bool

func IsNotFound

func IsNotFound(err error) bool

func IsTooManyRequests

func IsTooManyRequests(err error) bool

func IsUnauthorized

func IsUnauthorized(err error) bool

Types

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_INTERNAL          ErrorReason = 0
	ErrorReason_TOO_MANY_REQUESTS ErrorReason = 1
	ErrorReason_ILLEGAL_PARAMETER ErrorReason = 2
	ErrorReason_NOT_FOUND         ErrorReason = 3
	ErrorReason_UNAUTHORIZED      ErrorReason = 4
	ErrorReason_FORBIDDEN         ErrorReason = 5
)

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