config

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 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 AdminCfg

type AdminCfg struct {
	Email    string `mapstructure:"email"`
	Password string `mapstructure:"password"`
}

type Config

type Config struct {
	Listen         string      `mapstructure:"listen"`
	LogLevel       string      `mapstructure:"log_level"`
	Database       DatabaseCfg `mapstructure:"database"`
	Kiko           KikoCfg     `mapstructure:"kiko"`
	Session        SessionCfg  `mapstructure:"session"`
	Admin          AdminCfg    `mapstructure:"admin"`
	DefaultLocale  string      `mapstructure:"default_locale"`
	EnabledLocales []string    `mapstructure:"enabled_locales"`
	Log            *log.Logger
}

func Load

func Load(path string, logLevel ...string) (*Config, error)

type DatabaseCfg

type DatabaseCfg struct {
	Path string `mapstructure:"path"`
}

type KikoCfg

type KikoCfg struct {
	URL    string `mapstructure:"url"`
	APIKey string `mapstructure:"api_key"`
}

type SessionCfg

type SessionCfg struct {
	CookieName    string `mapstructure:"cookie_name"`
	TTLHours      int    `mapstructure:"ttl_hours"`
	ShortTTLHours int    `mapstructure:"short_ttl_hours"`
	Secure        bool   `mapstructure:"secure"`
}

Jump to

Keyboard shortcuts

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