feat(storage): add sqlite manager and storage config
This commit is contained in:
@@ -16,10 +16,11 @@ const (
|
||||
|
||||
// Config captures runtime configuration for the Goaichat application.
|
||||
type Config struct {
|
||||
API APIConfig `yaml:"api"`
|
||||
Model ModelConfig `yaml:"model"`
|
||||
API APIConfig `yaml:"api"`
|
||||
Model ModelConfig `yaml:"model"`
|
||||
Logging LoggingConfig `yaml:"logging"`
|
||||
UI UIConfig `yaml:"ui"`
|
||||
UI UIConfig `yaml:"ui"`
|
||||
Storage StorageConfig `yaml:"storage"`
|
||||
}
|
||||
|
||||
// APIConfig holds settings for connecting to the OpenAI-compatible API.
|
||||
@@ -45,6 +46,13 @@ type UIConfig struct {
|
||||
ShowTimestamps bool `yaml:"show_timestamps"`
|
||||
}
|
||||
|
||||
// StorageConfig controls persistence locations and metadata.
|
||||
type StorageConfig struct {
|
||||
Path string `yaml:"path"`
|
||||
BaseDir string `yaml:"base_dir"`
|
||||
Username string `yaml:"username"`
|
||||
}
|
||||
|
||||
// Load reads configuration from the provided path, falling back to defaults and
|
||||
// environment overrides.
|
||||
func Load(path string) (*Config, error) {
|
||||
@@ -123,5 +131,6 @@ func defaultConfig() Config {
|
||||
UI: UIConfig{
|
||||
ShowTimestamps: true,
|
||||
},
|
||||
Storage: StorageConfig{},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user