config

package
v0.0.0-...-0118044 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	ChatID       int    `envconfig:"CHAT_ID"`
	Token        string `envconfig:"TOKEN"`
	DatabasePath string `envconfig:"DATABASE_PATH"`

	ScheduleItems []ScheduleItem `yaml:"schedule"`
}

func NewAppConfig

func NewAppConfig() (*AppConfig, error)

func (*AppConfig) GetChatID

func (c *AppConfig) GetChatID() int

func (*AppConfig) GetDatabasePath

func (c *AppConfig) GetDatabasePath() string

func (*AppConfig) GetSchedule

func (c *AppConfig) GetSchedule() []ScheduleItem

func (*AppConfig) GetToken

func (c *AppConfig) GetToken() string

type ScheduleItem

type ScheduleItem struct {
	Day        time.Weekday `yaml:"day"`
	StartTime  string       `yaml:"start_time"`
	Duration   string       `yaml:"duration"`
	Place      string       `yaml:"place"`
	MaxPlayers int          `yaml:"max_players"`
}

Jump to

Keyboard shortcuts

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