err

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error interface {
	Error() string
	HttpStatusCode() int
}

Error error - abstraction for error object

func GetError

func GetError(e error) Error

GetError - get error with Error type

func NewError

func NewError(e error, errType ErrorType) Error

NewError - function for initializing error

type ErrorType

type ErrorType string
const (
	ErrorBadRequest   ErrorType = "BadRequest"
	ErrorUnauthorized ErrorType = "Unauthorized"
	ErrorInternal     ErrorType = "Internal"
)

Jump to

Keyboard shortcuts

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