enum

package
v1.5.10 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: BSD-3-Clause Imports: 1 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code int

Code are codes returned by service indicating operation results; it is an integer value of the enum that corresponds to a given error

const (
	CodeGeneralFailure Code = iota
	CodeUnauthorized
	CodeInvalidOperation
	CodeBadRequest
	CodeNotFound
	CodeCircuitBreak
	CodeOperationLock
	CodeAccessForbidden
	CodeDataCorruption
	CodeNotImplemented
	CodeReservedCount
)

These are the integer values of the enum that corresponds to a given error

func (Code) HTTPStatusCode

func (code Code) HTTPStatusCode() int

HTTPStatusCode translates the built-in error Code to corresponding HTTP status code

func (Code) String

func (code Code) String() string

String translates the enum

Jump to

Keyboard shortcuts

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