Documentation ¶
Index ¶
- Variables
- func AddUer(user_name string, user_password string) (user_id string, err error)
- func GetBinStatuses(user_id string) (map[string]int32, error)
- func GetBinsInfo(user_id string) ([]pb.BinInfoItem, int, error)
- func GetUserScores() (map[string]int32, error)
- func GetWasteCount(user_id string) (int, map[int]int, error)
- func GetWeekWasteCount(user_id string) (int, map[int]int, error)
- func SearchUserForLogin(user_id string, user_password string) (bool, error)
- func UpdateUser(user_id string, user_name string, user_password string) error
- func UpdateUserScore(user_id string, score int) error
- type Bin
- type BinWasteRelation
- type DBconfig
- type User
- type UserBinRelation
- type Waste
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
Functions ¶
func GetWeekWasteCount ¶
查询最近一周用户垃圾数据统计信息
func SearchUserForLogin ¶
登录验证用户
func UpdateUser ¶
修改用户 (密码、用户名)
Types ¶
type Bin ¶
type Bin struct { Bin_id int `gorm:"column:bin_id;primary_key;AUTO_INCREMENT"` Status int `gorm:"column:status;"` Start_time int `gorm:"column:start_time;"` Ip_address string `gorm:"column:ip_address;"` Angel float32 `gorm:"column:angel;"` Temp float32 `gorm:"column:temp;"` Comments string `gorm:"column:comment;"` }
type BinWasteRelation ¶
type User ¶
type UserBinRelation ¶
Click to show internal directories.
Click to hide internal directories.