entities

package
v0.0.0-...-debe96b Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Container = wire.NewSet(
	NewSettings,
	NewCLI,
)

Functions

This section is empty.

Types

type AppContext

type AppContext interface {
	GetControllers() []Controller
}

type CLI

type CLI interface {
	GetName() string
	CanChangeAccount() bool
	GetCommandChangeAccount() []string
}

func NewCLI

func NewCLI(settings *Settings) CLI

type CLIAws

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

func NewCLIAws

func NewCLIAws(settings *Settings) *CLIAws

func (*CLIAws) CanChangeAccount

func (it *CLIAws) CanChangeAccount() bool

func (*CLIAws) GetCommandChangeAccount

func (it *CLIAws) GetCommandChangeAccount() []string

func (*CLIAws) GetName

func (it *CLIAws) GetName() string

type CLIAzm

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

func NewCLIAzm

func NewCLIAzm(settings *Settings) *CLIAzm

func (*CLIAzm) CanChangeAccount

func (it *CLIAzm) CanChangeAccount() bool

func (*CLIAzm) GetCommandChangeAccount

func (it *CLIAzm) GetCommandChangeAccount() []string

func (*CLIAzm) GetName

func (it *CLIAzm) GetName() string

type Controller

type Controller interface {
	GetBind() ControllerBind
	Execute(command *cobra.Command, arguments []string)
}

type ControllerBind

type ControllerBind struct {
	Use   string
	Short string
	Long  string
}

type Dependency

type Dependency struct {
	Name              string
	CLI               string
	VersionURL        string
	BinaryURL         string
	RegexVersion      string
	FormattingCommand []string
}

type OS

type OS interface {
	Download(url, tempFilePath string) error
	Extract(tempFilePath, destPath string) error
	Move(tempFilePath, destPath string) error
	Remove(tempFilePath string) error
	MakeExecutable(filePath string) error
	GetTempDir() string
	GetInstallationPath() string
}

type OSLinux

type OSLinux struct{}

func GetOS

func GetOS() *OSLinux

func (*OSLinux) Download

func (it *OSLinux) Download(url, tempFilePath string) error

func (*OSLinux) Extract

func (it *OSLinux) Extract(tempFilePath, destPath string) error

func (*OSLinux) GetInstallationPath

func (it *OSLinux) GetInstallationPath() string

func (*OSLinux) GetTempDir

func (it *OSLinux) GetTempDir() string

func (*OSLinux) MakeExecutable

func (it *OSLinux) MakeExecutable(filePath string) error

func (*OSLinux) Move

func (it *OSLinux) Move(tempFilePath, destPath string) error

func (*OSLinux) Remove

func (it *OSLinux) Remove(tempFilePath string) error

type Settings

type Settings struct {
	TerraCloud               string `envconfig:"TERRA_CLOUD"                 required:"false" validate:"oneof=aws azure"`
	TerraTerraformWorkspace  string `envconfig:"TERRA_WORKSPACE"             required:"false"`
	TerraAwsRoleArn          string `envconfig:"TERRA_AWS_ROLE_ARN"          required:"false"`
	TerraAzureSubscriptionID string `envconfig:"TERRA_AZURE_SUBSCRIPTION_ID" required:"false"`
}

func NewSettings

func NewSettings() *Settings

Jump to

Keyboard shortcuts

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