config

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OTLPEndpoint      = "OTLP_ENDPOINT"
	OTLPBasicUsername = "OTLP_BASIC_USERNAME"
	OTLPBasicPassword = "OTLP_BASIC_PASSWORD"
)

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"`
	EnableTracing     bool    `toml:"enable_tracing"`
	OTLPEndpoint      string  `toml:"otlp_endpoint"`
	OTLPBasicUsername string  `toml:"otlp_basic_username"`
	OTLPBasicPassword string  `toml:"otlp_basic_password"`
}

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