paramkits

package
v0.0.0-...-986a728 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2017 License: MIT Imports: 3 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetParams

func GetParams(c *gin.Context) map[string]string

GetParams 获取所有请求参数

func Required

func Required(c *gin.Context, name string, value interface{}) bool

Types

type BaseParam

type BaseParam struct {
	OS      string `form:"os" json:"os"`
	Net     string `form:"net" json:"net"`
	Channel string `form:"channel" json:"channel"`
	AppVer  string `form:"app_ver" json:"app_ver"`
}

BaseParam 请求基础参数

type ClientInfo

type ClientInfo struct {
	UserAgent string
	IP        string
}

ClientInfo 用户快速获取访问信息

func ParseClientInfo

func ParseClientInfo(c *gin.Context) ClientInfo

ParseClientInfo new client info

Jump to

Keyboard shortcuts

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