import "github.com/analog-substance/carbon/pkg/common"
Index
Constants
const DefaultDeploymentsDirName = "deployments"
const DefaultImagesDirName = "images"
const DefaultInstanceConfigKey = "instance"
const DefaultInstanceDir = "."
const DefaultPackerDirName = "packer"
const DefaultProjectsDirName = "projects"
const DefaultTerraformDirName = "terraform"
const DeploymentsConfigKey = "deployments"
const ImagesConfigKey = "images"
const PackerConfigKey = "packer"
const TerraformConfigKey = "terraform"
const TerraformProjectConfigKey = "projects"
func LogLevel(level slog.Level)
func Logger() *slog.Logger
func ProjectsDir() string
func Set(s string, v any) any
func SetProvidersTypes(p []string)
func Time(what string) func()
func WithGroup(groupName string) *slog.Logger
type CarbonConfig struct {
Dir map[string]string `yaml:"dir"`
Providers map[string]ProviderConfig `yaml:"providers"`
}
func (*CarbonConfig) Get
func (cc *CarbonConfig) Get(search []string) any
func (*CarbonConfig) Keys
func (cc *CarbonConfig) Keys(prefix string) []string
func (*CarbonConfig) Set
func (cc *CarbonConfig) Set(search []string, val any) *CarbonConfig
type CarbonConfigFile struct {
Carbon CarbonConfig `yaml:"carbon"`
}
func GetConfig() *CarbonConfigFile
func (*CarbonConfigFile) Get
func (cf *CarbonConfigFile) Get(search []string) any
func (*CarbonConfigFile) Keys
func (cf *CarbonConfigFile) Keys() []string
func (cf *CarbonConfigFile) MergeInConfigFile(cfgFile string) error
func (*CarbonConfigFile) Set
func (cf *CarbonConfigFile) Set(search []string, val any) *CarbonConfigFile
type ProfileConfig struct {
Enabled bool `yaml:"enabled"`
Username string `yaml:"username" `
Password string `yaml:"password" `
PasswordCommand string `yaml:"password_command"`
Use1PassCLI bool `yaml:"use_1pass_cli" `
URL string `yaml:"url"`
Environments map[string]bool `yaml:"environments"`
}
func DefaultProfileConfig() ProfileConfig
func (*ProfileConfig) Get
func (pc *ProfileConfig) Get(search []string) any
func (pc *ProfileConfig) GetPassword() string
func (*ProfileConfig) Keys
func (pc *ProfileConfig) Keys(prefix string) []string
func (*ProfileConfig) Set
func (pc *ProfileConfig) Set(search []string, val any) *ProfileConfig
func (pc *ProfileConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type ProviderConfig struct {
Enabled bool `yaml:"enabled"`
AutoDiscover bool `yaml:"auto_discover"`
Profiles map[string]ProfileConfig `yaml:"profiles"`
}
func DefaultProviderConfig() ProviderConfig
func (*ProviderConfig) Get
func (pc *ProviderConfig) Get(search []string) any
func (*ProviderConfig) Keys
func (pc *ProviderConfig) Keys(prefix string) []string
func (*ProviderConfig) Set
func (pc *ProviderConfig) Set(search []string, val any) *ProviderConfig
func (pc *ProviderConfig) UnmarshalYAML(unmarshal func(interface{}) error) error