apperrors

package
v0.0.0-...-470388c Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 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 AppError

type AppError interface {
	error
	HTTPCode() int
	HTTPResponse() map[string]any
}

type ConflictError

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

func NewConflictError

func NewConflictError(resource string, err error) ConflictError

func (ConflictError) Error

func (e ConflictError) Error() string

func (ConflictError) HTTPCode

func (e ConflictError) HTTPCode() int

func (ConflictError) HTTPResponse

func (e ConflictError) HTTPResponse() map[string]any

type InvalidParamsError

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

func NewInvalidParamsError

func NewInvalidParamsError(resource string, err error) InvalidParamsError

func (InvalidParamsError) Error

func (e InvalidParamsError) Error() string

func (InvalidParamsError) HTTPCode

func (e InvalidParamsError) HTTPCode() int

func (InvalidParamsError) HTTPResponse

func (e InvalidParamsError) HTTPResponse() map[string]any

type NotFoundError

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

NotFoundError

func NewNotFoundError

func NewNotFoundError(resource string) NotFoundError

func (NotFoundError) Error

func (e NotFoundError) Error() string

func (NotFoundError) HTTPCode

func (e NotFoundError) HTTPCode() int

func (NotFoundError) HTTPResponse

func (e NotFoundError) HTTPResponse() map[string]any

type PermissionError

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

PermissionError

func NewPermissionError

func NewPermissionError(resource string) PermissionError

func (PermissionError) Error

func (e PermissionError) Error() string

func (PermissionError) HTTPCode

func (e PermissionError) HTTPCode() int

func (PermissionError) HTTPResponse

func (e PermissionError) HTTPResponse() map[string]any

type ServerError

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

ServerError

func NewServerError

func NewServerError(err error) ServerError

func (ServerError) Error

func (e ServerError) Error() string

func (ServerError) HTTPCode

func (e ServerError) HTTPCode() int

func (ServerError) HTTPResponse

func (e ServerError) HTTPResponse() map[string]any

Jump to

Keyboard shortcuts

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