ctxerr

package
v0.0.0-...-e46c3b8 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: GPL-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 BadFormat

type BadFormat struct {
	// contains filtered or unexported fields
}

BadFormat wraps error due to bad formating.

func (BadFormat) Context

func (e BadFormat) Context() Context

Context returns error Context.

func (BadFormat) Error

func (e BadFormat) Error() string

func (BadFormat) Text

func (e BadFormat) Text() string

Text returns human readable error text.

func (BadFormat) Unwrap

func (e BadFormat) Unwrap() error

type Context

type Context struct {
	Name string
	Data interface{}
}

Context represents error contextual information.

type Contexter

type Contexter interface {
	Context() Context
}

Contexter can return Context.

type Error

type Error interface {
	error
	Unwrap() error
	Text() string
	Contexter
}

Error represents service error.

func NewBadFormat

func NewBadFormat(err error) Error

NewBadFormat constructs BadFormat error.

func NewInternal

func NewInternal(err error) Error

NewInternal constructs Internal error.

func NewInvalData

func NewInvalData(err error, invalid map[string]string) Error

NewInvalData constructs InvalData error.

func NewNotAuthed

func NewNotAuthed(err error) Error

NewNotAuthed constructs NotAuthed error.

type Internal

type Internal struct {
	// contains filtered or unexported fields
}

Internal wraps error signaling it is an internal one.

func (Internal) Context

func (e Internal) Context() Context

Context returns error Context.

func (Internal) Error

func (e Internal) Error() string

func (Internal) Text

func (e Internal) Text() string

Text returns human readable error text.

func (Internal) Unwrap

func (e Internal) Unwrap() error

type InvalData

type InvalData struct {
	// contains filtered or unexported fields
}

InvalData wraps error due to invalid data.

func (InvalData) Context

func (e InvalData) Context() Context

Context returns error Context.

func (InvalData) Error

func (e InvalData) Error() string

func (InvalData) Text

func (e InvalData) Text() string

Text returns human readable error text.

func (InvalData) Unwrap

func (e InvalData) Unwrap() error

type NotAuthed

type NotAuthed struct {
	// contains filtered or unexported fields
}

NotAuthed wraps error due to Authentication.

func (NotAuthed) Context

func (e NotAuthed) Context() Context

Context returns error Context.

func (NotAuthed) Error

func (e NotAuthed) Error() string

func (NotAuthed) Text

func (e NotAuthed) Text() string

Text returns human readable error text.

func (NotAuthed) Unwrap

func (e NotAuthed) Unwrap() error

Jump to

Keyboard shortcuts

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