Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUserIDByName ¶
Types ¶
type Claims ¶
type Claims struct {
ID int `json:"claim_id"`
AuthID int `json:"auth_id"`
Type string `json:"type"`
Value string `json:"value"`
}
func GetUserClaims ¶
type TAuth ¶
type TAuth struct {
ID bson.ObjectId `json:"id" bson:"_id"`
Role string `json:"role" bson:"role"`
Username string `json:"username" bson:"name"`
Password string `json:"password" bson:"password"`
}
func (*TAuth) DeleteAuthByName ¶
type TBasic ¶
type TBasic struct {
ID bson.ObjectId `json:"id" bson:"_id"`
UserNum int `json:"user_num" bson:"user_num"`
ShopNum int `json:"shop_num" bson:"shop_num"`
ItemNum int `json:"item_num" bson:"item_num"`
RecordNum int `json:"record_num" bson:"record_num"`
}
var Basic TBasic
func (*TBasic) DeleteItem ¶
func (*TBasic) DeleteShop ¶
func (*TBasic) DeleteUser ¶
type TProduct ¶
type TProduct struct {
ID bson.ObjectId `json:"item_id" bson:"_id"`
StoreID bson.ObjectId `json:"store_id" bson:"store_id"`
Name string `json:"item_name" bson:"item_name"`
Price float64 `json:"item_price" bson:"item_price"`
Score float64 `json:"item_score" bson:"item_score"`
SaleCount int `json:"item_salecount" bson:"item_salecount"`
Brand string `json:"item_brand" bson:"item_brand"`
Timestamp int64 `json:"item_timestamp" bson:"item_timestamp"`
}
func GetAllProducts ¶
func GetAllProductsByPage ¶
func GetProductsByPage ¶
func (*TProduct) AddProduct ¶
func (*TProduct) DeleteProduct ¶
func (*TProduct) GetProductByID ¶
func (*TProduct) GetProductsByStoreID ¶
func (*TProduct) UpdateProduct ¶
type TRecommend ¶
type TRecommend struct {
UserID string `json:"user_id"`
Query string `json:"query"`
PageSize int `json:"page_size"`
PageNum int `json:"page_num"`
}
func (*TRecommend) AddRecommend ¶
func (t *TRecommend) AddRecommend() error
func (*TRecommend) AddRecommendByOrder ¶
func (t *TRecommend) AddRecommendByOrder() error
func (*TRecommend) GetRecommend ¶
func (t *TRecommend) GetRecommend() ([]TProduct, error)
type TRecord ¶
type TRecord struct {
RecordID bson.ObjectId `json:"record_id" bson:"_id"`
UserID bson.ObjectId `json:"user_id" bson:"user_id"`
ItemID bson.ObjectId `json:"item_id" bson:"item_id"`
Status int `json:"is_trade" bson:"is_trade"`
Query string `json:"query" bson:"query"`
Timestamp int64 `json:"timestamp" bson:"timestamp"`
}
func GetAllRecords ¶
func (*TRecord) GetRecordsByItemID ¶
func (*TRecord) GetRecordsByUserID ¶
type TStores ¶
type TStores struct {
ID bson.ObjectId `json:"store_id" bson:"_id"`
Name string `json:"name" bson:"name"`
NickName string `json:"store_name" bson:"store_name"`
Level float64 `json:"store_level" bson:"store_level"`
City string `json:"store_city" bson:"store_city"`
Timestamp int64 `json:"timestamp" bson:"timestamp"`
}
func GetAllStores ¶
func GetStoresByPage ¶
func (*TStores) DeleteStore ¶
func (*TStores) GetStoreByStoreID ¶
func (*TStores) UpdateStore ¶
type TUser ¶
type TUser struct {
ID bson.ObjectId `json:"user_id" bson:"_id"`
Name string `json:"name" bson:"name"`
NickName string `json:"user_name" bson:"user_name"`
Age int `json:"user_age" bson:"user_age"`
Gender int `json:"user_gender" bson:"user_gender"`
City string `json:"user_city" bson:"user_city"`
Timestamp int64 `json:"user_timestamp" bson:"user_timestamp"`
Historysum float64 `json:"user_historysum" bson:"user_historysum"`
}
func GetAllUsers ¶
func (*TUser) DeleteUser ¶
func (*TUser) UpdateUser ¶
Click to show internal directories.
Click to hide internal directories.