config

package
v0.0.0-...-b3562de Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const (

	// CleanupModeRollback ...
	CleanupModeRollback = "rollback"
	// CleanupModeRecreate ...
	CleanupModeRecreate = "recreate"
	// CleanupModeDestroy ...
	CleanupModeDestroy = "destroy"
	// CleanupModeCustomCommand ...
	CleanupModeCustomCommand = "custom-command"
)

Variables

This section is empty.

Functions

func DeleteSSHFilesFromDir

func DeleteSSHFilesFromDir(workdirPth string) (e error)

DeleteSSHFilesFromDir ...

func IsSSHKeypairFileExistInDirectory

func IsSSHKeypairFileExistInDirectory(workdirPth string) bool

IsSSHKeypairFileExistInDirectory ...

func WriteSSHKeypairToFiles

func WriteSSHKeypairToFiles(workdirPth string, privBytes, pubBytes []byte) (privFilePath, pubFilePath string, e error)

WriteSSHKeypairToFiles ...

Types

type EnvItemsModel

type EnvItemsModel map[string]string

EnvItemsModel ...

func CreateEnvItemsModelFromSlice

func CreateEnvItemsModelFromSlice(envsArr []string) (EnvItemsModel, error)

CreateEnvItemsModelFromSlice ...

type MachineConfigModel

type MachineConfigModel struct {
	CleanupMode string `json:"cleanup_mode"`
	// IsCleanupBeforeSetup - if true do a cleanup before setup, unless
	//  if the host is already in "prepared" state
	// You can force to do a cleanup for every setup if you specify
	//  the --force flag as well for the setup command.
	IsCleanupBeforeSetup bool `json:"is_cleanup_before_setup"`
	// IsAllowVagrantCreateInSetup - if true `vagrant create` will be called
	//  in Setup in case the VM is not yet created
	IsAllowVagrantCreateInSetup bool `json:"is_allow_vagrant_create_in_setup"`
	// IsDoTimesyncAtSetup - OS X only at the moment
	IsDoTimesyncAtSetup  bool   `json:"is_do_timesync_at_setup"`
	CustomCleanupCommand string `json:"custom_cleanup_command"`
	// Envs - these will be set as Environment Variables
	//  for setup, cleanup and destroy
	Envs EnvItemsModel `json:"envs"`
	// ConfigTypeEnvs - these envs will be added to the
	//  other Envs based on the "config-type-id" paramter/flag
	ConfigTypeEnvs map[string]EnvItemsModel `json:"config_type_envs"`
}

MachineConfigModel ...

func ReadMachineConfigFileFromDir

func ReadMachineConfigFileFromDir(workdirPth string, appendEnvs EnvItemsModel) (MachineConfigModel, error)

ReadMachineConfigFileFromDir ...

func (MachineConfigModel) AllCmdEnvsForConfigType

func (configModel MachineConfigModel) AllCmdEnvsForConfigType(configTypeID string) []string

AllCmdEnvsForConfigType ...

type SSHConfigModel

type SSHConfigModel struct {
	IP           string `json:"ip"`
	Port         string `json:"port"`
	IdentityPath string `json:"identity_path"`
	Loginname    string `json:"loginname"`
}

SSHConfigModel ...

func CreateSSHConfigFromVagrantSSHConfigLog

func CreateSSHConfigFromVagrantSSHConfigLog(vagrantSSHConfigLog string) (SSHConfigModel, error)

CreateSSHConfigFromVagrantSSHConfigLog ...

func ReadSSHConfigFileFromDir

func ReadSSHConfigFileFromDir(workdirPth string) (SSHConfigModel, error)

ReadSSHConfigFileFromDir ...

func (SSHConfigModel) SSHCommandArgs

func (model SSHConfigModel) SSHCommandArgs() []string

SSHCommandArgs ...

func (SSHConfigModel) WriteIntoFileInDir

func (model SSHConfigModel) WriteIntoFileInDir(workdirPth string) error

WriteIntoFileInDir ...

Jump to

Keyboard shortcuts

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