config

package
v0.0.0-...-2b4ca33 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidVar = errors.New("invalid var")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	ServerAddr    string  `toml:"server_addr"`
	ServerPort    int     `toml:"server_port"`
	FrontendURL   string  `toml:"frontend_url"`
	VoteStep      float64 `toml:"vote_step"`
	QrCodeSize    int     `toml:"qr_code_size"`
	CleanOverTime int     `toml:"clean_over_time"`
}

func LoadConfig

func LoadConfig() (config Config, err error)

func NewConfig

func NewConfig(config Config) *Config

func (*Config) BuildServerAddr

func (c *Config) BuildServerAddr() string

func (*Config) GetQrCodeSize

func (c *Config) GetQrCodeSize() int

func (*Config) GetURL

func (c *Config) GetURL() string

func (*Config) SetConfigFromEnv

func (c *Config) SetConfigFromEnv() (err error)

func (*Config) SetDefaults

func (c *Config) SetDefaults()

Jump to

Keyboard shortcuts

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