config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsSecretMgr

type AwsSecretMgr struct {
	// contains filtered or unexported fields
}

func (*AwsSecretMgr) GetSecrets

func (s *AwsSecretMgr) GetSecrets(secretArn string) (Secrets, error)

type AwsSecretMgrSecrets

type AwsSecretMgrSecrets struct {
	ClusterArn     string                     `json:"cluster_arn"`
	PrivateSubnets []string                   `json:"private_subnets"`
	SecurityGroups []string                   `json:"security_groups"`
	Services       map[string]*RegistryConfig `json:"ecrs"`
	Tfe            *TfeSecrets                `json:"tfe"`
}

func (*AwsSecretMgrSecrets) GetAllServicesUrl

func (s *AwsSecretMgrSecrets) GetAllServicesUrl() map[string]*RegistryConfig

func (*AwsSecretMgrSecrets) GetClusterArn

func (s *AwsSecretMgrSecrets) GetClusterArn() string

func (*AwsSecretMgrSecrets) GetPrivateSubnets

func (s *AwsSecretMgrSecrets) GetPrivateSubnets() []string

func (*AwsSecretMgrSecrets) GetSecurityGroups

func (s *AwsSecretMgrSecrets) GetSecurityGroups() []string

func (*AwsSecretMgrSecrets) GetServiceUrl

func (s *AwsSecretMgrSecrets) GetServiceUrl(serviceName string) (string, error)

func (*AwsSecretMgrSecrets) GetTfeOrg

func (s *AwsSecretMgrSecrets) GetTfeOrg() string

func (*AwsSecretMgrSecrets) GetTfeUrl

func (s *AwsSecretMgrSecrets) GetTfeUrl() string

type ConfigData

type ConfigData struct {
	ConfigVersion     string                 `yaml:"config_version"`
	TerraformVersion  string                 `yaml:"terraform_version"`
	DefaultEnv        string                 `yaml:"default_env"`
	App               string                 `yaml:"app"`
	DefaultComposeEnv string                 `yaml:"default_compose_env"`
	Environments      map[string]Environment `yaml:"environments"`
	Tasks             map[string][]string    `yaml:"tasks"`
}

type Environment

type Environment struct {
	AWSProfile         string `yaml:"aws_profile"`
	SecretARN          string `yaml:"secret_arn"`
	TerraformDirectory string `yaml:"terraform_directory"`
	DeleteProtected    bool   `yaml:"delete_protected"`
	AutoRunMigration   bool   `yaml:"auto_run_migration"`
	LogGroupPrefix     string `yaml:"log_group_prefix"`
}

type HappyConfig

type HappyConfig struct {
	// contains filtered or unexported fields
}

func (*HappyConfig) App

func (s *HappyConfig) App() string

func (*HappyConfig) AutoRunMigration

func (s *HappyConfig) AutoRunMigration() bool

func (*HappyConfig) AwsProfile

func (s *HappyConfig) AwsProfile() string

func (*HappyConfig) ClusterArn

func (s *HappyConfig) ClusterArn() (string, error)

func (*HappyConfig) DefaultComposeEnv

func (s *HappyConfig) DefaultComposeEnv() string

func (*HappyConfig) DefaultEnv

func (s *HappyConfig) DefaultEnv() string

func (*HappyConfig) GetRdevServiceRegistries

func (s *HappyConfig) GetRdevServiceRegistries() (map[string]*RegistryConfig, error)

func (*HappyConfig) GetSecretArn

func (s *HappyConfig) GetSecretArn() string

func (*HappyConfig) GetTasks

func (s *HappyConfig) GetTasks(taskType string) ([]string, error)

func (*HappyConfig) LogGroupPrefix

func (s *HappyConfig) LogGroupPrefix() string

func (*HappyConfig) PrivateSubnets

func (s *HappyConfig) PrivateSubnets() ([]string, error)

func (*HappyConfig) SecurityGroups

func (s *HappyConfig) SecurityGroups() ([]string, error)

func (*HappyConfig) TerraformDirectory

func (s *HappyConfig) TerraformDirectory() string

func (*HappyConfig) TerraformVersion

func (s *HappyConfig) TerraformVersion() string

func (*HappyConfig) TfeOrg

func (s *HappyConfig) TfeOrg() (string, error)

func (*HappyConfig) TfeUrl

func (s *HappyConfig) TfeUrl() (string, error)

type HappyConfigIface

type HappyConfigIface interface {
	GetSecretArn() string
	GetTasks(taskType string) ([]string, error)
	AwsProfile() string
	AutoRunMigration() bool
	LogGroupPrefix() string
	TerraformDirectory() string
	TerraformVersion() string
	DefaultEnv() string
	DefaultComposeEnv() string
	App() string
	GetRdevServiceRegistries() (map[string]*RegistryConfig, error)
	ClusterArn() (string, error)
	PrivateSubnets() ([]string, error)
	SecurityGroups() ([]string, error)
	TfeUrl() (string, error)
	TfeOrg() (string, error)
}

func NewHappyConfig

func NewHappyConfig(configFile string, env string) (HappyConfigIface, error)

type RegistryConfig

type RegistryConfig struct {
	Url string `json:"url"`
}

func (*RegistryConfig) GetRegistryUrl

func (s *RegistryConfig) GetRegistryUrl() string

func (*RegistryConfig) GetRepoUrl

func (s *RegistryConfig) GetRepoUrl() string

type Secrets

type Secrets interface {
	GetTfeUrl() string
	GetTfeOrg() string
	GetClusterArn() string
	GetPrivateSubnets() []string
	GetSecurityGroups() []string
	GetServiceUrl(service string) (string, error)
	GetAllServicesUrl() map[string]*RegistryConfig
}

type SecretsBackend

type SecretsBackend interface {
	GetSecrets(secretArn string) (Secrets, error)
}

func GetAwsSecretMgr

func GetAwsSecretMgr(awsProfile string) SecretsBackend

type TfeSecrets

type TfeSecrets struct {
	Url string `json:"url"`
	Org string `json:"org"`
}

Jump to

Keyboard shortcuts

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