common

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(app *core.App) func(c fiber.Ctx) error

身份认证

func IsEmpty

func IsEmpty(values ...string) bool

func IsLogined added in v0.2.0

func IsLogined(app *core.App, c fiber.Ctx) bool

func Param

func Param(app *core.App, c fiber.Ctx, dest interface{}) (isVaild bool, resp error)

func RespFail

func RespFail(c fiber.Ctx, code int, msg string, data interface{}) error

func RespMissingParameters

func RespMissingParameters(c fiber.Ctx) error

func RespServerError

func RespServerError(c fiber.Ctx, errs ...error) error

func RespSuccess

func RespSuccess(c fiber.Ctx, msg string, data interface{}) error

func RespSuccessWithStatus

func RespSuccessWithStatus(c fiber.Ctx, code int, msg string, data interface{}) error

func ValidateParams

func ValidateParams(app *core.App, c fiber.Ctx, dest interface{}) (isVaild bool, resp error)

Types

type Resp

type Resp struct {
	Success bool        `json:"success"`
	Msg     string      `json:"msg"`
	Data    interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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