Documentation ¶
Index ¶
- Constants
- Variables
- func CloseServerPort(hetznerClient *hcloud.Client, firewallID int, portToClose string) error
- func CreateElevenConfigStorage(elevenConfigDir string, apiToken string, region string) error
- func DetachFirewallFromServer(hetznerClient *hcloud.Client, firewallID int, serverID int) error
- func LookupElevenConfig(elevenConfigDir string, apiToken string, region string) (string, error)
- func OpenServerPort(hetznerClient *hcloud.Client, firewallID int, portToOpen string) error
- func RemoveElevenConfig(elevenConfigDir string, apiToken string, region string) error
- func RemoveFirewall(hetznerClient *hcloud.Client, firewallID int) error
- func RemoveNetwork(hetznerClient *hcloud.Client, networkID int) error
- func RemoveSSHKey(hetznerClient *hcloud.Client, sshKeyID int) error
- func RemoveServer(hetznerClient *hcloud.Client, serverID int) error
- func SaveElevenConfig(elevenConfigDir string, apiToken string, region string, configJSON []byte) error
- func WaitForSSHAvailableInServer(serverPublicIPAddress string, serverSSHPort string) (returnedError error)
- type Firewall
- type InitServerScriptResults
- type Location
- type Network
- type RawInitServerScriptResults
- type SSHKey
- type Server
- type ServerTypeInfos
Constants ¶
View Source
const ( ServerSSHPort = 22 ServerRootUser = "root" )
View Source
const ElevenConfigFileName = "config.json"
View Source
const (
ServerImage = "ubuntu-22.04"
)
Variables ¶
View Source
var (
ErrElevenConfigNotFound = errors.New("ErrElevenConfigNotFound")
)
View Source
var (
ErrInvalidServerType = errors.New("ErrInvalidServerType")
)
Functions ¶
func CloseServerPort ¶
func LookupElevenConfig ¶
func OpenServerPort ¶
func RemoveElevenConfig ¶
func SaveElevenConfig ¶
Types ¶
type Firewall ¶
func CreateFirewall ¶
type InitServerScriptResults ¶
type InitServerScriptResults struct { ExitCode string `json:"exit_code"` SSHHostKeys []entities.EnvSSHHostKey `json:"ssh_host_keys"` }
type Location ¶
type Location struct { ID int `json:"id"` Name string `json:"name"` NetworkZone hcloud.NetworkZone `json:"network_zone"` }
type SSHKey ¶
type Server ¶
type Server struct { ID int `json:"id"` Type string `json:"type"` PublicIPAddress string `json:"tmp_public_ip_address"` InitScriptResults *InitServerScriptResults `json:"init_script_results"` }
type ServerTypeInfos ¶
func LookupServerTypeInfos ¶
Source Files ¶
- close_server_port.go
- create_eleven_config_storage.go
- create_firewall.go
- create_network.go
- create_server.go
- create_ssh_key.go
- detach_firewall.go
- lookup_eleven_config.go
- lookup_location.go
- lookup_server_type_infos.go
- open_server_port.go
- remove_eleven_config.go
- remove_firewall.go
- remove_network.go
- remove_server.go
- remove_ssh_key.go
- save_eleven_config.go
- server_ssh.go
Click to show internal directories.
Click to hide internal directories.