config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCommand added in v1.1.1

func CheckCommand(command string, subcommand []string) (string, error)

func CheckRequirements added in v1.1.1

func CheckRequirements(options ...Option) error

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 InitConfig added in v1.1.1

func InitConfig()

func ReadOSRelease added in v1.1.1

func ReadOSRelease(configfile string) (map[string]string, error)

func SetTag added in v1.1.1

func SetTag() error

func ShowUpgradeCommand added in v1.1.1

func ShowUpgradeCommand() error

Types

type Alias added in v1.1.1

type Alias struct {
	Name      string
	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"`
	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 Option added in v1.1.1

type Option func(*requiments)

func WithConfigFile added in v1.1.1

func WithConfigFile() Option

func WithIzeStructure added in v1.1.1

func WithIzeStructure() Option

func WithSSMPlugin added in v1.1.1

func WithSSMPlugin() 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,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:"infra_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

	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 GetConfig added in v1.1.1

func GetConfig() (*Project, error)

func (*Project) GetApps added in v1.1.1

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

type Serverless added in v1.1.1

type Serverless struct {
	Name                    string   `mapstructure:",omitempty"`
	File                    string   `mapstructure:",omitempty"`
	NodeVersion             string   `mapstructure:"node_version"`
	Path                    string   `mapstructure:",omitempty"`
	SLSNodeModuleCacheMount string   `mapstructure:",omitempty"`
	CreateDomain            bool     `mapstructure:"create_domain"`
	Env                     []string `mapstructure:",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"`
	RootDomainName    string `mapstructure:"root_domain_name,omitempty"`
	AwsRegion         string `mapstructure:"aws_region,omitempty"`
	AwsProfile        string `mapstructure:"aws_profile,omitempty"`
}

type Tunnel added in v1.1.1

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

Jump to

Keyboard shortcuts

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