ginx

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fail added in v1.0.5

func Fail(c *gin.Context, code int, msg string, err error, returnType ReturnType)

Fail 错误消息

func GinDefault

func GinDefault() *ginx

GinDefault 通过gin.Default创建ginx

func GinNew

func GinNew() *ginx

GinNew 通过gin.New创建ginx

func New

func New(e *gin.Engine) *ginx

New 创建GINX 基于gin的封装结构体

func Success added in v1.0.5

func Success(c *gin.Context, msg string, data interface{}, returnType ReturnType)

Success 成功消息

Types

type ReturnType added in v1.0.5

type ReturnType int
const (
	ReturnXml ReturnType = iota
	ReturnYml
	ReturnJson
	ReturnJsonp
)

type Router

type Router interface {
	Execute(e *gin.Engine)
}

Router ginx路由 所有路由级结构体均需引用并实现Execute方法

Jump to

Keyboard shortcuts

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