api

package
v0.0.0-...-5fcdcab Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpErrorHandler

func HttpErrorHandler(c *echo.Context, err error)

Types

type Error

type Error struct {
	Status int
	Errors any
}

func (*Error) Error

func (e *Error) Error() string

type Response

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

func NewResponse

func NewResponse(c *echo.Context) *Response

func (*Response) Send

func (r *Response) Send() error

func (*Response) SendMessage

func (r *Response) SendMessage(message string) error

func (*Response) SendOk

func (r *Response) SendOk() error

func (*Response) SetData

func (r *Response) SetData(data any) *Response

func (*Response) SetErrors

func (r *Response) SetErrors(err error) *Response

func (*Response) SetMeta

func (r *Response) SetMeta(meta any) *Response

func (*Response) SetStatus

func (r *Response) SetStatus(status int) *Response

type ValidationError

type ValidationError map[string][]string

func (ValidationError) Add

func (ve ValidationError) Add(field string, messages ...string)

func (ValidationError) AddError

func (ve ValidationError) AddError(field string, err error)

func (ValidationError) Error

func (ve ValidationError) Error() string

func (ValidationError) IsFail

func (ve ValidationError) IsFail() bool

Jump to

Keyboard shortcuts

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