config

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package config provides configuration management for the LLMreconing Tool

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(cfg *Config) error

SaveConfig saves the configuration to file

Types

type Config

type Config struct {
	// UpdateSources defines the URLs for update sources
	UpdateSources struct {
		// GitHub is the URL for the official GitHub repository for updates
		GitHub string `mapstructure:"github"`
		// GitLab is the URL for an optional internal GitLab repository for updates
		GitLab string `mapstructure:"gitlab"`
	} `mapstructure:"update_sources"`

	// APIKeys stores API keys for different services
	APIKeys struct {
		// OpenAI API key for OpenAI provider
		OpenAI string `mapstructure:"openai"`
		// Anthropic API key for Anthropic provider
		Anthropic string `mapstructure:"anthropic"`
	} `mapstructure:"api_keys"`

	// Templates configuration
	Templates struct {
		// Directory where templates are stored
		Dir string `mapstructure:"dir"`
		// Default template categories to use
		DefaultCategories []string `mapstructure:"default_categories"`
	} `mapstructure:"templates"`

	// Modules configuration
	Modules struct {
		// Directory where modules are stored
		Dir string `mapstructure:"dir"`
		// Enabled modules
		Enabled []string `mapstructure:"enabled"`
	} `mapstructure:"modules"`

	// Security settings
	Security struct {
		// Whether to verify signatures of updates
		VerifySignatures bool `mapstructure:"verify_signatures"`
		// Public key for verifying signatures
		PublicKey string `mapstructure:"public_key"`
	} `mapstructure:"security"`
}

Config represents the application configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default configuration

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads the configuration from file and environment variables

Jump to

Keyboard shortcuts

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