tools

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ONCTLDIR = ".onctl"
)

Variables

This section is empty.

Functions

func Contains

func Contains(slice []string, searchValue string) bool

func CreateDeployOutputFile

func CreateDeployOutputFile(deployOutput *DeployOutput)

func FileToBase64 added in v0.1.2

func FileToBase64(filepath string) string

func GenerateMachineUniqueName

func GenerateMachineUniqueName() string

func GenerateUserName added in v0.1.2

func GenerateUserName() string

func GetSubnets

func GetSubnets(svc *ec2.EC2, vpcId *string) []*ec2.Subnet

func GetVpcs

func GetVpcs(svc *ec2.EC2) *ec2.DescribeVpcsOutput

func NextApplyDir added in v0.1.6

func NextApplyDir(path string) (applyDirName string, nextApplyDirError error)

func ParseDotEnvFile added in v0.1.8

func ParseDotEnvFile(dotEnvFile string) ([]string, error)

func SSHIntoVM

func SSHIntoVM(ipAddress string, user string, port int)

func StringSliceToPointerSlice

func StringSliceToPointerSlice(strSlice []string) []*string

func WhichCloudProvider

func WhichCloudProvider() string

Types

type CopyAndRunRemoteFileConfig added in v0.1.6

type CopyAndRunRemoteFileConfig struct {
	File string
	Vars []string
}

type DeployOutput

type DeployOutput struct {
	Username   string `json:"username"`
	PublicURL  string `json:"public_url"`
	PublicIP   string `json:"public_ip"`
	DockerHost string `json:"docker_host"`
}

type Remote added in v0.1.6

type Remote struct {
	Username   string
	IPAddress  string
	SSHPort    int
	PrivateKey string
	Client     *ssh.Client
}

func (*Remote) CopyAndRunRemoteFile added in v0.1.6

func (r *Remote) CopyAndRunRemoteFile(config *CopyAndRunRemoteFileConfig) error

creates a new apply dir and copies the file to the remote ex. ~/.onctl/apply01 executes the file on the remote

func (*Remote) DownloadFile added in v0.1.9

func (r *Remote) DownloadFile(srcPath, dstPath string) error

func (*Remote) NewSSHConnection added in v0.1.6

func (r *Remote) NewSSHConnection() error

func (*Remote) RemoteRun added in v0.1.6

func (r *Remote) RemoteRun(remoteRunConfig *RemoteRunConfig) (string, error)

func (*Remote) SSHCopyFile added in v0.1.6

func (r *Remote) SSHCopyFile(srcPath, dstPath string) error

func (*Remote) WaitForCloudInit added in v0.1.6

func (r *Remote) WaitForCloudInit()

WaitForCloudInit waits for cloud-init to finish

type RemoteRunConfig added in v0.1.6

type RemoteRunConfig struct {
	Command string
	Vars    []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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