helper

package
v0.0.0-...-66c88e8 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2019 License: MIT Imports: 13 Imported by: 5

Documentation

Index

Constants

View Source
const (
	MethodGet  = "get"
	MethodPost = "post"

	Token     = "token"
	SessionID = "sessionID"
)

Variables

This section is empty.

Functions

func GetDiseaseID

func GetDiseaseID(c *gin.Context) (diseaseID int, err error)

func GetFoodID

func GetFoodID(c *gin.Context) (foodID int, err error)

获取食物ID

func GetFoodKindID

func GetFoodKindID(c *gin.Context) (kindID int, err error)

获取食物ID

func GetJpegImg

func GetJpegImg(url string) (path string, err error)

func GetKeyWord

func GetKeyWord(c *gin.Context) (keyword string, err error)

func GetKindID

func GetKindID(c *gin.Context) (kindID int, err error)

获取食物ID2

func GetUserID

func GetUserID(token string) (userID int, err error)

获取用户ID

func VerifyToken

func VerifyToken(c *gin.Context) (success bool, userID int)

验证token

Types

This section is empty.

Jump to

Keyboard shortcuts

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