Versions in this module Expand all Collapse all v0 v0.8.0 Jan 22, 2025 Changes in this version + const AEC_game_info_noscene + const AEC_game_join_noscene + const AEC_game_new_noaccess + const AEC_game_new_noalias + const AEC_game_new_nobind + const AEC_game_new_noclub + const AEC_game_new_nouser + const AEC_game_new_sql + const AEC_game_rtpget_noscene + const AEC_keno_betget_noscene + const AEC_keno_betset_noscene + const AEC_keno_selget_noscene + const AEC_keno_selgetslice_noscene + const AEC_keno_selset_badsel + const AEC_keno_selset_noscene + const AEC_keno_selsetslice_badsel + const AEC_keno_selsetslice_noscene + const AEC_keno_spin_noscene + const AEC_slot_betget_noscene + const AEC_slot_betset_noscene + const AEC_slot_collect_noscene + const AEC_slot_doubleup_noscene + const AEC_slot_modeset_noscene + const AEC_slot_selget_noscene + const AEC_slot_selset_badsel + const AEC_slot_selset_noscene + const AEC_slot_spin_badbet + const AEC_slot_spin_badsel + const AEC_slot_spin_noscene + func ApiGameNew(c *gin.Context) + func InitScreen(game any) type Scene + func GetScene(gid uint64) (scene *Scene, err error) v0.7.0 Dec 26, 2024 Changes in this version + const AEC_game_rtpget_noaccess + const AEC_game_rtpget_nobind + const AEC_game_rtpget_noclub + const AEC_game_rtpget_noinfo + const AEC_game_rtpget_notopened + const AEC_game_rtpget_nouser + const AEC_signis_noemail + const AEC_signis_nouid + const AEC_slot_doubleup_nogain + var ErrNoGain = errors.New("no money won") + func SetupRouter(r *gin.Engine) type Club + func MakeClub(cd ClubData) *Club + func (club *Club) AddBank(bank float64) + func (club *Club) AddCash(bank, fund, deposit float64) + func (club *Club) AddDeposit(deposit float64) + func (club *Club) AddFund(fund float64) + func (club *Club) Deposit() float64 + func (club *Club) Get() ClubData + func (club *Club) GetCash() (bank, fund, deposit float64) + func (club *Club) SetName(name string) + type ClubData struct + Bank float64 + CID uint64 + CTime time.Time + Fund float64 + Lock float64 + MRTP float64 + Name string + Rate float64 + UTime time.Time + func (ClubData) TableName() string type SqlBank + func (sb *SqlBank) IsEmpty() bool type SqlStory + func (ss *SqlStory) IsEmpty() bool v0.6.0 Nov 21, 2024 Changes in this version + const AEC_activate_badcode + const AEC_activate_nobind + const AEC_activate_nouser + const AEC_activate_oldcode + const AEC_activate_update + const AEC_auth_absent + const AEC_auth_scheme + const AEC_basic_decode + const AEC_basic_deny + const AEC_basic_nouser + const AEC_club_cashin_bankout + const AEC_club_cashin_fundout + const AEC_club_cashin_lockout + const AEC_club_cashin_noaccess + const AEC_club_cashin_nobind + const AEC_club_cashin_noclub + const AEC_club_cashin_nosum + const AEC_club_cashin_sqlbank + const AEC_club_cashin_sqllog + const AEC_club_info_noaccess + const AEC_club_info_nobind + const AEC_club_info_noclub + const AEC_club_is_nobind + const AEC_club_rename_noaccess + const AEC_club_rename_nobind + const AEC_club_rename_noclub + const AEC_club_rename_update + const AEC_game_info_noaccess + const AEC_game_info_nobind + const AEC_game_info_noprops + const AEC_game_info_notopened + const AEC_game_info_nouser + const AEC_game_join_noaccess + const AEC_game_join_noalias + const AEC_game_join_nobind + const AEC_game_join_noclub + const AEC_game_join_nouser + const AEC_game_join_sql + const AEC_game_part_noaccess + const AEC_game_part_nobind + const AEC_game_part_notopened + const AEC_game_part_nouser + const AEC_game_part_sql + const AEC_game_rdget_noaccess + const AEC_game_rdget_nobind + const AEC_game_rdget_noclub + const AEC_game_rdget_notopened + const AEC_game_rdget_nouser + const AEC_keno_betget_noaccess + const AEC_keno_betget_nobind + const AEC_keno_betget_notopened + const AEC_keno_betget_notslot + const AEC_keno_betset_badbet + const AEC_keno_betset_noaccess + const AEC_keno_betset_nobind + const AEC_keno_betset_notopened + const AEC_keno_betset_notslot + const AEC_keno_selget_noaccess + const AEC_keno_selget_nobind + const AEC_keno_selget_notopened + const AEC_keno_selget_notslot + const AEC_keno_selgetslice_noaccess + const AEC_keno_selgetslice_nobind + const AEC_keno_selgetslice_notopened + const AEC_keno_selgetslice_notslot + const AEC_keno_selset_badlines + const AEC_keno_selset_noaccess + const AEC_keno_selset_nobind + const AEC_keno_selset_notopened + const AEC_keno_selset_notslot + const AEC_keno_selsetslice_badlines + const AEC_keno_selsetslice_noaccess + const AEC_keno_selsetslice_nobind + const AEC_keno_selsetslice_notopened + const AEC_keno_selsetslice_notslot + const AEC_keno_spin_badbank + const AEC_keno_spin_noaccess + const AEC_keno_spin_nobind + const AEC_keno_spin_noclub + const AEC_keno_spin_nomoney + const AEC_keno_spin_noprops + const AEC_keno_spin_notopened + const AEC_keno_spin_notslot + const AEC_keno_spin_nouser + const AEC_keno_spin_sqlbank + const AEC_nomethod + const AEC_nourl + const AEC_prop_alget_noaccess + const AEC_prop_alget_nobind + const AEC_prop_alget_noclub + const AEC_prop_alget_nouser + const AEC_prop_alset_noaccess + const AEC_prop_alset_nobind + const AEC_prop_alset_noclub + const AEC_prop_alset_nolevel + const AEC_prop_alset_noprops + const AEC_prop_alset_nouser + const AEC_prop_alset_sql + const AEC_prop_get_noaccess + const AEC_prop_get_nobind + const AEC_prop_get_noclub + const AEC_prop_get_nouser + const AEC_prop_rtpget_noaccess + const AEC_prop_rtpget_nobind + const AEC_prop_rtpget_noclub + const AEC_prop_rtpget_nouser + const AEC_prop_rtpset_noaccess + const AEC_prop_rtpset_nobind + const AEC_prop_rtpset_noclub + const AEC_prop_rtpset_noprops + const AEC_prop_rtpset_nouser + const AEC_prop_rtpset_sql + const AEC_prop_walletadd_limit + const AEC_prop_walletadd_noaccess + const AEC_prop_walletadd_nobind + const AEC_prop_walletadd_noclub + const AEC_prop_walletadd_nomoney + const AEC_prop_walletadd_noprops + const AEC_prop_walletadd_nouser + const AEC_prop_walletadd_sql + const AEC_prop_walletget_noaccess + const AEC_prop_walletget_nobind + const AEC_prop_walletget_noclub + const AEC_prop_walletget_nouser + const AEC_sendcode_code + const AEC_sendcode_nobind + const AEC_sendcode_nouser + const AEC_sendcode_update + const AEC_signin_activate + const AEC_signin_badcode + const AEC_signin_denyhash + const AEC_signin_denypass + const AEC_signin_hs256 + const AEC_signin_nobind + const AEC_signin_nosecret + const AEC_signin_nouser + const AEC_signin_oldcode + const AEC_signin_sigtime + const AEC_signin_smallsec + const AEC_signin_timeout + const AEC_signis_nobind + const AEC_signup_code + const AEC_signup_nobind + const AEC_signup_smallsec + const AEC_signup_sql + const AEC_slot_betget_noaccess + const AEC_slot_betget_nobind + const AEC_slot_betget_notopened + const AEC_slot_betget_notslot + const AEC_slot_betset_badbet + const AEC_slot_betset_noaccess + const AEC_slot_betset_nobind + const AEC_slot_betset_notopened + const AEC_slot_betset_notslot + const AEC_slot_collect_denied + const AEC_slot_collect_noaccess + const AEC_slot_collect_nobind + const AEC_slot_collect_notopened + const AEC_slot_collect_notslot + const AEC_slot_doubleup_noaccess + const AEC_slot_doubleup_nobind + const AEC_slot_doubleup_noclub + const AEC_slot_doubleup_nomoney + const AEC_slot_doubleup_noprops + const AEC_slot_doubleup_notopened + const AEC_slot_doubleup_notslot + const AEC_slot_doubleup_nouser + const AEC_slot_doubleup_sqlbank + const AEC_slot_modeset_badmode + const AEC_slot_modeset_noaccess + const AEC_slot_modeset_nobind + const AEC_slot_modeset_notopened + const AEC_slot_modeset_notslot + const AEC_slot_selget_noaccess + const AEC_slot_selget_nobind + const AEC_slot_selget_notopened + const AEC_slot_selget_notslot + const AEC_slot_selset_badlines + const AEC_slot_selset_noaccess + const AEC_slot_selset_nobind + const AEC_slot_selset_notopened + const AEC_slot_selset_notslot + const AEC_slot_spin_badbank + const AEC_slot_spin_noaccess + const AEC_slot_spin_nobind + const AEC_slot_spin_noclub + const AEC_slot_spin_nomoney + const AEC_slot_spin_noprops + const AEC_slot_spin_notopened + const AEC_slot_spin_notslot + const AEC_slot_spin_nouser + const AEC_slot_spin_sqlbank + const AEC_token_badclaims + const AEC_token_error + const AEC_token_expired + const AEC_token_issuer + const AEC_token_malform + const AEC_token_notsign + const AEC_token_notyet + const AEC_token_nouser + const AEC_user_delete_noaccess + const AEC_user_delete_nobind + const AEC_user_delete_nosecret + const AEC_user_delete_nouser + const AEC_user_delete_sqlgames + const AEC_user_delete_sqllock + const AEC_user_delete_sqlprops + const AEC_user_delete_sqluser + const AEC_user_is_nobind + const AEC_user_rename_noaccess + const AEC_user_rename_nobind + const AEC_user_rename_nouser + const AEC_user_rename_update + const AEC_user_secret_noaccess + const AEC_user_secret_nobind + const AEC_user_secret_notequ + const AEC_user_secret_nouser + const AEC_user_secret_smallsec + const AEC_user_secret_update + const AECnull + var AuthGetters = []AuthGetter + var BankBat = map[uint64]*SqlBank + var Cfg = cfg.Cfg + var Clubs util.RWMap[uint64, *Club] + var Err404 = errors.New("page not found") + var Err405 = errors.New("method not allowed") + var ErrActivate = errors.New("activation required for this account") + var ErrBadBank = errors.New("can not generate spin with current bank balance") + var ErrBadCode = errors.New("verification code does not pass") + var ErrBadHash = errors.New("hash cannot be decoded in hexadecimal") + var ErrBadJwtID = errors.New("jwt-token id does not refer to registered user") + var ErrBankOut = errors.New("not enough money at bank") + var ErrFundOut = errors.New("not enough money at jackpot fund") + var ErrLockOut = errors.New("not enough money at deposit") + var ErrNoAccess = errors.New("no access rights for this feature") + var ErrNoAddSum = errors.New("no sum to change balance of bank or fund or deposit") + var ErrNoAliase = errors.New("no game alias") + var ErrNoAuth = errors.New("authorization is required") + var ErrNoClub = errors.New("club with given ID does not found") + var ErrNoCred = errors.New("user with given credentials does not registered") + var ErrNoJwtID = errors.New("jwt-token does not have user id") + var ErrNoLevel = errors.New("admin have no privilege to modify specified access level to user") + var ErrNoMoney = errors.New("not enough money on balance") + var ErrNoProps = errors.New("properties for given user and club does not found") + var ErrNoScheme = errors.New("authorization does not have expected scheme") + var ErrNoSecret = errors.New("expected password or SHA25 hash on it and current time as a nonce") + var ErrNoUser = errors.New("user with given ID does not found") + var ErrNotConf = errors.New("password confirmation does not pass") + var ErrNotKeno = errors.New("specified GID refers to non-keno game") + var ErrNotOpened = errors.New("game with given ID is not opened") + var ErrNotPass = errors.New("password is incorrect") + var ErrNotSlot = errors.New("specified GID refers to non-slot game") + var ErrOldCode = errors.New("verification code expired") + var ErrSigOut = errors.New("nonce is expired") + var ErrSigTime = errors.New("signing time can not been recognized (time in RFC3339 expected)") + var ErrSmallKey = errors.New("password too small") + var ErrTooBig = errors.New("given value exceeds the limit") + var ErrZero = errors.New("given value is zero") + var JoinBuf = SqlStory + var MultBuf util.SqlBuf[Multlog] + var MultCounter uint64 + var Offered = []string + var PropMaster []Props + var Scenes util.RWMap[uint64, *Scene] + var SpinBuf util.SqlBuf[Spinlog] + var SpinCounter uint64 + var StoryCounter uint64 + var Users util.RWMap[uint64, *User] + func ApiActivate(c *gin.Context) + func ApiClubCashin(c *gin.Context) + func ApiClubInfo(c *gin.Context) + func ApiClubIs(c *gin.Context) + func ApiClubList(c *gin.Context) + func ApiClubRename(c *gin.Context) + func ApiGameInfo(c *gin.Context) + func ApiGameJoin(c *gin.Context) + func ApiGameList(c *gin.Context) + func ApiGamePart(c *gin.Context) + func ApiGameRtpGet(c *gin.Context) + func ApiKenoBetGet(c *gin.Context) + func ApiKenoBetSet(c *gin.Context) + func ApiKenoSelGet(c *gin.Context) + func ApiKenoSelGetSlice(c *gin.Context) + func ApiKenoSelSet(c *gin.Context) + func ApiKenoSelSetSlice(c *gin.Context) + func ApiKenoSpin(c *gin.Context) + func ApiMemUsage(c *gin.Context) + func ApiPing(c *gin.Context) + func ApiPropsAlGet(c *gin.Context) + func ApiPropsAlSet(c *gin.Context) + func ApiPropsGet(c *gin.Context) + func ApiPropsRtpGet(c *gin.Context) + func ApiPropsRtpSet(c *gin.Context) + func ApiPropsWalletAdd(c *gin.Context) + func ApiPropsWalletGet(c *gin.Context) + func ApiRefresh(c *gin.Context) + func ApiSendCode(c *gin.Context) + func ApiServInfo(c *gin.Context) + func ApiSignin(c *gin.Context) + func ApiSignis(c *gin.Context) + func ApiSignup(c *gin.Context) + func ApiSlotBetGet(c *gin.Context) + func ApiSlotBetSet(c *gin.Context) + func ApiSlotCollect(c *gin.Context) + func ApiSlotDoubleup(c *gin.Context) + func ApiSlotModeSet(c *gin.Context) + func ApiSlotSelGet(c *gin.Context) + func ApiSlotSelSet(c *gin.Context) + func ApiSlotSpin(c *gin.Context) + func ApiUserDelete(c *gin.Context) + func ApiUserIs(c *gin.Context) + func ApiUserRename(c *gin.Context) + func ApiUserSecret(c *gin.Context) + func Auth(required bool) gin.HandlerFunc + func GetAdmin(c *gin.Context, cid uint64) (*User, AL) + func GetRTP(user *User, club *Club) float64 + func Handle404(c *gin.Context) + func Handle405(c *gin.Context) + func MustAdmin(c *gin.Context, cid uint64) (*User, AL) + func Negotiate(c *gin.Context, code int, data any) + func Ret204(c *gin.Context) + func Ret400(c *gin.Context, code int, err error) + func Ret401(c *gin.Context, code int, err error) + func Ret403(c *gin.Context, code int, err error) + func Ret404(c *gin.Context, code int, err error) + func Ret500(c *gin.Context, code int, err error) + func RetErr(c *gin.Context, status, code int, err error) + func RetOk(c *gin.Context, data any) + func Router(r *gin.Engine) + func SafeTransaction(engine *xorm.Engine, f func(*Session) error) (err error) + type AL uint + const ALadmin + const ALall + const ALclub + const ALgame + const ALmem + const ALuser + type AuthGetter func(c *gin.Context) (*User, int, error) + type AuthResp struct + Access string + Email string + Expire string + Living string + Refrsh string + UID uint64 + XMLName xml.Name + func (r *AuthResp) Setup(user *User) + type Banklog struct + Bank float64 + BankSum float64 + CTime time.Time + Fund float64 + FundSum float64 + ID uint64 + Lock float64 + LockSum float64 + type Claims struct + UID uint64 + func (c *Claims) Validate() error + type Club struct + Bank float64 + CID uint64 + CTime time.Time + Fund float64 + Lock float64 + MRTP float64 + Name string + Rate float64 + UTime time.Time + type Multlog struct + CTime time.Time + GID uint64 + Gain float64 + ID uint64 + MRTP float64 + Mult int + Risk float64 + Wallet float64 + type Props struct + Access AL + CID uint64 + CTime time.Time + MRTP float64 + UID uint64 + UTime time.Time + Wallet float64 + type Scene struct + Game any + SID uint64 + type Session = xorm.Session + type Spinlog struct + CTime time.Time + GID uint64 + Gain float64 + Game string + MRTP float64 + SID uint64 + Screen string + Wallet float64 + Wins string + type SqlBank struct + func (sb *SqlBank) Access(engine *xorm.Engine, uid uint64, access AL) (err error) + func (sb *SqlBank) Add(engine *xorm.Engine, uid, aid uint64, wallet, sum float64) (err error) + func (sb *SqlBank) Flush(engine *xorm.Engine, d time.Duration) (err error) + func (sb *SqlBank) Init(cid uint64, capacity, logsize int) + func (sb *SqlBank) MRTP(engine *xorm.Engine, uid uint64, mrtp float64) (err error) + func (sb *SqlBank) Put(engine *xorm.Engine, uid uint64, sum float64) (err error) + type SqlStory struct + func (ss *SqlStory) Flow(engine *xorm.Engine, gid uint64, flow bool) (err error) + func (ss *SqlStory) Flush(engine *xorm.Engine, d time.Duration) (err error) + func (ss *SqlStory) Init(capacity, logsize int) + func (ss *SqlStory) Join(engine *xorm.Engine, s *Story) (err error) + type Story struct + Alias string + CID uint64 + CTime time.Time + Flow bool + GID uint64 + UID uint64 + UTime time.Time + type UF uint + const UFactivated + const UFsigncode + type User struct + CTime time.Time + Code uint32 + Email string + GAL AL + Name string + Secret string + Status UF + UID uint64 + UTime time.Time + func GetBasicAuth(credentials string) (user *User, code int, err error) + func GetBearerAuth(tokenstr string) (user *User, code int, err error) + func UserFromCookie(c *gin.Context) (*User, int, error) + func UserFromForm(c *gin.Context) (*User, int, error) + func UserFromHeader(c *gin.Context) (*User, int, error) + func UserFromQuery(c *gin.Context) (*User, int, error) + func (user *User) GetAL(cid uint64) AL + func (user *User) GetRTP(cid uint64) float64 + func (user *User) GetWallet(cid uint64) float64 + func (user *User) Init() + func (user *User) InsertProps(props *Props) + type Walletlog struct + AID uint64 + CID uint64 + CTime time.Time + ID uint64 + Sum float64 + UID uint64 + Wallet float64