Documentation ¶
Index ¶
- Constants
- func Auth(w http.ResponseWriter, r *http.Request)
- func AuthHash(r *http.Request) (string, string)
- func FreeSpinGame(w http.ResponseWriter, r *http.Request)
- func GetUserName(conn *redis.Client, r *http.Request) (string, bool, error)
- func GetUserNameFromRedis(r *http.Request) (string, error)
- func Hash(s string) uint64
- func InitUsers() map[string]*User
- func NormalSpinGame(w http.ResponseWriter, r *http.Request)
- func RandomString() (string, error)
- func RedisHashKey(prefix, value string) string
- func ShowGame(w http.ResponseWriter, r *http.Request)
- func SpinGame(w http.ResponseWriter, r *http.Request, sp SpinAction, valiateErr error)
- type FreeSpinParams
- type NormalSpinParams
- type SetSessionIfMissing
- type SpinAction
- type User
Constants ¶
View Source
const ( REDIS_HASH_MAX = 1000 SESSION_ID = "SID" CTX_SESSION_KEY = 0 )
Variables ¶
This section is empty.
Functions ¶
func FreeSpinGame ¶
func FreeSpinGame(w http.ResponseWriter, r *http.Request)
func NormalSpinGame ¶
func NormalSpinGame(w http.ResponseWriter, r *http.Request)
func RandomString ¶
func RedisHashKey ¶
func SpinGame ¶
func SpinGame(w http.ResponseWriter, r *http.Request, sp SpinAction, valiateErr error)
Types ¶
type FreeSpinParams ¶
type FreeSpinParams struct {
// contains filtered or unexported fields
}
type NormalSpinParams ¶
type NormalSpinParams struct {
// contains filtered or unexported fields
}
type SetSessionIfMissing ¶
func (*SetSessionIfMissing) ServeHTTP ¶
func (f *SetSessionIfMissing) ServeHTTP(w http.ResponseWriter, r *http.Request)
type SpinAction ¶
type SpinAction interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.