Back to godoc.org

Package user

v0.0.0-...-66c88e8
Latest Go to latest

The latest major version is .

Published: Jun 15, 2019 | License: MIT | Module: github.com/TateYdq/DietRegimen

Index

Variables

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

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)

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"`
}

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier