Documentation ¶
Index ¶
- func AddIpv6ToVps(c gotransip.Client, vpsName string, ipv6Address net.IP) error
- func AddVpsToPrivateNetwork(c gotransip.Client, vpsName, privateNetworkName string) error
- func CancelAddon(c gotransip.Client, vpsName, addonName string) error
- func CancelPrivateNetwork(c gotransip.Client, privateNetworkName string, ...) error
- func CancelVps(c gotransip.Client, vpsName string, endTime gotransip.CancellationTime) error
- func CloneVps(c gotransip.Client, vpsName string) error
- func CloneVpsToAvailabilityZone(c gotransip.Client, vpsName, availabilityZone string) error
- func CreateSnapshot(c gotransip.Client, vpsName, description string) error
- func GetAllIps(c gotransip.Client) ([]net.IP, error)
- func GetIpsForVps(c gotransip.Client, vpsName string) ([]net.IP, error)
- func HandoverVps(c gotransip.Client, vpsName, targetAccountname string) error
- func InstallOperatingSystem(c gotransip.Client, vpsName, operatingSystemName, hostname string) error
- func InstallOperatingSystemUnattended(c gotransip.Client, vpsName, operatingSystemName, base64InstallText string) error
- func OrderAddon(c gotransip.Client, vpsName string, addons []string) error
- func OrderPrivateNetwork(c gotransip.Client) error
- func OrderVps(c gotransip.Client, productName string, addons []string, ...) error
- func OrderVpsInAvailabilityZone(c gotransip.Client, productName string, addons []string, ...) error
- func RemoveSnapshot(c gotransip.Client, vpsName, snapshotName string) error
- func RemoveVpsFromPrivateNetwork(c gotransip.Client, vpsName, privateNetworkName string) error
- func Reset(c gotransip.Client, vpsName string) error
- func RevertSnapshot(c gotransip.Client, vpsName, snapshotName string) error
- func RevertSnapshotToOtherVps(c gotransip.Client, sourceVpsName, snapshotName, destinationVpsName string) error
- func RevertVpsBackup(c gotransip.Client, vpsName string, vpsBackupID int64) error
- func SetCustomerLock(c gotransip.Client, vpsName string, enabled bool) error
- func Start(c gotransip.Client, vpsName string) error
- func Stop(c gotransip.Client, vpsName string) error
- func UpdatePtrRecord(c gotransip.Client, ipAddress net.IP, ptrRecord string) error
- func UpgradeVps(c gotransip.Client, vpsName, upgradeToProductName string) error
- type AvailabilityZone
- type Backup
- type OperatingSystem
- type PrivateNetwork
- type Product
- func GetActiveAddonsForVps(c gotransip.Client, vpsName string) ([]Product, error)
- func GetAvailableAddons(c gotransip.Client) ([]Product, error)
- func GetAvailableAddonsForVps(c gotransip.Client, vpsName string) ([]Product, error)
- func GetAvailableProducts(c gotransip.Client) ([]Product, error)
- func GetAvailableUpgrades(c gotransip.Client, vpsName string) ([]Product, error)
- func GetCancellableAddonsForVps(c gotransip.Client, vpsName string) ([]Product, error)
- type Snapshot
- type Status
- type TrafficInformation
- type Vps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddIpv6ToVps ¶
AddIpv6ToVps adds IpV6 address to Vps
func AddVpsToPrivateNetwork ¶
AddVpsToPrivateNetwork connects given Vps to PrivateNetwork
func CancelAddon ¶
CancelAddon cancels contract for Vps's given addon
func CancelPrivateNetwork ¶
func CancelPrivateNetwork(c gotransip.Client, privateNetworkName string, endTime gotransip.CancellationTime) error
CancelPrivateNetwork cancels contract for PrivateNetwork per endTime
func CloneVpsToAvailabilityZone ¶
CloneVpsToAvailabilityZone clones a Vps to a specific availability zone
func CreateSnapshot ¶
CreateSnapshot creates a snapshot for Vps with given description
func GetIpsForVps ¶
GetIpsForVps returns all IP addresses bound to given VPS
func HandoverVps ¶
HandoverVps hands Vps over to target TransIP account
func InstallOperatingSystem ¶
func InstallOperatingSystem(c gotransip.Client, vpsName, operatingSystemName, hostname string) error
InstallOperatingSystem installs given operatingSystem on Vps, preseeded by hostname
func InstallOperatingSystemUnattended ¶
func InstallOperatingSystemUnattended(c gotransip.Client, vpsName, operatingSystemName, base64InstallText string) error
InstallOperatingSystemUnattended installs given operatingSystem on Vps, preseeded by contents of the installText
func OrderAddon ¶
OrderAddon orders addons to a VPS
func OrderPrivateNetwork ¶
OrderPrivateNetwork orders a private Network
func OrderVps ¶
func OrderVps(c gotransip.Client, productName string, addons []string, operatingSystemName, hostname string) error
OrderVps orders a VPS with optional addons
func OrderVpsInAvailabilityZone ¶
func OrderVpsInAvailabilityZone(c gotransip.Client, productName string, addons []string, operatingSystemName, hostname, availabilityZone string) error
OrderVpsInAvailabilityZone orders a VPS with optional addons in a specific availability zone
func RemoveSnapshot ¶
RemoveSnapshot removes snapshot by snapshotName for Vps
func RemoveVpsFromPrivateNetwork ¶
RemoveVpsFromPrivateNetwork disconnects given Vps from PrivateNetwork
func RevertSnapshot ¶
RevertSnapshot reverts snapshot with snapshotName for Vps
func RevertSnapshotToOtherVps ¶
func RevertSnapshotToOtherVps(c gotransip.Client, sourceVpsName, snapshotName, destinationVpsName string) error
RevertSnapshotToOtherVps uses a snapshot from sourceVpsName to revert to destinationVpsName
func RevertVpsBackup ¶
RevertVpsBackup reverts backup for Vps
func SetCustomerLock ¶
SetCustomerLock locks or unlocks any actions on given Vps
func UpdatePtrRecord ¶
UpdatePtrRecord updates the PTR record for given ipAddress
Types ¶
type AvailabilityZone ¶
type AvailabilityZone struct { Name string `xml:"name"` Country string `xml:"country"` IsDefault bool `xml:"isDefault"` }
AvailabilityZone represents an availability zone as described at https://api.transip.nl/docs/transip.nl/class-Transip_AvailabilityZone.html
func GetAvailableAvailabilityZones ¶
func GetAvailableAvailabilityZones(c gotransip.Client) ([]AvailabilityZone, error)
GetAvailableAvailabilityZones returns a list of available availability zones
type Backup ¶
type Backup struct { ID int64 `xml:"id"` Created util.XMLTime `xml:"dateTimeCreate"` DiskSize int64 `xml:"diskSize"` OperatingSystem string `xml:"operatingSystem"` AvailabilityZone string `xml:"availabilityZone"` }
Backup represents a Transip_VpsBackup object https://api.transip.nl/docs/transip.nl/class-Transip_VpsBackup.html
type OperatingSystem ¶
type OperatingSystem struct { Name string `xml:"name"` Description string `xml:"description"` IsPreinstallableImage bool `xml:"isPreinstallableImage"` }
OperatingSystem represents a Transip_OperatingSystem object as described at https://api.transip.nl/docs/transip.nl/class-Transip_OperatingSystem.html
func GetOperatingSystems ¶
func GetOperatingSystems(c gotransip.Client) ([]OperatingSystem, error)
GetOperatingSystems returns a list of all OperatingSystem available for installation
type PrivateNetwork ¶
type PrivateNetwork struct {
Name string `xml:"name"`
}
PrivateNetwork represents a Transip_PrivateNetwork object https://api.transip.nl/docs/transip.nl/class-Transip_PrivateNetwork.html
func GetAllPrivateNetworks ¶
func GetAllPrivateNetworks(c gotransip.Client) ([]PrivateNetwork, error)
GetAllPrivateNetworks returns list of all private networks
func GetPrivateNetworksByVps ¶
func GetPrivateNetworksByVps(c gotransip.Client, vpsName string) ([]PrivateNetwork, error)
GetPrivateNetworksByVps returns a list of private networks for given Vps
type Product ¶
type Product struct { Name string `xml:"name"` Description string `xml:"description"` Price float64 `xml:"price"` RenewalPrice float64 `xml:"renewalPrice"` }
Product represents a Transip_Product object as described at https://api.transip.nl/docs/transip.nl/class-Transip_Product.html
func GetActiveAddonsForVps ¶
GetActiveAddonsForVps returns a list of all the active addons for given Vps
func GetAvailableAddons ¶
GetAvailableAddons returns a list of al available VPS addons
func GetAvailableAddonsForVps ¶
GetAvailableAddonsForVps returns list of all available addons for a given Vps
func GetAvailableProducts ¶
GetAvailableProducts returns a list of al available VPS products
func GetAvailableUpgrades ¶
GetAvailableUpgrades returns list of all available upgrades for given Vps
type Snapshot ¶
type Snapshot struct { Name string `xml:"name"` Description string `xml:"description"` Created util.XMLTime `xml:"dateTimeCreate"` AvailabilityZone string `xml:"availabilityZone"` }
Snapshot represents a Transip_Snapshot object as described at https://api.transip.nl/docs/transip.nl/class-Transip_Snapshot.html
type Status ¶
type Status string
Status represents the possibles states a Vps can be in
var ( // StatusCreated means the VPS was provisioned and is waiting for install StatusCreated Status = "created" // StatusInstalling means the VPS is currently installing it's OS StatusInstalling Status = "installing" // StatusRunning means the VPS is running and operating normally StatusRunning Status = "running" // StatusStopped means the VPS was stopped StatusStopped Status = "stopped" // StatusPaused means the VPS is currently in a suspended state StatusPaused Status = "paused" // StatusFailPaused means something went wrong and the VPS got suspended StatusFailPaused Status = "failPaused" )
type TrafficInformation ¶
TrafficInformation holds information about a VPS's traffic usage for a specific period
func GetPooledTrafficInformation ¶
func GetPooledTrafficInformation(c gotransip.Client) (TrafficInformation, error)
GetPooledTrafficInformation returns PooledTraffic information for the account
func GetTrafficInformationForVps ¶
func GetTrafficInformationForVps(c gotransip.Client, vpsName string) (TrafficInformation, error)
GetTrafficInformationForVps returns traffic information for this contract period for given Vps
type Vps ¶
type Vps struct { Name string `xml:"name"` Description string `xml:"description"` OperatingSystem string `xml:"operatingSystem"` DiskSize int64 `xml:"diskSize"` MemorySize int64 `xml:"memorySize"` Processors int64 `xml:"cpus"` Status Status `xml:"status"` IPv4Address net.IP `xml:"ipAddress"` IPv6Address net.IP `xml:"ipv6Address"` MACAddress string `xml:"macAddress"` IsBlocked bool `xml:"isBlocked"` IsCustomerLocked bool `xml:"isCustomerLocked"` AvailabilityZone string `xml:"availabilityZone"` }
Vps represents a Transip_Vps object https://api.transip.nl/docs/transip.nl/class-Transip_Vps.html