Documentation ¶
Index ¶
- func NewMongoDB(ctx context.Context, config Config) (*mongo.Client, error)
- type Card
- func (c *Card) AddCardToDealer(ctx context.Context, telegramChatID int64, card core.Card) error
- func (c *Card) AddCardToPlayer(ctx context.Context, telegramChatID int64, username string, card core.Card) error
- func (c *Card) DrawCardFromDeck(ctx context.Context, telegramChatID int64) (core.Card, error)
- func (c *Card) SetNewDeck(ctx context.Context, telegramChatID int64, deck *core.Deck) error
- type Chat
- type Config
- type Game
- type Player
- func (p *Player) AddNewPlayer(ctx context.Context, telegramChatID int64, player core.Player) error
- func (p *Player) GetPlayer(ctx context.Context, telegramChatID int64, username string) (*core.Player, error)
- func (p *Player) SetPlayerStopAndBusted(ctx context.Context, telegramChatID int64, player *core.Player) error
- type Statistic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Card ¶
type Card struct {
// contains filtered or unexported fields
}
func NewCard ¶
func NewCard(collection *mongo.Collection) *Card
func (*Card) AddCardToDealer ¶
func (*Card) AddCardToPlayer ¶
func (*Card) DrawCardFromDeck ¶
type Chat ¶
type Chat struct {
// contains filtered or unexported fields
}
func NewChat ¶
func NewChat(collection *mongo.Collection) *Chat
func (*Chat) CheckChatExists ¶
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
func NewGame ¶
func NewGame(collection *mongo.Collection) *Game
func (*Game) GetActiveGame ¶
func (*Game) NullActiveGame ¶
type Player ¶
type Player struct {
// contains filtered or unexported fields
}
func NewPlayer ¶
func NewPlayer(collection *mongo.Collection) *Player
func (*Player) AddNewPlayer ¶
type Statistic ¶
type Statistic struct {
// contains filtered or unexported fields
}
func NewStatistic ¶
func NewStatistic(collection *mongo.Collection) *Statistic
func (*Statistic) GetStatistics ¶
func (*Statistic) SetStatistics ¶
Click to show internal directories.
Click to hide internal directories.