err

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrType

type ErrType string
const (
	ErrBadRequest   ErrType = "BadRequest"
	ErrUnauthorized ErrType = "Unauthorized"
	ErrInternal     ErrType = "Internal"
)

type Error

type Error interface {
	Error() string
	GRPCStatusCode() codes.Code
	HttpStatusCode() int
}

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 ErrType) Error

NewError - function for initializing error

Jump to

Keyboard shortcuts

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