errs

package
Version: v0.0.0-...-d33463d Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package errs of the Dataflow kit lists specific error types like ParseError, BadPayload. When trying to differentiate between different errors or to carry helpful payload own types are needed.

Index

Constants

View Source
const (
	ErrNoParts                  = "no parts found"
	ErrNoSelectors              = "no selectors found"
	ErrEmptyResults             = "empty results"
	ErrNoCommonAncestor         = "no common ancestor for selectors found"
	ErrNoPartOrSelectorProvided = "no selector/name provided for %s"
)
View Source
const (
	EOF      = "End of payload results"
	NextPage = "Next page results"
	NoKey    = "Key %s not found"
)

Exported Storage Result errors

Variables

This section is empty.

Functions

This section is empty.

Types

type BadPayload

type BadPayload struct {
	ErrText string
}

BadPayload error is returned if Payload is invalid 400

func (BadPayload) Error

func (e BadPayload) Error() string

func (BadPayload) Status

func (e BadPayload) Status() int

type Cancel

type Cancel struct {
}

Cancel error inform about operation canceled by user

func (Cancel) Error

func (c Cancel) Error() string

type ErrStorageResult

type ErrStorageResult struct {
	Err string
}

ErrStorageResult represent storage results reader errors

func (*ErrStorageResult) Error

func (e *ErrStorageResult) Error() string

type Error

type Error interface {
	error
	Status() int
}

Error represents a handler error. It provides methods for a HTTP status code and embeds the built-in error interface.

type NotError

type NotError struct {
	Message string
}

func (NotError) Error

func (e NotError) Error() string

type ParseError

type ParseError struct {
	URL string
	Err error
}

func (ParseError) Error

func (e ParseError) Error() string

type StatusError

type StatusError struct {
	Code int
	Err  error
}

StatusError represents an error with an associated HTTP status code.

func (StatusError) Error

func (se StatusError) Error() string

Allows StatusError to satisfy the error interface.

func (StatusError) Status

func (se StatusError) Status() int

Returns our HTTP status code.

Source Files

Jump to

Keyboard shortcuts

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