user

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: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WechatUrl = "https://api.weixin.qq.com/sns/jscode2session?appid=%v&secret=%v&js_code=%v&grant_type=authorization_code"
)

Functions

func CollectDisease

func CollectDisease(c *gin.Context)

func CollectFood

func CollectFood(c *gin.Context)

func GetCollectDisease

func GetCollectDisease(c *gin.Context)

func GetCollectFood

func GetCollectFood(c *gin.Context)

func GetUserInfo

func GetUserInfo(c *gin.Context)

需验证token

func UpdateUserInfo

func UpdateUserInfo(c *gin.Context)

需验证token

func UploadUserImage

func UploadUserImage(c *gin.Context)

func UserLogin

func UserLogin(c *gin.Context)

Types

type CollectDiseaseRequest

type CollectDiseaseRequest struct {
	DiseaseID int `json:"disease_id"`
}

type CollectFoodRequest

type CollectFoodRequest struct {
	Token  string `json:"token"`
	FoodID int    `json:"food_id"`
}

type UpdateUserInfoRequest

type UpdateUserInfoRequest struct {
	UserInfo database.UserInfo `json:"user_info"`
}

type UserCollectDiseaseInfo

type UserCollectDiseaseInfo struct {
	ID         int    `json:"id"`
	UserID     int    `json:"user_id"`
	DiseaseID  int    `json:"disease_id"`
	RecordTime string `json:"record_time"`
}

type UserCollectFoodInfo

type UserCollectFoodInfo struct {
	ID         int    `json:"id"`
	UserID     int    `json:"user_id"`
	FoodID     int    `json:"food_id"`
	RecordTime string `json:"record_time"`
}

type WechatLoginReponseBody

type WechatLoginReponseBody struct {
	Openid     string `json:"openid"`
	SessionKey string `json:"session_key"`
	Errcode    int    `json:"errcode"`
	Errmsg     string `json:"errmsg"`
}

Jump to

Keyboard shortcuts

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