Documentation ¶
Index ¶
- Variables
- func Authentication() gin.HandlerFunc
- func BalanceAdd(c *gin.Context)
- func BalanceDetailAdd(c *gin.Context)
- func BalanceDetailList(c *gin.Context)
- func ChipAdd(c *gin.Context)
- func ChipList(c *gin.Context)
- func DecodeToken(tokenStr string) (claims jwt.MapClaims, code int32)
- func GenPassword(certificate string) (passHash string, err error)
- func GetToken(u *dao.UserAuth) (tokenStr string, err error)
- func GuessAdd(c *gin.Context)
- func GuessDelete(c *gin.Context)
- func GuessRecordAdd(c *gin.Context)
- func GuessRecordList(c *gin.Context)
- func GuessTypeAdd(c *gin.Context)
- func GuessTypeList(c *gin.Context)
- func LoadChipTypeConf()
- func ResetPassword(c *gin.Context)
- func SettleList(c *gin.Context)
- func SettleTypeAdd(c *gin.Context)
- func SignIn(c *gin.Context)
- func SignUp(c *gin.Context)
- func TeamList(c *gin.Context)
- type ChipTypeConf
- type GuessInfo
- type GuessListConf
- type GuessRecord
- type GuessRecordConf
- type Info
- type Option
- type UserAuth
Constants ¶
This section is empty.
Variables ¶
View Source
var ChipTypeConfs = []*ChipTypeConf{}
ChipTypeConfs ...
View Source
var CodeMap = map[int32]string{
2000001: "token为空",
2000002: "wrong token",
2000003: "Invalid token1",
2000004: "Invalid token2",
}
CodeMap 返回码映射表
Functions ¶
func DecodeToken ¶
DecodeToken 解析token
func GenPassword ¶
GenPassword ...
Types ¶
type ChipTypeConf ¶
type ChipTypeConf struct { ID int64 `json:"id"` Name string `json:"name" form:"name" binding:"required"` Desc string `json:"desc" form:"desc" binding:"required"` }
ChipTypeConf ...
type GuessInfo ¶
type GuessInfo struct { ID int64 `json:"id,omitempty" form:"id" db:"id"` UID int64 `json:"uid" form:"uid" db:"uid"` Name string `json:"name" form:"name" db:"name" ` SettleTypeID int64 `json:"settle_type_id" form:"settle_type_id" db:"settle_type_id" ` GuessTypeID int64 `json:"guess_type_id" form:"guess_type_id" db:"chip_type_id" ` ChipTypeID int64 `json:"chip_type_id" form:"chip_type_id" db:"chip_type_id" ` Result int64 `json:"result" form:"result" db:"result" ` FundPool int64 `json:"fund_pool" form:"fund_pool" db:"fund_pool"` Info Info `json:"Info" form:"Info" db:"Info" ` StartTime string `json:"start_time" form:"start_time" db:"start_time" ` EndTime string `json:"end_time" form:"end_time" db:"end_time" ` CreatedAt time.Time `json:"created_at" form:"created_at" db:"created_at"` UpdateAt time.Time `json:"updated_at" form:"updated_at" db:"updated_at"` Status int8 `json:"status" form:"updated_at" db:"status"` }
GuessInfo 竞猜信息表
type GuessListConf ¶
type GuessListConf struct { Num int64 `json:"num" form:"num" binding:"required"` Page int64 `json:"page" form:"page" binding:"required"` }
GuessListConf 参数
type GuessRecord ¶
type GuessRecord struct { ID int64 `json:"id omitempty" form:"id"` UID int64 `json:"uid" form:"uid" binding:"required"` GID int64 `json:"gid" form:"gid" binding:"required"` Amount int64 `json:"Amount" form:"Amount" binding:"required"` GuessTypeID int64 `json:"guess_type_id" form:"guess_type_id" binding:"required"` ChipTypeID int64 `json:"chip_type_id" form:"chip_type_id" binding:"required"` Result int64 `json:"result" form:"result" binding:"required"` Earnings int64 `json:"earnings" form:"earnings" binding:"required"` Odds int64 `json:"odds" form:"odds" binding:"required"` CreatedAt time.Time `json:"created_at" form:"created_at"` UpdateAt time.Time `json:"updated_at" form:"updated_at"` Status int8 `json:"status" form:"updated_at"` }
GuessRecord 竞猜信息
type GuessRecordConf ¶
type GuessRecordConf struct { Num int64 `json:"num" form:"num" binding:"required"` Page int64 `json:"page" form:"page" binding:"required"` }
GuessRecordConf 参数
type Option ¶
type Option struct { Name string `json:"name" form:"name" db:"name"` Value int `json:"value" form:"value" db:"name"` }
Option ...
type UserAuth ¶
type UserAuth struct { ID int64 `form:"id" json:"id,omitempty"` AuthType int8 `form:"auth_type" json:"auth_type"` Identifier string `form:"identifier" json:"identifier" binding:"required"` Certificate string `form:"certificate" json:"certificate" binding:"required"` CreatedAt time.Time `form:"created_at" json:"created_at"` UpdateAt time.Time `form:"updated_at" json:"updated_at"` Status int8 `form:"status" json:"status"` }
UserAuth ...
Click to show internal directories.
Click to hide internal directories.