reason

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

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 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 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_TOO_MANY_REQUESTS ErrorReason = 0
	ErrorReason_ILLEGAL_PARAMETER ErrorReason = 1
	ErrorReason_NOT_FOUND         ErrorReason = 2
	ErrorReason_UNAUTHORIZED      ErrorReason = 3
	ErrorReason_FORBIDDEN         ErrorReason = 4
)

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