Documentation
¶
Index ¶
- func DefaultLogWriter(version string) io.Writer
- func GetDefaultConfigDir() string
- func InitDefaultLogger(version string)
- func WriteDefaultConfig(path string) error
- type AppConfig
- func (c *AppConfig) ApplyLogConfig()
- func (c *AppConfig) GetConfigDir() string
- func (c *AppConfig) GetDataDir() string
- func (c *AppConfig) GetDatabasePath() string
- func (c *AppConfig) GetEncryptionKey() []byte
- func (c *AppConfig) RegisterReloadListener(fn func(*domain.Config))
- func (c *AppConfig) SetDataDir(dir string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultLogWriter ¶ added in v1.1.0
DefaultLogWriter returns the base log writer for the provided version.
func GetDefaultConfigDir ¶ added in v0.3.0
func GetDefaultConfigDir() string
GetDefaultConfigDir returns the OS-specific config directory
func InitDefaultLogger ¶ added in v1.1.0
func InitDefaultLogger(version string)
InitDefaultLogger configures zerolog with the default writer for this version. This is used by CLI entry points before a configuration file is loaded.
func WriteDefaultConfig ¶ added in v0.3.0
Types ¶
type AppConfig ¶
func (*AppConfig) ApplyLogConfig ¶
func (c *AppConfig) ApplyLogConfig()
func (*AppConfig) GetConfigDir ¶ added in v1.3.0
GetConfigDir returns the directory containing the config file
func (*AppConfig) GetDataDir ¶
GetDataDir returns the resolved data directory path.
func (*AppConfig) GetDatabasePath ¶
GetDatabasePath returns the path to the database file
func (*AppConfig) GetEncryptionKey ¶
GetEncryptionKey derives a 32-byte encryption key from the session secret
func (*AppConfig) RegisterReloadListener ¶ added in v1.0.0
RegisterReloadListener registers a callback that's invoked when the configuration file is reloaded.
func (*AppConfig) SetDataDir ¶
SetDataDir sets the data directory (used by CLI flags)