apierrors

package
v0.0.0-...-1c213c1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsUnprocessibleEntity

func AsUnprocessibleEntity(err error, detail string, errTypes ...ApiError) error

func ForbiddenAsNotFound

func ForbiddenAsNotFound(err error) error

func FromK8sError

func FromK8sError(err error, resourceType string) error

func NotFoundAsUnprocessableEntity

func NotFoundAsUnprocessableEntity(err error, detail string) error

Types

type ApiError

type ApiError interface {
	Detail() string
	Title() string
	Code() int
	HttpStatus() int
	Unwrap() error
	Error() string
}

type ForbiddenError

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

func NewForbiddenError

func NewForbiddenError(cause error, resourceType string) ForbiddenError

func (ForbiddenError) Code

func (e ForbiddenError) Code() int

func (ForbiddenError) Detail

func (e ForbiddenError) Detail() string

func (ForbiddenError) Error

func (e ForbiddenError) Error() string

func (ForbiddenError) HttpStatus

func (e ForbiddenError) HttpStatus() int

func (ForbiddenError) ResourceType

func (e ForbiddenError) ResourceType() string

func (ForbiddenError) Title

func (e ForbiddenError) Title() string

func (ForbiddenError) Unwrap

func (e ForbiddenError) Unwrap() error

type InvalidAuthError

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

func NewInvalidAuthError

func NewInvalidAuthError(cause error) InvalidAuthError

func (InvalidAuthError) Code

func (e InvalidAuthError) Code() int

func (InvalidAuthError) Detail

func (e InvalidAuthError) Detail() string

func (InvalidAuthError) Error

func (e InvalidAuthError) Error() string

func (InvalidAuthError) HttpStatus

func (e InvalidAuthError) HttpStatus() int

func (InvalidAuthError) Title

func (e InvalidAuthError) Title() string

func (InvalidAuthError) Unwrap

func (e InvalidAuthError) Unwrap() error

type InvalidRequestError

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

func NewInvalidRequestError

func NewInvalidRequestError(cause error, detail string) InvalidRequestError

func (InvalidRequestError) Code

func (e InvalidRequestError) Code() int

func (InvalidRequestError) Detail

func (e InvalidRequestError) Detail() string

func (InvalidRequestError) Error

func (e InvalidRequestError) Error() string

func (InvalidRequestError) HttpStatus

func (e InvalidRequestError) HttpStatus() int

func (InvalidRequestError) Title

func (e InvalidRequestError) Title() string

func (InvalidRequestError) Unwrap

func (e InvalidRequestError) Unwrap() error

type MessageParseError

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

func NewMessageParseError

func NewMessageParseError(cause error) MessageParseError

func (MessageParseError) Code

func (e MessageParseError) Code() int

func (MessageParseError) Detail

func (e MessageParseError) Detail() string

func (MessageParseError) Error

func (e MessageParseError) Error() string

func (MessageParseError) HttpStatus

func (e MessageParseError) HttpStatus() int

func (MessageParseError) Title

func (e MessageParseError) Title() string

func (MessageParseError) Unwrap

func (e MessageParseError) Unwrap() error

type NotAuthenticatedError

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

func NewNotAuthenticatedError

func NewNotAuthenticatedError(cause error) NotAuthenticatedError

func (NotAuthenticatedError) Code

func (e NotAuthenticatedError) Code() int

func (NotAuthenticatedError) Detail

func (e NotAuthenticatedError) Detail() string

func (NotAuthenticatedError) Error

func (e NotAuthenticatedError) Error() string

func (NotAuthenticatedError) HttpStatus

func (e NotAuthenticatedError) HttpStatus() int

func (NotAuthenticatedError) Title

func (e NotAuthenticatedError) Title() string

func (NotAuthenticatedError) Unwrap

func (e NotAuthenticatedError) Unwrap() error

type NotFoundError

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

func NewNotFoundError

func NewNotFoundError(cause error, resourceType string) NotFoundError

func (NotFoundError) Code

func (e NotFoundError) Code() int

func (NotFoundError) Detail

func (e NotFoundError) Detail() string

func (NotFoundError) Error

func (e NotFoundError) Error() string

func (NotFoundError) HttpStatus

func (e NotFoundError) HttpStatus() int

func (NotFoundError) Title

func (e NotFoundError) Title() string

func (NotFoundError) Unwrap

func (e NotFoundError) Unwrap() error

type PackageBitsAlreadyUploadedError

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

func NewPackageBitsAlreadyUploadedError

func NewPackageBitsAlreadyUploadedError(cause error) PackageBitsAlreadyUploadedError

func (PackageBitsAlreadyUploadedError) Code

func (e PackageBitsAlreadyUploadedError) Code() int

func (PackageBitsAlreadyUploadedError) Detail

func (e PackageBitsAlreadyUploadedError) Detail() string

func (PackageBitsAlreadyUploadedError) Error

func (e PackageBitsAlreadyUploadedError) Error() string

func (PackageBitsAlreadyUploadedError) HttpStatus

func (e PackageBitsAlreadyUploadedError) HttpStatus() int

func (PackageBitsAlreadyUploadedError) Title

func (e PackageBitsAlreadyUploadedError) Title() string

func (PackageBitsAlreadyUploadedError) Unwrap

func (e PackageBitsAlreadyUploadedError) Unwrap() error

type UniquenessError

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

func NewUniquenessError

func NewUniquenessError(cause error, detail string) UniquenessError

func (UniquenessError) Code

func (e UniquenessError) Code() int

func (UniquenessError) Detail

func (e UniquenessError) Detail() string

func (UniquenessError) Error

func (e UniquenessError) Error() string

func (UniquenessError) HttpStatus

func (e UniquenessError) HttpStatus() int

func (UniquenessError) Title

func (e UniquenessError) Title() string

func (UniquenessError) Unwrap

func (e UniquenessError) Unwrap() error

type UnknownError

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

func NewUnknownError

func NewUnknownError(cause error) UnknownError

func (UnknownError) Code

func (e UnknownError) Code() int

func (UnknownError) Detail

func (e UnknownError) Detail() string

func (UnknownError) Error

func (e UnknownError) Error() string

func (UnknownError) HttpStatus

func (e UnknownError) HttpStatus() int

func (UnknownError) Title

func (e UnknownError) Title() string

func (UnknownError) Unwrap

func (e UnknownError) Unwrap() error

type UnknownKeyError

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

func NewUnknownKeyError

func NewUnknownKeyError(cause error, validKeys []string) UnknownKeyError

func (UnknownKeyError) Code

func (e UnknownKeyError) Code() int

func (UnknownKeyError) Detail

func (e UnknownKeyError) Detail() string

func (UnknownKeyError) Error

func (e UnknownKeyError) Error() string

func (UnknownKeyError) HttpStatus

func (e UnknownKeyError) HttpStatus() int

func (UnknownKeyError) Title

func (e UnknownKeyError) Title() string

func (UnknownKeyError) Unwrap

func (e UnknownKeyError) Unwrap() error

type UnprocessableEntityError

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

func NewUnprocessableEntityError

func NewUnprocessableEntityError(cause error, detail string) UnprocessableEntityError

func (UnprocessableEntityError) Code

func (e UnprocessableEntityError) Code() int

func (UnprocessableEntityError) Detail

func (e UnprocessableEntityError) Detail() string

func (UnprocessableEntityError) Error

func (e UnprocessableEntityError) Error() string

func (UnprocessableEntityError) HttpStatus

func (e UnprocessableEntityError) HttpStatus() int

func (UnprocessableEntityError) Title

func (e UnprocessableEntityError) Title() string

func (UnprocessableEntityError) Unwrap

func (e UnprocessableEntityError) Unwrap() error

Jump to

Keyboard shortcuts

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