Documentation
¶
Index ¶
- type CloudProviderInterface
- type CostStruct
- type Price
- type ProviderAws
- func (p ProviderAws) CreateSSHKey(publicKeyFile string) (keyID string, err error)
- func (p ProviderAws) Deploy(server Vm) (Vm, error)
- func (p ProviderAws) Destroy(server Vm) error
- func (p ProviderAws) GetByName(serverName string) (Vm, error)
- func (p ProviderAws) List() (VmList, error)
- func (p ProviderAws) SSHInto(serverName string, port int, privateKey string)
- type ProviderAzure
- func (p ProviderAzure) CreateSSHKey(publicKeyFileName string) (string, error)
- func (p ProviderAzure) Deploy(server Vm) (Vm, error)
- func (p ProviderAzure) Destroy(server Vm) error
- func (p ProviderAzure) GetByName(serverName string) (Vm, error)
- func (p ProviderAzure) List() (VmList, error)
- func (p ProviderAzure) SSHInto(serverName string, port int, privateKey string)
- type ProviderGcp
- func (p ProviderGcp) CreateSSHKey(publicKeyFile string) (keyID string, err error)
- func (p ProviderGcp) Deploy(server Vm) (Vm, error)
- func (p ProviderGcp) Destroy(server Vm) error
- func (p ProviderGcp) GetByName(serverName string) (Vm, error)
- func (p ProviderGcp) List() (VmList, error)
- func (p ProviderGcp) SSHInto(serverName string, port int, privateKey string)
- type ProviderHetzner
- func (p ProviderHetzner) CreateSSHKey(publicKeyFile string) (keyID string, err error)
- func (p ProviderHetzner) Deploy(server Vm) (Vm, error)
- func (p ProviderHetzner) Destroy(server Vm) error
- func (p ProviderHetzner) GetByName(serverName string) (Vm, error)
- func (p ProviderHetzner) List() (VmList, error)
- func (p ProviderHetzner) SSHInto(serverName string, port int, privateKey string)
- type QueryResponse
- type Vm
- type VmList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudProviderInterface ¶
type CloudProviderInterface interface {
// Deploy deploys a new instance
Deploy(Vm) (Vm, error)
// Destroy destroys an instance
Destroy(Vm) error
// List lists all instances
List() (VmList, error)
// CreateSSHKey creates a new SSH key
CreateSSHKey(publicKeyFile string) (keyID string, err error)
// SSHInto connects to a VM
SSHInto(serverName string, port int, privateKey string)
// GetByName gets a VM by name
GetByName(serverName string) (Vm, error)
}
type CostStruct ¶ added in v0.1.6
type ProviderAws ¶
func (ProviderAws) CreateSSHKey ¶
func (p ProviderAws) CreateSSHKey(publicKeyFile string) (keyID string, err error)
func (ProviderAws) Destroy ¶
func (p ProviderAws) Destroy(server Vm) error
func (ProviderAws) GetByName ¶ added in v0.1.6
func (p ProviderAws) GetByName(serverName string) (Vm, error)
func (ProviderAws) List ¶
func (p ProviderAws) List() (VmList, error)
type ProviderAzure ¶
type ProviderAzure struct {
ResourceGraphClient *armresourcegraph.Client
VmClient *armcompute.VirtualMachinesClient
NicClient *armnetwork.InterfacesClient
PublicIPClient *armnetwork.PublicIPAddressesClient
SSHKeyClient *armcompute.SSHPublicKeysClient
VnetClient *armnetwork.VirtualNetworksClient
NSGClient *armnetwork.SecurityGroupsClient
}
func (ProviderAzure) CreateSSHKey ¶
func (p ProviderAzure) CreateSSHKey(publicKeyFileName string) (string, error)
func (ProviderAzure) Destroy ¶
func (p ProviderAzure) Destroy(server Vm) error
func (ProviderAzure) GetByName ¶ added in v0.1.6
func (p ProviderAzure) GetByName(serverName string) (Vm, error)
func (ProviderAzure) List ¶
func (p ProviderAzure) List() (VmList, error)
type ProviderGcp ¶ added in v0.1.11
type ProviderGcp struct {
Client *compute.InstancesClient
GroupClient *compute.InstanceGroupsClient
}
func (ProviderGcp) CreateSSHKey ¶ added in v0.1.11
func (p ProviderGcp) CreateSSHKey(publicKeyFile string) (keyID string, err error)
func (ProviderGcp) Destroy ¶ added in v0.1.11
func (p ProviderGcp) Destroy(server Vm) error
func (ProviderGcp) GetByName ¶ added in v0.1.11
func (p ProviderGcp) GetByName(serverName string) (Vm, error)
func (ProviderGcp) List ¶ added in v0.1.11
func (p ProviderGcp) List() (VmList, error)
type ProviderHetzner ¶
func (ProviderHetzner) CreateSSHKey ¶
func (p ProviderHetzner) CreateSSHKey(publicKeyFile string) (keyID string, err error)
func (ProviderHetzner) Destroy ¶
func (p ProviderHetzner) Destroy(server Vm) error
func (ProviderHetzner) GetByName ¶ added in v0.1.6
func (p ProviderHetzner) GetByName(serverName string) (Vm, error)
func (ProviderHetzner) List ¶
func (p ProviderHetzner) List() (VmList, error)
type QueryResponse ¶ added in v0.1.3
type Vm ¶
type Vm struct {
// ID is the ID of the instance
ID string
// Name is the name of the instance
Name string `yaml:"name"`
// IP is the public IP of the instance
IP string
//LocalIP is the local IP of the instance
PrivateIP string
// Type is the type of the instance
Type string `yaml:"type"`
// Status is the status of the instance
Status string
// Location is the location of the instance
Location string
// SSHKeyID is the ID of the SSH key
SSHKeyID string
// SSHPort is the port to connect to the instance
SSHPort int `yaml:"sshPort"`
// CloudInit is the cloud-init file
CloudInitFile string `yaml:"cloudInitFile"`
// CreatedAt is the creation date of the instance
CreatedAt time.Time
// Provider is the cloud provider
Provider string
// Cost is the cost of the vm
Cost CostStruct
}
Click to show internal directories.
Click to hide internal directories.