apierror

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Message string `json:"message"`
	Field   string `json:"field,omitempty"`

} // @name APIError

type Errors

type Errors struct {
	Errors   []Error `json:"errors"`
	HttpCode int     `json:"code"`

} // @name APIErrors

func New

func New(errs ...Error) *Errors

func (*Errors) AddError

func (ae *Errors) AddError(err error, opts ...Option) *Errors

func (Errors) Error

func (ae Errors) Error() string

func (*Errors) SetHttpCode

func (ae *Errors) SetHttpCode(code int) *Errors

type Option

type Option func(*Error)

func WithField

func WithField(v string) Option

Jump to

Keyboard shortcuts

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