Documentation ¶
Index ¶
Constants ¶
View Source
const RivalKeyStranger = "*"
Variables ¶
View Source
var (
ErrRivalUserIsNotBiddingAgainstStranger = errors.New("rival user is not a stranger")
)
Functions ¶
This section is empty.
Types ¶
type BattleID ¶
type BattleID string
BattleID has form of 'userId@tournamentId'
func NewBattleID ¶
func NewStrangerBattleID ¶
func (BattleID) IsStranger ¶
type ContestantStats ¶
type ContestantStats struct { CountOfPlaysCompleted int `datastore:",noindex,omitempty"` CountOfWins int `datastore:",noindex,omitempty"` CountOfDraws int `datastore:",noindex,omitempty"` CountOfLoses int `datastore:",noindex,omitempty"` Score int `datastore:",omitempty"` RivalGameUserIDs string `datastore:",noindex,omitempty"` LastPlayIDs string `datastore:",noindex,omitempty"` }
ContestantStats can be used in User entity for storing games statistics
func (ContestantStats) GetRivalUserIDs ¶
func (cs ContestantStats) GetRivalUserIDs() string
type Move ¶
type Move struct {
*MoveEntity
}
type MoveEntity ¶
type RivalStat ¶
func (*RivalStat) MarshalJSON ¶
MarshalJSON marshal bytes to json - template
func (*RivalStat) MarshalJSONBuf ¶
func (j *RivalStat) MarshalJSONBuf(buf fflib.EncodingBuffer) error
MarshalJSONBuf marshal buff to json - template
func (*RivalStat) UnmarshalJSON ¶
UnmarshalJSON umarshall json - template of ffjson
func (*RivalStat) UnmarshalJSONFFLexer ¶
UnmarshalJSONFFLexer fast json unmarshall - template ffjson
type RivalStats ¶
type RivalStatsEntity ¶
type RivalStatsEntity struct {
RivalStats string
}
func (*RivalStatsEntity) GetRivalStats ¶
func (u *RivalStatsEntity) GetRivalStats() (rivalStats RivalStats)
func (*RivalStatsEntity) SetRivalStats ¶
func (u *RivalStatsEntity) SetRivalStats(rivalsStats RivalStats)
type UserEntity ¶
type UserEntity struct { BiddingUserIDs string `datastore:",noindex,omitempty"` ContestantStats RivalStatsEntity LastPlayIDs string `datastore:",noindex,omitempty"` }
UserEntity extends application specific `User` entity with arena properties
func (*UserEntity) UpdateArenaStats ¶
func (u *UserEntity) UpdateArenaStats(tournamentID, rivalUserID, playID string, balanceDiff int) (updated bool)
Click to show internal directories.
Click to hide internal directories.