errors

package
v0.0.0-...-d389d3b Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	HTTPStatus int
	Message    string
	// contains filtered or unexported fields
}

func NewAPIError

func NewAPIError(options ...APIErrorOption) *APIError

func (APIError) Error

func (a APIError) Error() string

func (APIError) Unwrap

func (a APIError) Unwrap() error

type APIErrorOption

type APIErrorOption func(apiError *APIError)

APIErrorOption definition.

func WithError

func WithError(err error) APIErrorOption

func WithMessage

func WithMessage(message string) APIErrorOption

func WithStatusAndError

func WithStatusAndError(httpStatus int, err error) APIErrorOption

func WithStatusAndMessage

func WithStatusAndMessage(httpStatus int, message string) APIErrorOption

func WithStatusAndMessageAndError

func WithStatusAndMessageAndError(httpStatus int, message string, err error) APIErrorOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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