gin_router

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Router *gin.Engine

Functions

func JsonExit

func JsonExit(c *gin.Context, err int, msg string, data ...interface{})

JsonExit 返回JSON数据并退出当前HTTP执行函数。

func RequestParser

func RequestParser(args interface{}, c *gin.Context) error

RequestParser 参数的绑定与解析

func Run

func Run(addr string)

func Setup

func Setup(mode string)

Setup 初始化Router

Types

type JsonResponse

type JsonResponse struct {
	Error        int         `json:"error,required"`
	ErrorMessage string      `json:"error_msg,required"`
	Data         interface{} `json:"data",omitempty`
}

Jump to

Keyboard shortcuts

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