manager

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 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 Dir

type Dir struct {
	Plugins string
	Initial string
	Run     string
}

type Manager

type Manager struct {
	Cloud       iota.Cloud
	Tool        iota.Tool
	Path        *Path
	Environment any
}

func NewManager

func NewManager(
	cloud iota.Cloud,
	tool iota.Tool,
) (*Manager, error)

Creates a new manager. Used for cmd workflows

func (*Manager) CreateSshConfig added in v0.1.1

func (m *Manager) CreateSshConfig() error

Generates a ssh config file at the current working directory

func (*Manager) CreateTemplate

func (m *Manager) CreateTemplate() error

Creates a template file by merging the cloud and base files.

func (*Manager) CreateVars

func (m *Manager) CreateVars() (*os.File, error)

Creates a vars file.

func (*Manager) DeletePluginsDir

func (m *Manager) DeletePluginsDir() error

Deletes the plugins directory.

func (*Manager) DeleteSshConfig

func (m *Manager) DeleteSshConfig() error

Deletes the ssh config file.

func (*Manager) DeleteTemplate

func (m *Manager) DeleteTemplate() error

Deletes the merged template file.

func (*Manager) DeleteVars

func (m *Manager) DeleteVars() error

Deletes the vars file.

func (*Manager) GoToDirInitial added in v0.1.1

func (m *Manager) GoToDirInitial() error

Changes the current working directory to the initial dir

func (*Manager) GoToDirRun added in v0.1.1

func (m *Manager) GoToDirRun() error

Changes the current working directory to the run dir

func (*Manager) ParseTemplate

func (m *Manager) ParseTemplate() (*template.Template, error)

Parses the merged template.

func (*Manager) SetCloudCredentials added in v0.1.1

func (m *Manager) SetCloudCredentials() error

Sets the cloud credentials environment variables.

func (*Manager) SetPluginsPath added in v0.1.1

func (m *Manager) SetPluginsPath() error

Sets the plugins path environment variable.

func (*Manager) ToolExecutableExists

func (m *Manager) ToolExecutableExists() bool

Return true if the tool executable exists

func (*Manager) UnsetCloudCredentials added in v0.1.1

func (m *Manager) UnsetCloudCredentials() error

Unsets the cloud credentials environment variables.

func (*Manager) UnsetPluginsEnvironmentVars

func (m *Manager) UnsetPluginsEnvironmentVars() error

Unsets the plugins path environment variable.

type Path

type Path struct {
	Executable string
	Vars       string
	Terraform  *Terraform
	Template   *Template
	Dir        *Dir
}

type Template

type Template struct {
	Merged string
	Cloud  string
	Base   string
}

type Terraform

type Terraform struct {
	Lock         string
	State        string
	Backup       string
	SshConfig    string
	IpFile       string
	IdentityFile string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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