app

package
v0.0.0-...-e398b48 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindValidate

func BindValidate(c echo.Context, i interface{}) error

BindValidate is bind validate

func GetCookie

func GetCookie(c echo.Context, name string) string

GetCookie get cookie

func GetReqBody

func GetReqBody(c echo.Context) []byte

GetReqBody get request body

func GetUserLang

func GetUserLang(c echo.Context) string

get user language

func HelloWorld

func HelloWorld(c echo.Context) error

HelloWorld hello for API

func IsURLOrDataURI

func IsURLOrDataURI(fl validator.FieldLevel) bool

IsURLOrDataURI

func Ping

func Ping(c echo.Context) error

Ping is ping

Types

type Error

type Error struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"-"`
}

Error is error

func Throw

func Throw(i interface{}, code ...int) *Error

Throw is throw err

func (*Error) Error

func (e *Error) Error() string

type JSON

type JSON map[string]interface{}

func (JSON) Error

func (body JSON) Error() string

Error

type Result

type Result struct {
	Code   int    `json:"code"`
	Status string `json:"status"`
	Result any    `json:"result"`
}

Result is send message

func Success

func Success(data any) *Result

Success

func (Result) Error

func (body Result) Error() string

Error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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