Documentation ¶
Index ¶
- Variables
- func DoReq[Tr any](req *http.Request) (ret Tr, status int, err error)
- func HttpGet[Tr any](path string, token string, arg url.Values) (ret Tr, status int, err error)
- func HttpPost[Ta, Tr any](path string, token string, arg *Ta) (ret Tr, status int, err error)
- func ReqAccessSet(cid, uid uint64, al AL) (err error)
- func ReqPing() (err error)
- func ReqRtpGet(cid, uid uint64, all bool) (mrtp float64, err error)
- func ReqRtpSet(cid, uid uint64, mrtp float64) (err error)
- func ReqWalletAdd(cid, uid uint64, sum float64) (wallet float64, err error)
- func ReqWalletGet(cid, uid uint64) (wallet float64, err error)
- type AL
- type AjaxErr
- type ArgAccessGet
- type ArgAccessSet
- type ArgClubCashin
- type ArgClubInfo
- type ArgPropGet
- type ArgRtpGet
- type ArgRtpSet
- type ArgSignIn
- type ArgSignIs
- type ArgUserIs
- type ArgWalletAdd
- type AuthResp
- type Props
- type RetAccessGet
- type RetClubCashin
- type RetClubInfo
- type RetClubList
- type RetPropGet
- type RetRtpGet
- type RetSignIs
- type RetUserIs
- type RetWalletGet
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Clubs = map[string]uint64{} Users = map[string]*User{} Cfg = cfg.Cfg // shortcut )
View Source
var (
ErrAlienServer = errors.New("server is not slotopol server")
)
Functions ¶
func ReqAccessSet ¶
func ReqWalletGet ¶
Types ¶
type AL ¶
type AL uint
Access level.
const ( ALmem AL = 1 << iota // user have access to club ALgame // can change club game settings ALuser // can change user balance and move user money to/from club deposit ALclub // can change club bank, fund, deposit ALadmin // can change same access levels to other users ALall = ALgame | ALuser | ALclub | ALadmin )
type AjaxErr ¶
type ArgAccessGet ¶
type ArgAccessSet ¶
type ArgClubCashin ¶
type ArgClubCashin struct { XMLName xml.Name `json:"-" yaml:"-" xml:"arg"` CID uint64 `json:"cid" yaml:"cid" xml:"cid,attr"` BankSum float64 `json:"banksum" yaml:"banksum" xml:"banksum"` FundSum float64 `json:"fundsum" yaml:"fundsum" xml:"fundsum"` LockSum float64 `json:"locksum" yaml:"locksum" xml:"locksum"` }
type ArgClubInfo ¶
type ArgPropGet ¶
type ArgSignIn ¶
type ArgSignIn struct { XMLName xml.Name `json:"-" yaml:"-" xml:"arg"` UID uint64 `json:"uid" yaml:"uid" xml:"uid"` Email string `json:"email" yaml:"email" xml:"email"` Secret string `json:"secret" yaml:"secret,omitempty" xml:"secret,omitempty"` HS256 string `json:"hs256,omitempty" yaml:"hs256,omitempty" xml:"hs256,omitempty"` SigTime string `json:"sigtime,omitempty" yaml:"sigtime,omitempty" xml:"sigtime,omitempty"` Code uint32 `json:"code,omitempty" yaml:"code,omitempty" xml:"code,omitempty"` }
type ArgWalletAdd ¶
type AuthResp ¶
type AuthResp struct { XMLName xml.Name `json:"-" yaml:"-" xml:"ret"` UID uint64 `json:"uid" yaml:"uid" xml:"uid"` Email string `json:"email" yaml:"email" xml:"email"` Access string `json:"access" yaml:"access" xml:"access"` Refrsh string `json:"refrsh" yaml:"refrsh" xml:"refrsh"` Expire string `json:"expire" yaml:"expire" xml:"expire"` Living string `json:"living" yaml:"living" xml:"living"` }
var Admin AuthResp
func ReqRefresh ¶
type Props ¶
type Props struct { Wallet float64 `json:"wallet" yaml:"wallet" xml:"wallet"` // in coins Access AL `json:"access" yaml:"access" xml:"access"` // access level MRTP float64 `json:"mrtp" yaml:"mrtp" xml:"mrtp"` // personal master RTP // contains filtered or unexported fields }
func ReqPropGet ¶
type RetAccessGet ¶
type RetClubCashin ¶
type RetClubCashin struct { XMLName xml.Name `json:"-" yaml:"-" xml:"ret"` BID uint64 `json:"bid" yaml:"bid" xml:"bid,attr"` Bank float64 `json:"bank" yaml:"bank" xml:"bank"` Fund float64 `json:"fund" yaml:"fund" xml:"fund"` Lock float64 `json:"lock" yaml:"lock" xml:"lock"` }
func ClubCashin ¶
func ClubCashin(cid uint64, bsum, fsum, lsum float64) (ret RetClubCashin, err error)
type RetClubInfo ¶
type RetClubInfo struct { XMLName xml.Name `json:"-" yaml:"-" xml:"ret"` Name string `json:"name,omitempty" yaml:"name,omitempty" xml:"name,omitempty"` Bank float64 `json:"bank" yaml:"bank" xml:"bank"` // users win/lost balance, in coins Fund float64 `json:"fund" yaml:"fund" xml:"fund"` // jackpot fund, in coins Lock float64 `json:"lock" yaml:"lock" xml:"lock"` // not changed deposit within games Rate float64 `json:"rate" yaml:"rate" xml:"rate"` // jackpot rate for games with progressive jackpot MRTP float64 `json:"mrtp" yaml:"mrtp" xml:"mrtp"` // master RTP }
func ReqClubInfo ¶
func ReqClubInfo(cid uint64) (ret RetClubInfo, err error)
type RetClubList ¶
type RetClubList struct { XMLName xml.Name `json:"-" yaml:"-" xml:"ret"` List []clubitem `json:"list" yaml:"list" xml:"list>club" form:"list"` }
func ReqClubList ¶
func ReqClubList() (ret RetClubList, err error)
type RetPropGet ¶
type RetWalletGet ¶
type User ¶
Click to show internal directories.
Click to hide internal directories.