Documentation ¶
Index ¶
- func ChooseFormula(ctx context.Context, tx *firestore.Transaction, client *firestore.Client, ...)
- func GetBestPointsFormula(die []int, formulas []int) int
- func GetBoard(ctx context.Context, tx *firestore.Transaction, client *firestore.Client, ...) game.Board
- func OnUpdateUser(ctx context.Context, e FirestoreEvent) error
- func ReplayDie(ctx context.Context, tx *firestore.Transaction, client *firestore.Client, ...)
- type FirestoreEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChooseFormula ¶
func GetBestPointsFormula ¶
GetBestPointsFormula returns the formula with a max of points, with the provided die
func OnUpdateUser ¶
func OnUpdateUser(ctx context.Context, e FirestoreEvent) error
OnUpdateUser is triggered when a user is updated - Sends new die when replay is queried
Types ¶
type FirestoreEvent ¶
type FirestoreEvent struct { OldValue myfirestore.FirestoreValue `json:"oldValue"` Value myfirestore.FirestoreValue `json:"value"` }
FirestoreEvent is the payload of a Firestore event. Please refer to the docs for additional information regarding Firestore events.
Click to show internal directories.
Click to hide internal directories.