Documentation ¶
Index ¶
- Constants
- Variables
- func Account(uid uint64) *accountUtil
- func CacheHDEL(key string, field interface{}) error
- func CacheHExists(key string, field interface{}) (bool, error)
- func CacheHGET(key string, field interface{}) (interface{}, error)
- func CacheHSET(key string, field interface{}, value interface{}) error
- func CellUtil(id uint64) *cellUtil
- func EntitySrvUtil(eid uint64) *entitySrvUtil
- func EntityTypeUtil(typ string) *entityTypeUtil
- func EntityUtil(typ string, dbid uint64) *entityUtil
- func Get() redis.Conn
- func GetConn() (redis.Conn, error)
- func GetRankRedis() redis.Conn
- func GetServerList(list interface{}) error
- func GetServerRedis() redis.Conn
- func GetSingletonConn() (redis.Conn, error)
- func GetSingletonRedis() redis.Conn
- func GetUID(user string) (uint64, error)
- func IsDBRedisValid() bool
- func IsRankRedisValid() bool
- func IsServerRedisValid() bool
- func IsSingletonRedisValid() bool
- func ServerUtil(uid uint64) *serverUtil
- func SessionUtil(uid uint64) *sessionUtil
- func SrvIDUtil(srvID uint64) *srvIDUtil
- func UIDGenerator() *uidGenerator
- type EntitySrvInfo
- type SessionInfo
Constants ¶
View Source
const ( // AccountPrefix 帐号表前缀 AccountPrefix = "account" // AccountOpenID 用户名表前缀, 存储帐号和UID的对应关系 AccountOpenID = "accountopenid" // UIDField UID字段 UIDField = "uid" )
Variables ¶
View Source
var ( // DBValid DB是否正常 DBValid = true // SrvRedisValid Cache是否正常 SrvRedisValid = true // SingletonRedisValid 单实例是否正常 SingletonRedisValid = true // RankRedisValid 排名是否正常 RankRedisValid = true )
View Source
var TokenVerifyError = errors.New("Token Error")
Functions ¶
func CacheHExists ¶
CacheHExists 缓存HExists
Types ¶
type SessionInfo ¶
type SessionInfo struct { Token string `redis:"token"` EntityID uint64 `redis:"entityID"` IP string `redis:"ip"` }
SessionInfo 字段表
Click to show internal directories.
Click to hide internal directories.