apierror

package
v0.8.70 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: GPL-3.0 Imports: 1 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[T any] struct {
	// contains filtered or unexported fields
}

func New

func New(code string, message string, statusCode int) ApiError[*int]

func NewWithData

func NewWithData[T any](code string, message string, statusCode int) ApiError[T]

func (ApiError[T]) Code

func (a ApiError[T]) Code() string

func (ApiError[T]) Error

func (a ApiError[T]) Error() string

func (ApiError[T]) Response

func (a ApiError[T]) Response() interface{}

func (ApiError[T]) SetData

func (a ApiError[T]) SetData(data T) ApiError[T]

func (ApiError[T]) StatusCode

func (a ApiError[T]) StatusCode() int

func (ApiError[T]) Unwrap

func (a ApiError[T]) Unwrap() error

func (ApiError[T]) With

func (a ApiError[T]) With(err error) ApiError[T]

Jump to

Keyboard shortcuts

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