config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Display

func Display(cfg *Config, format string) error

Display displays the configuration in the specified format

func GetConfigDir

func GetConfigDir() (string, error)

GetConfigDir returns the configuration directory path

func Initialize

func Initialize(configFile string, verbose bool) error

Initialize initializes the configuration system

func Save

func Save(cfg *Config, configFile string) error

Save saves the configuration to file

Types

type AWSConfig

type AWSConfig struct {
	Region      string `yaml:"region" mapstructure:"region"`
	Profile     string `yaml:"profile" mapstructure:"profile"`
	AccessKeyID string `yaml:"access_key_id,omitempty" mapstructure:"access_key_id"`
	SecretKey   string `yaml:"secret_access_key,omitempty" mapstructure:"secret_access_key"`
}

AWSConfig represents AWS-specific configuration

type Agent

type Agent struct {
	Type        string  `yaml:"type" mapstructure:"type"`
	APIKey      string  `yaml:"api_key" mapstructure:"api_key"`
	Model       string  `yaml:"model" mapstructure:"model"`
	MaxTokens   int     `yaml:"max_tokens" mapstructure:"max_tokens"`
	Temperature float64 `yaml:"temperature" mapstructure:"temperature"`
	Endpoint    string  `yaml:"endpoint,omitempty" mapstructure:"endpoint"`
}

Agent represents an AI agent configuration

type AzureConfig

type AzureConfig struct {
	SubscriptionID string `yaml:"subscription_id"`
	TenantID       string `yaml:"tenant_id"`
	ClientID       string `yaml:"client_id,omitempty"`
	ClientSecret   string `yaml:"client_secret,omitempty"`
}

AzureConfig represents Azure-specific configuration

type CloudProviders

type CloudProviders struct {
	AWS   AWSConfig   `yaml:"aws" mapstructure:"aws"`
	Azure AzureConfig `yaml:"azure" mapstructure:"azure"`
	GCP   GCPConfig   `yaml:"gcp" mapstructure:"gcp"`
}

CloudProviders contains configuration for all cloud providers

type Config

type Config struct {
	Version        string           `yaml:"version" mapstructure:"version"`
	Agents         map[string]Agent `yaml:"agents" mapstructure:"agents"`
	CloudProviders CloudProviders   `yaml:"cloud_providers" mapstructure:"cloud_providers"`
	Monitoring     MonitoringConfig `yaml:"monitoring" mapstructure:"monitoring"`
	Security       SecurityConfig   `yaml:"security" mapstructure:"security"`
	Plugins        PluginConfig     `yaml:"plugins" mapstructure:"plugins"`
	Logging        LoggingConfig    `yaml:"logging" mapstructure:"logging"`
}

Config represents the main configuration structure

func Load

func Load() (*Config, error)

Load loads the configuration from file

type DataDogConfig

type DataDogConfig struct {
	APIKey string `yaml:"api_key"`
	AppKey string `yaml:"app_key"`
}

DataDogConfig represents DataDog configuration

type GCPConfig

type GCPConfig struct {
	ProjectID          string `yaml:"project_id"`
	Region             string `yaml:"region"`
	ServiceAccountPath string `yaml:"service_account_path,omitempty"`
	ApplicationDefault bool   `yaml:"application_default"`
}

GCPConfig represents GCP-specific configuration

type GrafanaConfig

type GrafanaConfig struct {
	Endpoint string `yaml:"endpoint"`
	APIKey   string `yaml:"api_key,omitempty"`
	Username string `yaml:"username,omitempty"`
	Password string `yaml:"password,omitempty"`
}

GrafanaConfig represents Grafana configuration

type LoggingConfig

type LoggingConfig struct {
	Level    string `yaml:"level" mapstructure:"level"`
	Format   string `yaml:"format" mapstructure:"format"`
	Output   string `yaml:"output" mapstructure:"output"`
	Rotate   bool   `yaml:"rotate" mapstructure:"rotate"`
	MaxSize  int    `yaml:"max_size" mapstructure:"max_size"`
	MaxAge   int    `yaml:"max_age" mapstructure:"max_age"`
	MaxFiles int    `yaml:"max_files" mapstructure:"max_files"`
}

LoggingConfig contains logging configuration

type MonitoringConfig

type MonitoringConfig struct {
	Prometheus PrometheusConfig `yaml:"prometheus"`
	Grafana    GrafanaConfig    `yaml:"grafana"`
	DataDog    DataDogConfig    `yaml:"datadog"`
	NewRelic   NewRelicConfig   `yaml:"newrelic"`
}

MonitoringConfig contains monitoring tool configurations

type NewRelicConfig

type NewRelicConfig struct {
	APIKey    string `yaml:"api_key"`
	AccountID string `yaml:"account_id"`
}

NewRelicConfig represents New Relic configuration

type PluginConfig

type PluginConfig struct {
	Directory      string   `yaml:"directory"`
	AutoUpdate     bool     `yaml:"auto_update"`
	AllowedSources []string `yaml:"allowed_sources"`
}

PluginConfig contains plugin-related settings

type PrometheusConfig

type PrometheusConfig struct {
	Endpoint string `yaml:"endpoint"`
	Username string `yaml:"username,omitempty"`
	Password string `yaml:"password,omitempty"`
}

PrometheusConfig represents Prometheus configuration

type SecurityConfig

type SecurityConfig struct {
	Encryption     bool   `yaml:"encryption" mapstructure:"encryption"`
	AuditLogging   bool   `yaml:"audit_logging" mapstructure:"audit_logging"`
	KeyManagement  string `yaml:"key_management" mapstructure:"key_management"`
	ComplianceMode string `yaml:"compliance_mode" mapstructure:"compliance_mode"`
}

SecurityConfig contains security-related settings

Jump to

Keyboard shortcuts

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