Documentation ¶
Index ¶
- func AddCertificateFromHaip(c gotransip.Client, haipName string, certificateID int64) error
- func AddPortConfiguration(c gotransip.Client, haipName string, pc PortConfiguration) error
- func CancelHaip(c gotransip.Client, haipName string, endTime gotransip.CancellationTime) error
- func DeleteCertificateFromHaip(c gotransip.Client, haipName string, certificateID int64) error
- func DeletePortConfiguration(c gotransip.Client, haipName string, ID int64) error
- func GetPtrForHaip(c gotransip.Client, haipName string) (string, error)
- func GetStatusReport(c gotransip.Client, haipName string) error
- func SetBalancingMode(c gotransip.Client, haipName string, balancingMode BalancingMode, ...) error
- func SetDefaultPortConfiguration(c gotransip.Client, haipName string) error
- func SetHTTPHealthCheck(c gotransip.Client, haipName, path string, port int) error
- func SetHaipDescription(c gotransip.Client, haipName string, description string) error
- func SetHaipVpses(c gotransip.Client, haipName string, vpsNames []string) error
- func SetIPSetup(c gotransip.Client, haipName string, setup IPSetup) error
- func SetPtrForHaip(c gotransip.Client, haipName string, ptr string) error
- func SetTCPHealthCheck(c gotransip.Client, haipName string) error
- func StartHaipLetsEncryptCertificateIssue(c gotransip.Client, haipName, commonName string) error
- func UpdatePortConfiguration(c gotransip.Client, haipName string, pc PortConfiguration) error
- type BalancingMode
- type Certificate
- type EndpointSSLMode
- type Haip
- type HealthCheckMode
- type IPSetup
- type Mode
- type PortConfiguration
- type Status
- type StatusReport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCertificateFromHaip ¶
AddCertificateFromHaip adds a certificate to given HA-IP
func AddPortConfiguration ¶
func AddPortConfiguration(c gotransip.Client, haipName string, pc PortConfiguration) error
AddPortConfiguration adds a port configuration to given HA-IP
func CancelHaip ¶
CancelHaip cancels contract for HA-IP per endTime
func DeleteCertificateFromHaip ¶
DeleteCertificateFromHaip removes a certificate from given HA-IP
func DeletePortConfiguration ¶
DeletePortConfiguration deletes a port configuration to given HA-IP
func GetPtrForHaip ¶
GetPtrForHaip returns the current PTR for the given HA-IP
func GetStatusReport ¶
GetStatusReport returns status report for given HA-IP
func SetBalancingMode ¶
func SetBalancingMode(c gotransip.Client, haipName string, balancingMode BalancingMode, cookieName string) error
SetBalancingMode sets the provided balancing mode for the HA-IP. The cookieName argument may be an empty string unless the balancing mode is set to 'cookie'.
func SetDefaultPortConfiguration ¶
SetDefaultPortConfiguration reverts the port configuration to the default for given HA-IP
func SetHTTPHealthCheck ¶
SetHTTPHealthCheck configures a HTTP health check for the HA-IP. To disable a HTTP health check use SetTCPHealthCheck()
func SetHaipDescription ¶
SetHaipDescription updates the description for HA-IP
func SetHaipVpses ¶
SetHaipVpses replaces currently attached VPSes to the HA-IP with the provided list of VPSes
func SetIPSetup ¶
SetIPSetup sets the IP setup for the HA-IP
func SetPtrForHaip ¶
SetPtrForHaip updates the PTR records for the given HA-IP
func SetTCPHealthCheck ¶
SetTCPHealthCheck configures a TCP health check for the HA-IP (this is the default health check)
func StartHaipLetsEncryptCertificateIssue ¶
StartHaipLetsEncryptCertificateIssue adds Let's Encrypt SSL encryption to HA-IP for given commonName
func UpdatePortConfiguration ¶
func UpdatePortConfiguration(c gotransip.Client, haipName string, pc PortConfiguration) error
UpdatePortConfiguration updates an existsing port configuration to given HA-IP
Types ¶
type BalancingMode ¶
type BalancingMode string
BalancingMode represents the possible load balancing modes configurable for HA-IP
var ( // BalancingModeRoundRobin balances on a round-robin base BalancingModeRoundRobin BalancingMode = "roundrobin" // BalancingModeCookie balances based on a predefined cookie sent by the client // from the second request onwards BalancingModeCookie BalancingMode = "cookie" // BalancingModeSource balances based on the source address of the client BalancingModeSource BalancingMode = "source" )
type Certificate ¶
Certificate represents a HA-IP certificate
func GetAvailableCertificatesByHaip ¶
func GetAvailableCertificatesByHaip(c gotransip.Client, haipName string) ([]Certificate, error)
GetAvailableCertificatesByHaip returns all available certificates ready to attach to given HA-IP
func GetCertificatesByHaip ¶
func GetCertificatesByHaip(c gotransip.Client, haipName string) ([]Certificate, error)
GetCertificatesByHaip returns all certificates attached given HA-IP
type EndpointSSLMode ¶
type EndpointSSLMode string
EndpointSSLMode represents possible modes of encryption between HA-IP and VPSes
var ( // EndpointSSLModeOff means traffic to VPSes is sent unencrypted EndpointSSLModeOff EndpointSSLMode = "off" // EndpointSSLModeOn means traffic to VPSes is sent encrypted, certificate can // be self-signed, no verification is applied EndpointSSLModeOn EndpointSSLMode = "on" // EndpointSSLModeStrict means traffic to VPSes is sent encrypted, certificate's // CA should be trusted EndpointSSLModeStrict EndpointSSLMode = "strict" )
type Haip ¶
type Haip struct { Name string `xml:"name"` Status Status `xml:"status"` IsBlocked bool `xml:"isBlocked"` IsLoadBalancingEnabled bool `xml:"isLoadBalancingEnabled"` LoadBalancingMode BalancingMode `xml:"loadBalancingMode"` StickyCookieName string `xml:"stickyCookieName"` HealthCheckMode HealthCheckMode `xml:"healthCheckMode"` HTTPHealthCheckPath string `xml:"httpHealthCheckPath"` HTTPHealthCheckPort int `xml:"httpHealthCheckPort"` IPv4Address net.IP `xml:"ipv4Address"` IPv6Address net.IP `xml:"ipv6Address"` IPSetup IPSetup `xml:"ipSetup"` AttachedVpses []vps.Vps `xml:"attachedVpses>item"` }
Haip represents a Transip_Haip object https://api.transip.nl/docs/transip.nl/class-Transip_Haip.html
type HealthCheckMode ¶
type HealthCheckMode string
HealthCheckMode represents the possible health checking modes configurable for HA-IP
var ( // HealthCheckModeTCP checks whether the specified TCP port of a Vps is reachable HealthCheckModeTCP HealthCheckMode = "tcp" // HealthCheckModeHTTP performs HTTP requests based on HTTPHealthCheckPath and // httpHealthCheckPort HealthCheckModeHTTP HealthCheckMode = "http" )
type IPSetup ¶
type IPSetup string
IPSetup represents the possible ipSetups configurable for HA-IP
var ( // IPSetupBoth forwards IPv4 and IPv6 to the VPS's respective addresses IPSetupBoth IPSetup = "both" // IPSetupNoIPv6 only forwards IPv4 IPSetupNoIPv6 IPSetup = "noipv6" // IPSetupIPv6To4 forwards both IPv4 and IPv6 to the VPS's IPv4 address IPSetupIPv6To4 IPSetup = "ipv6to4" // IPSetupIPv4To6 forwards both IPv4 and IPv6 to the VPS's IPv6 address IPSetupIPv4To6 IPSetup = "ipv4to6" )
type PortConfiguration ¶
type PortConfiguration struct { ID int64 Name string Mode Mode SourcePort int64 TargetPort int64 EndpointSSLMode EndpointSSLMode }
PortConfiguration represents a HA-IP's port configuration
func GetPortConfigurations ¶
func GetPortConfigurations(c gotransip.Client, haipName string) ([]PortConfiguration, error)
GetPortConfigurations returns all port configurations for given HA-IP
type StatusReport ¶
type StatusReport struct {
PortConfiguration []statusReportPortConfiguration
}
StatusReport represents the structured data that is returned from GetStatusReport