config

package
v0.0.0-...-7319542 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conference

type Conference struct {
	Name               string    `env:"CONF_NAME" env-required:"true"`
	URL                string    `env:"CONF_URL" env-required:"true"`
	DateFrom           time.Time `env:"DATE_FROM" env-required:"true" env-layout:"02.01.2006"`
	DateUntil          time.Time `env:"DATE_UNTIL" env-required:"true" env-layout:"02.01.2006"`
	EvaluationDeadline time.Time `env:"EVALUATION_DEADLINE" env-required:"true" env-layout:"02.01.2006"`
}

Conference represents conferences that is taking place at the current moment in time. Move to MODELS ???

func (Conference) Validate

func (c Conference) Validate() error

type Config

type Config struct {
	Log        Log
	Telegram   Telegram
	PG         PG
	Conference Conference
	StateLRU   StateLRU
}

type Log

type Log struct {
	Level     string `env:"LOG_LEVEL" env-default:"info"`
	AddSource bool   `env:"LOG_ADD_SOURCE"`
}

type PG

type PG struct {
	URL      string `env:"PG_URL" env-required:"true"`
	MaxConns int32  `env:"PG_MAX_CONNS" env-required:"true"`
}

type StateLRU

type StateLRU struct {
	Size int           `env:"STATE_LRU_SIZE" env-required:"true"`
	TTL  time.Duration `env:"STATE_LRU_TTL" env-required:"true"`
}

type Telegram

type Telegram struct {
	Token       string        `env:"TG_TOKEN" env-required:"true"`
	Admins      []int64       `env:"TG_ADMINS" env-required:"true"`
	HTTPTimeout time.Duration `env:"TG_HTTP_TIMEOUT" env-required:"true"`
	Verbose     bool          `env:"TG_DEBUG"`
}

Jump to

Keyboard shortcuts

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