web

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Controller

func Controller(list ...func(g *gin.RouterGroup))

Controller 用于controller注册路由

func DBService added in v1.0.4

func DBService[P any, R any](c *gin.Context, f func(db *gorm.DB, param P) (R, error))

func Init

func Init()

Init 对外提供初始化路由的方法

func Interceptor

func Interceptor(handlers ...func(g *gin.Context))

Interceptor 用于注册拦截器

func Service

func Service[P any, R any](c *gin.Context, f func(P) (R, error))

Types

type JSON

type JSON 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