config

package
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertApps added in v1.1.1

func ConvertApps() error

func ConvertInfra added in v1.1.1

func ConvertInfra() error

func ConvertTunnel added in v1.1.1

func ConvertTunnel() error

func GetApps added in v1.1.7

GetApps returns a list of application names in the directory for shell completions

func InitConfig added in v1.1.1

func InitConfig()

func NewAWSClient added in v1.1.7

func NewAWSClient(options ...Option) *awsClient

func SetTag added in v1.1.1

func SetTag()

Types

type Alias added in v1.1.1

type Alias struct {
	Name      string   `mapstructure:",omitempty"`
	Icon      string   `mapstructure:"icon,omitempty"`
	DependsOn []string `mapstructure:"depends_on"`
}

type Config

type Config struct {
	AwsRegion       string `mapstructure:"aws_region"`
	AwsProfile      string `mapstructure:"aws_profile"`
	Namespace       string `mapstructure:"namespace"`
	Env             string `mapstructure:"env"`
	Session         *session.Session
	IsGlobal        bool
	IsDockerRuntime bool
	IsPlainText     bool
}

type Ecs

type Ecs struct {
	Name                   string   `mapstructure:",omitempty"`
	Path                   string   `mapstructure:",omitempty"`
	Image                  string   `mapstructure:",omitempty"`
	Cluster                string   `mapstructure:",omitempty"`
	TaskDefinitionRevision string   `mapstructure:"task_definition_revision"`
	DockerRegistry         string   `mapstructure:"docker_registry,omitempty"`
	Timeout                int      `mapstructure:",omitempty"`
	Unsafe                 bool     `mapstructure:",omitempty"`
	SkipDeploy             bool     `mapstructure:"skip_deploy,omitempty"`
	Icon                   string   `mapstructure:"icon,omitempty"`
	AwsProfile             string   `mapstructure:"aws_profile,omitempty"`
	AwsRegion              string   `mapstructure:"aws_region,omitempty"`
	DependsOn              []string `mapstructure:"depends_on,omitempty"`
}

type Infra added in v1.1.1

type Infra struct {
	Terraform Terraform `mapstructure:"infra.terraform,omitempty"`
	Tunnel    Tunnel    `mapstructure:"infra.tunnel,omitempty"`
}

type K8s added in v1.1.11

type K8s struct {
	Name                   string   `mapstructure:",omitempty"`
	Path                   string   `mapstructure:",omitempty"`
	Image                  string   `mapstructure:",omitempty"`
	Cluster                string   `mapstructure:",omitempty"`
	TaskDefinitionRevision string   `mapstructure:"task_definition_revision"`
	DockerRegistry         string   `mapstructure:"docker_registry,omitempty"`
	Timeout                int      `mapstructure:",omitempty"`
	Unsafe                 bool     `mapstructure:",omitempty"`
	SkipDeploy             bool     `mapstructure:"skip_deploy,omitempty"`
	Icon                   string   `mapstructure:"icon,omitempty"`
	AwsProfile             string   `mapstructure:"aws_profile,omitempty"`
	AwsRegion              string   `mapstructure:"aws_region,omitempty"`
	DependsOn              []string `mapstructure:"depends_on,omitempty"`
}

type Option added in v1.1.1

type Option func(*awsClient)

func WithCloudWatchLogsClient added in v1.1.7

func WithCloudWatchLogsClient(api cloudwatchlogsiface.CloudWatchLogsAPI) Option

func WithECRClient added in v1.1.7

func WithECRClient(api ecriface.ECRAPI) Option

func WithECSClient added in v1.1.7

func WithECSClient(api ecsiface.ECSAPI) Option

func WithELBV2Client added in v1.1.7

func WithELBV2Client(api elbv2iface.ELBV2API) Option

func WithIAMClient added in v1.1.7

func WithIAMClient(api iamiface.IAMAPI) Option

func WithS3Client added in v1.1.7

func WithS3Client(api s3iface.S3API) Option

func WithSSMClient added in v1.1.7

func WithSSMClient(api ssmiface.SSMAPI) Option

func WithSTSClient added in v1.1.7

func WithSTSClient(api stsiface.STSAPI) Option

type Project added in v1.1.1

type Project struct {
	TerraformVersion string `mapstructure:"terraform_version,omitempty"`
	AwsRegion        string `mapstructure:"aws_region,omitempty"`
	AwsProfile       string `mapstructure:"aws_profile,omitempty"`
	Namespace        string `mapstructure:",omitempty"`
	Env              string `mapstructure:",omitempty"`
	LogLevel         string `mapstructure:"log_level,omitempty"`
	PlainText        bool   `mapstructure:"plain_text_output,omitempty"`
	CustomPrompt     bool   `mapstructure:"custom_prompt,omitempty"`
	PreferRuntime    string `mapstructure:"prefer_runtime,omitempty"`
	Tag              string `mapstructure:",omitempty"`
	DockerRegistry   string `mapstructure:"docker_registry,omitempty"`

	Home      string `mapstructure:",omitempty"`
	RootDir   string `mapstructure:"root_dir,omitempty"`
	InfraDir  string `mapstructure:"ize_dir,omitempty"`
	EnvDir    string `mapstructure:"env_dir,omitempty"`
	AppsPath  string `mapstructure:"apps_path,omitempty"`
	TFLog     string `mapstructure:"tf_log,omitempty"`
	TFLogPath string `mapstructure:"tf_log_path,omitempty"`

	Session   *session.Session
	AWSClient *awsClient

	Tunnel     *Tunnel                `mapstructure:",omitempty"`
	Terraform  map[string]*Terraform  `mapstructure:",omitempty"`
	Ecs        map[string]*Ecs        `mapstructure:",omitempty"`
	Serverless map[string]*Serverless `mapstructure:",omitempty"`
	Alias      map[string]*Alias      `mapstructure:",omitempty"`
}

func (*Project) Generate added in v1.1.7

func (p *Project) Generate(tmpl string, funcs template.FuncMap) error

func (*Project) GetApps added in v1.1.1

func (p *Project) GetApps() map[string]*interface{}

func (*Project) GetConfig added in v1.1.7

func (p *Project) GetConfig() error

func (*Project) GetStates added in v1.1.7

func (p *Project) GetStates() map[string]*interface{}

func (*Project) GetTestConfig added in v1.1.7

func (p *Project) GetTestConfig() error

func (*Project) SettingAWSClient added in v1.1.7

func (p *Project) SettingAWSClient(sess *session.Session)

type Serverless added in v1.1.1

type Serverless struct {
	Name                    string   `mapstructure:",omitempty"`
	File                    string   `mapstructure:",omitempty"`
	NodeVersion             string   `mapstructure:"node_version"`
	ServerlessVersion       string   `mapstructure:"serverless_version"`
	Path                    string   `mapstructure:",omitempty"`
	SLSNodeModuleCacheMount string   `mapstructure:",omitempty"`
	CreateDomain            bool     `mapstructure:"create_domain"`
	Force                   bool     `mapstructure:"force"`
	Env                     []string `mapstructure:",omitempty"`
	Icon                    string   `mapstructure:"icon,omitempty"`
	UseYarn                 bool     `mapstructure:"use_yarn,omitempty"`
	AwsProfile              string   `mapstructure:"aws_profile,omitempty"`
	AwsRegion               string   `mapstructure:"aws_region,omitempty"`
	DependsOn               []string `mapstructure:"depends_on,omitempty"`
}

type Terraform added in v1.1.1

type Terraform struct {
	Version             string   `mapstructure:",omitempty"`
	StateBucketRegion   string   `mapstructure:"state_bucket_region,omitempty"`
	StateBucketName     string   `mapstructure:"state_bucket_name,omitempty"`
	StateName           string   `mapstructure:"state_name,omitempty"`
	RootDomainName      string   `mapstructure:"root_domain_name,omitempty"`
	TerraformConfigFile string   `mapstructure:"terraform_config_file,omitempty"`
	AwsRegion           string   `mapstructure:"aws_region,omitempty"`
	AwsProfile          string   `mapstructure:"aws_profile,omitempty"`
	DependsOn           []string `mapstructure:"depends_on,omitempty"`
}

type Tunnel added in v1.1.1

type Tunnel struct {
	BastionInstanceID string   `mapstructure:"bastion_instance_id,omitempty"`
	ForwardHost       []string `mapstructure:"forward_host,omitempty"`
	SSHPublicKey      string   `mapstructure:"ssh_public_key,omitempty"`
	SSHPrivateKey     string   `mapstructure:"ssh_private_key,omitempty"`
}

Jump to

Keyboard shortcuts

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