Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidEnvironment = errors.New("invalid environment")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ServerURL string `env:"SERVER_URL,required"`
ZonesFile string `env:"ZONES_FILE,required"`
AuthToken string `env:"AUTH_TOKEN,required"`
DailyProgramsFile string `env:"DAILY_PROGRAMS_FILE,required"`
OddProgramsFile string `env:"ODD_PROGRAMS_FILE,required"`
EvenProgramsFile string `env:"EVEN_PROGRAMS_FILE,required"`
WeeklyProgramsFile string `env:"WEEKLY_PROGRAMS_FILE,required"`
TemperatureProgramsFile string `env:"TEMPERATURE_PROGRAMS_FILE,required"`
ExecutionLogsFile string `env:"EXECUTION_LOGS_FILE,required"`
TelegramToken string `env:"TELEGRAM_TOKEN,required"`
TelegramChatID int `env:"TELEGRAM_CHAT_ID,required"`
TelegramBotEnabled bool `env:"TELEGRAM_BOT_ENABLED,required"`
NatsServerURL string `env:"NATS_SERVER_URL,required"`
EventsDirectory string `env:"EVENTS_DIRECTORY,required"`
// contains filtered or unexported fields
}
type EmptyEnvironmentKeyError ¶
type EmptyEnvironmentKeyError struct {
// contains filtered or unexported fields
}
func NewEmptyEnvironmentKeyError ¶
func NewEmptyEnvironmentKeyError(key string) EmptyEnvironmentKeyError
func (EmptyEnvironmentKeyError) Error ¶
func (i EmptyEnvironmentKeyError) Error() string
type Environment ¶
type Environment struct {
Value string `env:"ENVIRONMENT,required"`
}
type EnvironmentType ¶
type EnvironmentType int
const ( DevelopmentEnvironment EnvironmentType = iota + 1 ProductionEnvironment )
func ParseEnvironment ¶
func ParseEnvironment(s string) (EnvironmentType, error)
func (EnvironmentType) IsProduction ¶
func (e EnvironmentType) IsProduction() bool
Click to show internal directories.
Click to hide internal directories.