Documentation
¶
Index ¶
- func CredentialsPath() string
- func SaveCredentials(c *Credentials) error
- type BareMetal
- type BareMetalCreateConfig
- type Credentials
- type DNSRecord
- type DNSZone
- type K8sAddon
- type K8sCluster
- type K8sCreateConfig
- type K8sNodePool
- type K8sNodePoolConfig
- type LBCreateConfig
- type LBHealthCheckConfig
- type LBListener
- type LBListenerConfig
- type LBTarget
- type LBTargetConfig
- type LoadBalancer
- type Provider
- type SSHKey
- type SSHKeyCreateConfig
- type VPS
- type VPSCreateConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CredentialsPath ¶
func CredentialsPath() string
func SaveCredentials ¶
func SaveCredentials(c *Credentials) error
Types ¶
type BareMetalCreateConfig ¶
type Credentials ¶
type Credentials struct {
CubePathAPIKey string `yaml:"cubepath_api_key"`
HetznerAPIToken string `yaml:"hetzner_api_token"`
DigitalOceanToken string `yaml:"digitalocean_token"`
VultrAPIKey string `yaml:"vultr_api_key"`
AWSRegion string `yaml:"aws_region"`
AWSProfile string `yaml:"aws_profile"`
}
func LoadCredentials ¶
func LoadCredentials() (*Credentials, error)
type K8sCluster ¶
type K8sCreateConfig ¶
type K8sNodePool ¶ added in v0.4.0
type K8sNodePoolConfig ¶ added in v0.4.0
type LBCreateConfig ¶
type LBHealthCheckConfig ¶ added in v0.4.0
type LBListener ¶ added in v0.4.0
type LBListener struct {
ID string
Port int
TargetPort int
Protocol string
HealthCheck *LBHealthCheckConfig
}
type LBListenerConfig ¶ added in v0.4.0
type LBTargetConfig ¶ added in v0.4.0
type LoadBalancer ¶
type Provider ¶
type Provider interface {
// VPS
CreateVPS(ctx context.Context, cfg VPSCreateConfig) (*VPS, error)
DeleteVPS(ctx context.Context, id string) error
ListVPS(ctx context.Context) ([]VPS, error)
GetVPS(ctx context.Context, id string) (*VPS, error)
// Kubernetes
CreateK8s(ctx context.Context, cfg K8sCreateConfig) (*K8sCluster, error)
DeleteK8s(ctx context.Context, id string) error
ListK8s(ctx context.Context) ([]K8sCluster, error)
GetK8s(ctx context.Context, id string) (*K8sCluster, error)
GetKubeconfig(ctx context.Context, id string) (string, error)
UpdateK8s(ctx context.Context, id, version string) (*K8sCluster, error)
ToggleK8sProtection(ctx context.Context, id string) (*K8sCluster, error)
ListK8sAddons(ctx context.Context, id string) ([]K8sAddon, error)
ListAvailableAddons(ctx context.Context) ([]K8sAddon, error)
InstallK8sAddon(ctx context.Context, id, slug string) error
UninstallK8sAddon(ctx context.Context, id, addonID string) error
ListK8sNodePools(ctx context.Context, id string) ([]K8sNodePool, error)
CreateK8sNodePool(ctx context.Context, id string, cfg K8sNodePoolConfig) (*K8sNodePool, error)
ScaleK8sNodePool(ctx context.Context, id, poolID string, nodes int) error
DeleteK8sNodePool(ctx context.Context, id, poolID string) error
ListK8sLBs(ctx context.Context, id string) ([]LoadBalancer, error)
// Bare Metal
CreateBareMetal(ctx context.Context, cfg BareMetalCreateConfig) (*BareMetal, error)
DeleteBareMetal(ctx context.Context, id string) error
ListBareMetal(ctx context.Context) ([]BareMetal, error)
// Load Balancer
CreateLB(ctx context.Context, cfg LBCreateConfig) (*LoadBalancer, error)
DeleteLB(ctx context.Context, id string) error
ListLB(ctx context.Context) ([]LoadBalancer, error)
CreateLBListener(ctx context.Context, lbID string, cfg LBListenerConfig) (*LBListener, error)
UpdateLBListener(ctx context.Context, lbID, listenerID string, cfg LBListenerConfig) (*LBListener, error)
DeleteLBListener(ctx context.Context, lbID, listenerID string) error
SetLBHealthCheck(ctx context.Context, lbID, listenerID string, cfg LBHealthCheckConfig) error
AddLBTarget(ctx context.Context, lbID, listenerID string, cfg LBTargetConfig) (*LBTarget, error)
ListLBTargets(ctx context.Context, lbID, listenerID string) ([]LBTarget, error)
DrainLBTarget(ctx context.Context, lbID, listenerID, targetID string) error
ResizeLB(ctx context.Context, lbID, plan string) (*LoadBalancer, error)
GetLBMetrics(ctx context.Context, lbID string) (string, error)
ToggleLBProtection(ctx context.Context, lbID string) (*LoadBalancer, error)
// DNS
ListDNSZones(ctx context.Context) ([]DNSZone, error)
CreateDNSRecord(ctx context.Context, zoneID string, r DNSRecord) error
DeleteDNSRecord(ctx context.Context, zoneID, recordID string) error
// SSH Keys
CreateSSHKey(ctx context.Context, cfg SSHKeyCreateConfig) (*SSHKey, error)
ListSSHKeys(ctx context.Context) ([]SSHKey, error)
DeleteSSHKey(ctx context.Context, id string) error
}
Provider defines all operations a cloud provider can support. Each method returns "not implemented" if the provider doesn't offer that service.
type SSHKeyCreateConfig ¶
Click to show internal directories.
Click to hide internal directories.