config

package
v0.0.0-...-d73c5c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	NumOfDecks int
}

type Config

type Config struct {
	App
	TelegramBot `mapstructure:",squash"`
	Database    `mapstructure:",squash"`
	Messages
}

func NewConfig

func NewConfig(envPath, configFolder string) *Config

type Database

type Database struct {
	Scheme   string `mapstructure:"MONGODB_SCHEME"`
	Host     string `mapstructure:"MONGODB_HOST"`
	Username string `mapstructure:"MONGODB_USER"`
	Password string `mapstructure:"MONGODB_PASSWORD"`
}

type Messages

type Messages struct {
	ChatAlreadyRegistered   string
	ChatNotExists           string
	ChatCreatedSuccessfully string
	ChatHasActiveGame       string
	ChatHasNoActiveGame     string

	Blackjack       string
	GameOver        string
	Win             string
	Lose            string
	Push            string
	BlackjackResult string

	PlayerCantDraw       string
	PlayerHand           string
	PlayerHandBusted     string
	PlayerAlreadyStopped string
	PlayerAlreadyBusted  string
	StoppedDrawing       string

	DealerHand      string
	DealerBlackjack string
	GameStartHint   string
	GameEnterHint   string

	TopPlayers string
}

type TelegramBot

type TelegramBot struct {
	APIKey string `mapstructure:"BOT_API_KEY"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL