Documentation ¶
Index ¶
Constants ¶
View Source
const PlayerGameTokenPeriod int32 = 60 * 60 * 24 * 8
秒数。mongoのSetExpireAfterSeconds()に使う
Variables ¶
View Source
var PlayerGameTokenExpiredIndex = mongo.IndexModel{ Keys: bson.D{{"generated_at", -1}}, Options: options.Index().SetName("idx_expired").SetExpireAfterSeconds(PlayerGameTokenPeriod), }
View Source
var PlayerGameTokenIndex = mongo.IndexModel{ Keys: bson.D{{"hayabusa_id", -1}}, Options: options.Index().SetName("idx_hayabusa_id").SetUnique(false), }
Functions ¶
This section is empty.
Types ¶
type MsgPlayerGameToken ¶
type Player ¶
type Player struct { games.PlayerBase `bson:",inline"` Nickname string `bson:"nickname"` GoldNum int `bson:"gold_num"` }
type PlayerGameToken ¶
type PlayerGameToken struct { HayabusaID string `bson:"hayabusa_id"` GeneratedAt hybs.Time `bson:"generated_at"` Token string `bson:"token"` }
func (*PlayerGameToken) ToMsg ¶
func (token *PlayerGameToken) ToMsg(appID string) *MsgPlayerGameToken
Click to show internal directories.
Click to hide internal directories.