res

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const OK = 200

Variables

This section is empty.

Functions

func Error

func Error(ctx *gin.Context, err error)

func Error400

func Error400(ctx *gin.Context)

func Error500

func Error500(ctx *gin.Context)

func Fail

func Fail(ctx *gin.Context, e *errs.Errors)

func SetCookie

func SetCookie(ctx *gin.Context, key string, value string, expire int64)

func Success

func Success(ctx *gin.Context, data any)

Types

type Page

type Page struct {
	Total       int64 `json:"total"`
	List        any   `json:"list"`
	PageSize    int64 `json:"pageSize"`
	CurrentPage int64 `json:"currentPage"`
}

type Result

type Result struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data any    `json:"data"`
}

Jump to

Keyboard shortcuts

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