errors

package
v0.0.0-...-bf6092e Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsError

func IsError(err error) bool

func New

func New(code ErrorCode, message string, err error) error

Types

type Error

type Error struct {
	Code    ErrorCode
	Message string
	Err     error
}

func (Error) Error

func (e Error) Error() string

func (Error) Unwrap

func (e Error) Unwrap() error

type ErrorCode

type ErrorCode string
const (
	ErrNotFound     ErrorCode = "NotFound"
	ErrUnauthorized ErrorCode = "NotAuthorized"
	ErrOther        ErrorCode = "Other"
)

Jump to

Keyboard shortcuts

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