Documentation
¶
Overview ¶
Package config handles loading and managing msgvault configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultHome ¶
func DefaultHome() string
DefaultHome returns the default msgvault home directory. Respects MSGVAULT_HOME environment variable.
Types ¶
type Config ¶
type Config struct {
Data DataConfig `toml:"data"`
OAuth OAuthConfig `toml:"oauth"`
Sync SyncConfig `toml:"sync"`
// Computed paths (not from config file)
HomeDir string `toml:"-"`
}
Config represents the msgvault configuration.
func Load ¶
Load reads the configuration from the specified file. If path is empty, uses the default location (~/.msgvault/config.toml).
func NewDefaultConfig ¶ added in v0.4.0
func NewDefaultConfig() *Config
NewDefaultConfig returns a configuration with default values.
func (*Config) AnalyticsDir ¶
AnalyticsDir returns the path to the Parquet analytics directory.
func (*Config) AttachmentsDir ¶
AttachmentsDir returns the path to the attachments directory.
func (*Config) DatabaseDSN ¶ added in v0.4.0
DatabaseDSN returns the database connection string or file path.
type DataConfig ¶
type DataConfig struct {
DataDir string `toml:"data_dir"`
DatabaseURL string `toml:"database_url"`
}
DataConfig holds data storage configuration.
type OAuthConfig ¶
type OAuthConfig struct {
ClientSecrets string `toml:"client_secrets"`
}
OAuthConfig holds OAuth configuration.
type SyncConfig ¶
type SyncConfig struct {
RateLimitQPS int `toml:"rate_limit_qps"`
}
SyncConfig holds sync-related configuration.