tools

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

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

func CreateConfigDirIfNotExist

func CreateConfigDirIfNotExist() (string, error)

CreateConfigDirIfNotExist creates a directory on home directory if it does not exist and return the path.

func CreateDeployOutputFile

func CreateDeployOutputFile(deployOutput *DeployOutput)

func GenerateMachineUniqueName

func GenerateMachineUniqueName() string

func GetSecurityGroupByName

func GetSecurityGroupByName(svc *ec2.EC2, name string) []*ec2.SecurityGroup

func GetSecurityGroups

func GetSecurityGroups(svc *ec2.EC2, vpcId *string) []*ec2.SecurityGroup

func GetSubnets

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

func GetVpcs

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

func RemoteRun

func RemoteRun(user string, addr string, privateKey string, cmd string) (string, error)

e.g. output, err := remoteRun("root", "MY_IP", "PRIVATE_KEY", "ls")

func RunDockerCompose

func RunDockerCompose(username, ip, privateKey, composeFile string)

func RunInit

func RunInit(username, ip, privateKey, initFile string)

func RunLocalInit

func RunLocalInit(username, ip, privateKey, initFile string)

func RunRemoteBashScript

func RunRemoteBashScript(username, ip, privateKey, bashScript string) (string, error)

func SSHCopyFile

func SSHCopyFile(user string, addr string, privateKey string, srcPath, dstPath string) error

func SSHIntoVM

func SSHIntoVM(ipAddress, user string)

func StringSliceToPointerSlice

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

func WaitForCloudInit

func WaitForCloudInit(username, ip string, privateKey string)

func WhichCloudProvider

func WhichCloudProvider() string

Types

type DeployOutput

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

Jump to

Keyboard shortcuts

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