config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2025 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultConfigDir added in v0.3.0

func GetDefaultConfigDir() string

GetDefaultConfigDir returns the OS-specific config directory

func WriteDefaultConfig added in v0.3.0

func WriteDefaultConfig(path string) error

Types

type AppConfig

type AppConfig struct {
	Config *domain.Config
	// contains filtered or unexported fields
}

func New

func New(configDirOrPath string) (*AppConfig, error)

func (*AppConfig) ApplyLogConfig

func (c *AppConfig) ApplyLogConfig()

ApplyLogConfig applies the log level and log file configuration

func (*AppConfig) GetDatabasePath

func (c *AppConfig) GetDatabasePath() string

GetDatabasePath returns the path to the database file

func (*AppConfig) GetEncryptionKey

func (c *AppConfig) GetEncryptionKey() []byte

GetEncryptionKey derives a 32-byte encryption key from the session secret

func (*AppConfig) RegisterReloadListener added in v1.0.0

func (c *AppConfig) RegisterReloadListener(fn func(*domain.Config))

RegisterReloadListener registers a callback that's invoked when the configuration file is reloaded.

func (*AppConfig) SetDataDir

func (c *AppConfig) SetDataDir(dir string)

SetDataDir sets the data directory (used by CLI flags)

Jump to

Keyboard shortcuts

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