upcloud

package
v8.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ErrCodeAccessKeyInvalid                               string = "ACCESS_KEY_INVALID"
	ErrCodeAccessKeyMissing                               string = "ACCESS_KEY_MISSING"
	ErrCodeAccountForbidden                               string = "ACCOUNT_FORBIDDEN"
	ErrCodeActionForbidden                                string = "ACTION_FORBIDDEN"
	ErrCodeActionInvalid                                  string = "ACTION_INVALID"
	ErrCodeActionMissing                                  string = "ACTION_MISSING"
	ErrCodeAddressAttached                                string = "ADDRESS_ATTACHED"
	ErrCodeAddressInvalid                                 string = "ADDRESS_INVALID"
	ErrCodeAddressMissing                                 string = "ADDRESS_MISSING"
	ErrCodeAddressOrUuidRequired                          string = "ADDRESS_OR_UUID_REQUIRED"
	ErrCodeAlreadyInServerGroup                           string = "ALREADY_IN_SERVER_GROUP"
	ErrCodeAuthenticationFailed                           string = "AUTHENTICATION_FAILED"
	ErrCodeBackupDeletionPolicyInvalid                    string = "BACKUP_DELETION_POLICY_INVALID"
	ErrCodeBackupRuleConflict                             string = "BACKUP_RULE_CONFLICT"
	ErrCodeBackupRuleInvalid                              string = "BACKUP_RULE_INVALID"
	ErrCodeBootOrderInvalid                               string = "BOOT_ORDER_INVALID"
	ErrCodeCDROMHotplugUnsupported                        string = "CDROM_HOTPLUG_UNSUPPORTED"
	ErrCodeCanNotCreatePasswordForTheSelectedDistribution string = "CAN_NOT_CREATE_PASSWORD_FOR_THE_SELECTED_DISTRIBUTION"
	ErrCodeCannotDeletePrivateAddress                     string = "CANNOT_DELETE_PRIVATE_ADDRESS"
	ErrCodeCdromDeviceInUse                               string = "CDROM_DEVICE_IN_USE"
	ErrCodeCdromEjectFailed                               string = "CDROM_EJECT_FAILED"
	ErrCodeCommentInvalid                                 string = "COMMENT_INVALID"
	ErrCodeConnectionPoolNotFound                         string = "CONNECTION_POOL_NOT_FOUND"
	ErrCodeCoreMemoryUnsupported                          string = "CORE_MEMORY_UNSUPPORTED"
	ErrCodeCoreNumberInvalid                              string = "CORE_NUMBER_INVALID"
	ErrCodeCreatePasswordInvalid                          string = "CREATE_PASSWORD_INVALID"
	ErrCodeDBExists                                       string = "DB_EXISTS"
	ErrCodeDBNotFound                                     string = "DB_NOT_FOUND"
	ErrCodeDescriptionInvalid                             string = "DESCRIPTION_INVALID"
	ErrCodeDestinationAddressEndInvalid                   string = "DESTINATION_ADDRESS_END_INVALID"
	ErrCodeDestinationAddressOrderIllegal                 string = "DESTINATION_ADDRESS_ORDER_ILLEGAL"
	ErrCodeDestinationAddressStartInvalid                 string = "DESTINATION_ADDRESS_START_INVALID"
	ErrCodeDestinationPortEndInvalid                      string = "DESTINATION_PORT_END_INVALID"
	ErrCodeDestinationPortOrderIllegal                    string = "DESTINATION_PORT_ORDER_ILLEGAL"
	ErrCodeDestinationPortStartInvalid                    string = "DESTINATION_PORT_START_INVALID"
	ErrCodeDeviceAddressInUse                             string = "DEVICE_ADDRESS_IN_USE"
	ErrCodeDeviceAddressNotInUse                          string = "DEVICE_ADDRESS_NOT_IN_USE"
	ErrCodeDirectionInvalid                               string = "DIRECTION_INVALID"
	ErrCodeDirectionMissing                               string = "DIRECTION_MISSING"
	ErrCodeDualStackInterface                             string = "DUAL_STACK_INTERFACE"
	ErrCodeDuplicateLabelKeys                             string = "DUPLICATE_LABEL_KEYS"
	ErrCodeDuplicateResource                              string = "DUPLICATE_RESOURCE"
	ErrCodeDuplicateRoute                                 string = "DUPLICATE_ROUTE"
	ErrCodeFailedToAddMemory                              string = "FAILED_TO_ADD_MEMORY"
	ErrCodeFirewallInvalid                                string = "FIREWALL_INVALID"
	ErrCodeFirewallRuleExists                             string = "FIREWALL_RULE_EXISTS"
	ErrCodeFirewallRuleLimitReached                       string = "FIREWALL_RULE_LIMIT_REACHED"
	ErrCodeFirewallRuleNotFound                           string = "FIREWALL_RULE_NOT_FOUND"
	ErrCodeFloatingIpNotAvailable                         string = "FLOATING_IP_NOT_AVAILABLE"
	ErrCodeGroupForbidden                                 string = "GROUP_FORBIDDEN"
	ErrCodeGroupInvalid                                   string = "GROUP_INVALID"
	ErrCodeGroupNotFound                                  string = "GROUP_NOT_FOUND"
	ErrCodeHostForbidden                                  string = "HOST_FORBIDDEN"
	ErrCodeHostNotFound                                   string = "HOST_NOT_FOUND"
	ErrCodeHostnameInvalid                                string = "HOSTNAME_INVALID"
	ErrCodeHostnameMissing                                string = "HOSTNAME_MISSING"
	ErrCodeHotResizeNotEnabled                            string = "HOT_RESIZE_NOT_ENABLED"
	ErrCodeHotResizeUnavailable                           string = "HOT_RESIZE_UNAVAILABLE"
	ErrCodeHotplugFailed                                  string = "HOTPLUG_FAILED"
	ErrCodeHourInvalid                                    string = "HOUR_INVALID"
	ErrCodeHourMissing                                    string = "HOUR_MISSING"
	ErrCodeICMPTypeInvalid                                string = "ICMP_TYPE_INVALID"
	ErrCodeICMPTypeProtocolMismatch                       string = "ICMP_TYPE_PROTOCOL_MISMATCH"
	ErrCodeIdeHotplugUnsupported                          string = "IDE_HOTPLUG_UNSUPPORTED"
	ErrCodeImportUnavailable                              string = "IMPORT_UNAVAILABLE"
	ErrCodeInsufficientCredits                            string = "INSUFFICIENT_CREDITS"
	ErrCodeInterfaceExists                                string = "INTERFACE_EXISTS"
	ErrCodeInterfaceForbidden                             string = "INTERFACE_FORBIDDEN"
	ErrCodeInterfaceNotFound                              string = "INTERFACE_NOT_FOUND"
	ErrCodeIntervalInvalid                                string = "INTERVAL_INVALID"
	ErrCodeIntervalMissing                                string = "INTERVAL_MISSING"
	ErrCodeInvalidLabelKey                                string = "INVALID_LABEL_KEY"
	ErrCodeInvalidLabelValue                              string = "INVALID_LABEL_VALUE"
	ErrCodeInvalidOptions                                 string = "INVALID_OPTIONS"
	ErrCodeInvalidRequest                                 string = "INVALID_REQUEST"
	ErrCodeInvalidRoute                                   string = "INVALID_ROUTE"
	ErrCodeInvalidRouteFamily                             string = "INVALID_ROUTE_FAMILY"
	ErrCodeInvalidUsername                                string = "INVALID_USERNAME"
	ErrCodeIpAddressForbidden                             string = "IP_ADDRESS_FORBIDDEN"
	ErrCodeIpAddressInvalid                               string = "IP_ADDRESS_INVALID"
	ErrCodeIpAddressLimitReached                          string = "IP_ADDRESS_LIMIT_REACHED"
	ErrCodeIpAddressNotFound                              string = "IP_ADDRESS_NOT_FOUND"
	ErrCodeIpAddressResourcesUnavailable                  string = "IP_ADDRESS_RESOURCES_UNAVAILABLE"
	ErrCodeLocalNetworkNoRouter                           string = "LOCAL_NETWORK_NO_ROUTER"
	ErrCodeMacInvalid                                     string = "MAC_INVALID"
	ErrCodeMaxiOpsStorageLimitReached                     string = "MAXIOPS_STORAGE_LIMIT_REACHED"
	ErrCodeMemoryAmountInvalid                            string = "MEMORY_AMOUNT_INVALID"
	ErrCodeMetadataDisabledOnCloudInit                    string = "METADATA_DISABLED_ON_CLOUD-INIT"
	ErrCodeMethodNotAllowed                               string = "METHOD_NOT_ALLOWED"
	ErrCodeMsLmaRequired                                  string = "MS_LMA_REQUIRED"
	ErrCodeMultipleTemplates                              string = "MULTIPLE_TEMPLATES"
	ErrCodeNameInvalid                                    string = "NAME_INVALID"
	ErrCodeNetworkForbidden                               string = "NETWORK_FORBIDDEN"
	ErrCodeNetworkInvalid                                 string = "NETWORK_INVALID"
	ErrCodeNetworkNameInvalid                             string = "NETWORK_NAME_INVALID"
	ErrCodeNetworkNameMissing                             string = "NETWORK_NAME_MISSING"
	ErrCodeNetworkNotEmpty                                string = "NETWORK_NOT_EMPTY"
	ErrCodeNetworkNotFound                                string = "NETWORK_NOT_FOUND"
	ErrCodeNetworkTypeInvalid                             string = "NETWORK_TYPE_INVALID"
	ErrCodeNetworkTypeMissing                             string = "NETWORK_TYPE_MISSING"
	ErrCodeNexthopInvalid                                 string = "NEXTHOP_INVALID"
	ErrCodeNicModelInvalid                                string = "NIC_MODEL_INVALID"
	ErrCodeNoAvailableMemorySlots                         string = "NO_AVAILABLE_MEMORY_SLOTS"
	ErrCodeNoCdromDevice                                  string = "NO_CDROM_DEVICE"
	ErrCodeNoStoragesAttached                             string = "NO_STORAGES_ATTACHED"
	ErrCodeNotFound                                       string = "NOT_FOUND"
	ErrCodeObjectStorageForbidden                         string = "OBJECT_STORAGE_FORBIDDEN"
	ErrCodeObjectStorageNotFound                          string = "OBJECT_STORAGE_NOT_FOUND"
	ErrCodePasswordDeliveryInvalid                        string = "PASSWORD_DELIVERY_INVALID"
	ErrCodePeerNetworkNotFound                            string = "PEER_NETWORK_NOT_FOUND"
	ErrCodePeeringAccoundInvalid                          string = "PEERING_ACCOUNT_INVALID"
	ErrCodePeeringConflict                                string = "PEERING_CONFLICT"
	ErrCodePeeringNotFound                                string = "PEERING_NOT_FOUND"
	ErrCodePlanCoreNumberIllegal                          string = "PLAN_CORE_NUMBER_ILLEGAL"
	ErrCodePlanMemoryAmountIllegal                        string = "PLAN_MEMORY_AMOUNT_ILLEGAL"
	ErrCodePortProtocolMismatch                           string = "PORT_PROTOCOL_MISMATCH"
	ErrCodePositionInvalid                                string = "POSITION_INVALID"
	ErrCodeProtocolInvalid                                string = "PROTOCOL_INVALID"
	ErrCodePtrRecordInvalid                               string = "PTR_RECORD_INVALID"
	ErrCodePtrRecordNotSupported                          string = "PTR_RECORD_NOT_SUPPORTED"
	ErrCodePublicStorageAttach                            string = "PUBLIC_STORAGE_ATTACH"
	ErrCodeRequestInvalid                                 string = "REQUEST_INVALID"
	ErrCodeResizeFailed                                   string = "RESIZE_FAILED"
	ErrCodeResourceAlreadyExists                          string = "RESOURCE_ALREADY_EXISTS"
	ErrCodeResourceNotFound                               string = "RESOURCE_NOT_FOUND"
	ErrCodeRetentionInvalid                               string = "RETENTION_INVALID"
	ErrCodeRetentionMissing                               string = "RETENTION_MISSING"
	ErrCodeRouterAttached                                 string = "ROUTER_ATTACHED"
	ErrCodeRouterNameMissing                              string = "ROUTER_NAME_MISSING"
	ErrCodeRouterNotFound                                 string = "ROUTER_NOT_FOUND"
	ErrCodeSecretKeyInvalid                               string = "SECRET_KEY_INVALID"
	ErrCodeSecretKeyMissing                               string = "SECRET_KEY_MISSING"
	ErrCodeServerCoresLimitReached                        string = "SERVER_CORE_LIMIT_REACHED"
	ErrCodeServerCreatingLimitReached                     string = "SERVER_CREATING_LIMIT_REACHED"
	ErrCodeServerForbidden                                string = "SERVER_FORBIDDEN"
	ErrCodeServerIPLimitReached                           string = "SERVER_IP_LIMIT_REACHED"
	ErrCodeServerInvalid                                  string = "SERVER_INVALID"
	ErrCodeServerMemoryLimitReached                       string = "SERVER_MEMORY_LIMIT_REACHED"
	ErrCodeServerNotFound                                 string = "SERVER_NOT_FOUND"
	ErrCodeServerResourcesUnavailable                     string = "SERVER_RESOURCES_UNAVAILABLE"
	ErrCodeServerStateIllegal                             string = "SERVER_STATE_ILLEGAL"
	ErrCodeServerTitleInvalid                             string = "SERVER_TITLE_INVALID"
	ErrCodeServerTitleMissing                             string = "SERVER_TITLE_MISSING"
	ErrCodeServiceError                                   string = "SERVICE_ERROR"
	ErrCodeServiceExists                                  string = "SERVICE_EXISTS"
	ErrCodeServiceNotFound                                string = "SERVICE_NOT_FOUND"
	ErrCodeSimpleBackupInvalid                            string = "SIMPLE_BACKUP_INVALID"
	ErrCodeSizeInvalid                                    string = "SIZE_INVALID"
	ErrCodeSizeMissing                                    string = "SIZE_MISSING"
	ErrCodeSourceAddressEndInvalid                        string = "SOURCE_ADDRESS_END_INVALID"
	ErrCodeSourceAddressOrderIllegal                      string = "SOURCE_ADDRESS_ORDER_ILLEGAL"
	ErrCodeSourceAddressStartInvalid                      string = "SOURCE_ADDRESS_START_INVALID"
	ErrCodeSourcePortEndInvalid                           string = "SOURCE_PORT_END_INVALID"
	ErrCodeSourcePortOrderIllegal                         string = "SOURCE_PORT_ORDER_ILLEGAL"
	ErrCodeSourcePortStartInvalid                         string = "SOURCE_PORT_START_INVALID"
	ErrCodeStaticRouteLimitReached                        string = "STATIC_ROUTE_LIMIT_REACHED"
	ErrCodeStaticRouteTargetInvalid                       string = "STATIC_ROUTE_TARGET_INVALID"
	ErrCodeStopTypeInvalid                                string = "STOP_TYPE_INVALID"
	ErrCodeStorageAttached                                string = "STORAGE_ATTACHED"
	ErrCodeStorageAttachedAsCdrom                         string = "STORAGE_ATTACHED_AS_CDROM"
	ErrCodeStorageAttachedAsDisk                          string = "STORAGE_ATTACHED_AS_DISK"
	ErrCodeStorageDeletionPolicyInvalid                   string = "STORAGE_DELETION_POLICY_INVALID"
	ErrCodeStorageDeviceInvalid                           string = "STORAGE_DEVICE_INVALID"
	ErrCodeStorageDeviceLimitReached                      string = "STORAGE_DEVICE_LIMIT_REACHED"
	ErrCodeStorageDeviceMissing                           string = "STORAGE_DEVICE_MISSING"
	ErrCodeStorageDevicesInvalid                          string = "STORAGE_DEVICES_INVALID"
	ErrCodeStorageDevicesMissing                          string = "STORAGE_DEVICES_MISSING"
	ErrCodeStorageForbidden                               string = "STORAGE_FORBIDDEN"
	ErrCodeStorageImportNotFound                          string = "STORAGE_IMPORT_NOT_FOUND"
	ErrCodeStorageImportNotInProgress                     string = "STORAGE_IMPORT_NOT_IN_PROGRESS"
	ErrCodeStorageInUse                                   string = "STORAGE_IN_USE"
	ErrCodeStorageInconsistent                            string = "STORAGE_INCONSISTENT"
	ErrCodeStorageInvalid                                 string = "STORAGE_INVALID"
	ErrCodeStorageMissing                                 string = "STORAGE_MISSING"
	ErrCodeStorageNotFound                                string = "STORAGE_NOT_FOUND"
	ErrCodeStorageResourcesUnavailable                    string = "STORAGE_RESOURCES_UNAVAILABLE"
	ErrCodeStorageStateIllegal                            string = "STORAGE_STATE_ILLEGAL"
	ErrCodeStorageTierIllegal                             string = "STORAGE_TIER_ILLEGAL"
	ErrCodeStorageTitleInvalid                            string = "STORAGE_TITLE_INVALID"
	ErrCodeStorageTitleMissing                            string = "STORAGE_TITLE_MISSING"
	ErrCodeStorageTypeIllegal                             string = "STORAGE_TYPE_ILLEGAL"
	ErrCodeStrictAntiAffinityNotMet                       string = "STRICT_ANTI_AFFINITY_NOT_MET"
	ErrCodeTagExists                                      string = "TAG_EXISTS"
	ErrCodeTagForbidden                                   string = "TAG_FORBIDDEN"
	ErrCodeTagInvalid                                     string = "TAG_INVALID"
	ErrCodeTagNotFound                                    string = "TAG_NOT_FOUND"
	ErrCodeTargetIdentifierInvalid                        string = "TARGET_IDENTIFIER_INVALID"
	ErrCodeTargetTypeInvalid                              string = "TARGET_TYPE_INVALID"
	ErrCodeTierInvalid                                    string = "TIER_INVALID"
	ErrCodeTimeoutActionInvalid                           string = "TIMEOUT_ACTION_INVALID"
	ErrCodeTimeoutInvalid                                 string = "TIMEOUT_INVALID"
	ErrCodeTimeoutMissing                                 string = "TIMEOUT_MISSING"
	ErrCodeTimezoneInvalid                                string = "TIMEZONE_INVALID"
	ErrCodeTitleInvalid                                   string = "TITLE_INVALID"
	ErrCodeTitleMissing                                   string = "TITLE_MISSING"
	ErrCodeTooManyBootDisks                               string = "TOO_MANY_BOOT_DISKS"
	ErrCodeTrialPlan                                      string = "TRIAL_PLAN"
	ErrCodeTypeInvalid                                    string = "TYPE_INVALID"
	ErrCodeUnableToCancel                                 string = "UNABLE_TO_CANCEL"
	ErrCodeUnknownAttribute                               string = "UNKNOWN_ATTRIBUTE"
	ErrCodeUserDataInvalid                                string = "USER_DATA_INVALID"
	ErrCodeUserInvalid                                    string = "USER_INVALID"
	ErrCodeUserNotFound                                   string = "USER_NOT_FOUND"
	ErrCodeValidationError                                string = "VALIDATION_ERROR"
	ErrCodeVideoModelInvalid                              string = "VIDEO_MODEL_INVALID"
	ErrCodeVncInvalid                                     string = "VNC_INVALID"
	ErrCodeVncPasswordInvalid                             string = "VNC_PASSWORD_INVALID"
	ErrCodeWindowsNotAvailable                            string = "WINDOWS_NOT_AVAILABLE"
	ErrCodeZoneHostForbidden                              string = "ZONE_HOST_FORBIDDEN"
	ErrCodeZoneInvalid                                    string = "ZONE_INVALID"
	ErrCodeZoneMismatch                                   string = "ZONE_MISMATCH"
	ErrCodeZoneMissing                                    string = "ZONE_MISSING"
	ErrCodeZoneNotFound                                   string = "ZONE_NOT_FOUND"
	ErrPeeringNotDisabled                                 string = "PEERING_NOT_DISABLED"
)

List of possible error codes This can be used for comparison against `Problem.ErrorCode()`

View Source
const (
	FirewallRuleActionAccept = "accept"
	FirewallRuleActionReject = "reject"
	FirewallRuleActionDrop   = "drop"

	FirewallRuleDirectionIn  = "in"
	FirewallRuleDirectionOut = "out"

	FirewallRuleProtocolTCP  = "tcp"
	FirewallRuleProtocolUDP  = "udp"
	FirewallRuleProtocolICMP = "icmp"
)

Constants

View Source
const (
	GatewayConfiguredStatusStarted GatewayConfiguredStatus = "started"
	GatewayConfiguredStatusStopped GatewayConfiguredStatus = "stopped"

	GatewayOperationalStatePending           GatewayOperationalState = "pending"
	GatewayOperationalStateSetupAgent        GatewayOperationalState = "setup-agent"
	GatewayOperationalStateSetupLinkNetwork  GatewayOperationalState = "setup-link-network"
	GatewayOperationalStateSetupServer       GatewayOperationalState = "setup-server"
	GatewayOperationalStateSetupNetwork      GatewayOperationalState = "setup-network"
	GatewayOperationalStateSetupGW           GatewayOperationalState = "setup-gw"
	GatewayOperationalStateSetupDNS          GatewayOperationalState = "setup-dns"
	GatewayOperationalStateCheckup           GatewayOperationalState = "checkup"
	GatewayOperationalStateRunning           GatewayOperationalState = "running"
	GatewayOperationalStateDeleteDNS         GatewayOperationalState = "delete-dns"
	GatewayOperationalStateDeleteNetwork     GatewayOperationalState = "delete-network"
	GatewayOperationalStateDeleteServer      GatewayOperationalState = "delete-server"
	GatewayOperationalStateDeleteLinkNetwork GatewayOperationalState = "delete-link-network"
	GatewayOperationalStateDeleteService     GatewayOperationalState = "delete-service"

	GatewayTunnelOperationalStateUninitialized GatewayTunnelOperationalState = "uninitialized"
	GatewayTunnelOperationalStateCreated       GatewayTunnelOperationalState = "created"
	GatewayTunnelOperationalStateConnecting    GatewayTunnelOperationalState = "connecting"
	GatewayTunnelOperationalStateEstabilished  GatewayTunnelOperationalState = "established"
	GatewayTunnelOperationalStateRekeying      GatewayTunnelOperationalState = "rekeying"
	GatewayTunnelOperationalStateRekeyed       GatewayTunnelOperationalState = "rekeyed"
	GatewayTunnelOperationalStateDeleting      GatewayTunnelOperationalState = "deleting"
	GatewayTunnelOperationalStateDestroying    GatewayTunnelOperationalState = "destroying"
	GatewayTunnelOperationalStateUnknown       GatewayTunnelOperationalState = "unknown"

	// GatewayFeatureNAT is a Network Address Translation (NAT) service that offers a way for cloud servers in SDN private networks to connect to the Internet through the public IP assigned to the network gateway service
	GatewayFeatureNAT GatewayFeature = "nat"

	// GatewayFeatureVPN is a Virtual Private Network (VPN) service used to establish an encrypted network connection when using public networks
	// Please note that VPN feature is currently in beta. You can learn more about it on its [product page]
	// Also note that VPN is available only in some of the gateway plans. To check which plans support VPN, you can use the GetGatewayPlans method.
	//
	// [product page]: https://upcloud.com/resources/docs/networking#nat-and-vpn-gateways
	GatewayFeatureVPN GatewayFeature = "vpn"

	GatewayConnectionTypeIPSec GatewayConnectionType = "ipsec"

	GatewayRouteTypeStatic GatewayRouteType = "static"

	GatewayTunnelIPSecAuthTypePSK GatewayIPSecAuthType = "psk"

	GatewayIPSecAlgorithm_aes128gcm16  GatewayIPSecAlgorithm = "aes128gcm16"
	GatewayIPSecAlgorithm_aes128gcm128 GatewayIPSecAlgorithm = "aes128gcm128"
	GatewayIPSecAlgorithm_aes192gcm16  GatewayIPSecAlgorithm = "aes192gcm16"
	GatewayIPSecAlgorithm_aes192gcm128 GatewayIPSecAlgorithm = "aes192gcm128"
	GatewayIPSecAlgorithm_aes256gcm16  GatewayIPSecAlgorithm = "aes256gcm16"
	GatewayIPSecAlgorithm_aes256gcm128 GatewayIPSecAlgorithm = "aes256gcm128"
	GatewayIPSecAlgorithm_aes128       GatewayIPSecAlgorithm = "aes128"
	GatewayIPSecAlgorithm_aes192       GatewayIPSecAlgorithm = "aes192"
	GatewayIPSecAlgorithm_aes256       GatewayIPSecAlgorithm = "aes256"

	GatewayIPSecIntegrityAlgorithm_aes128gmac GatewayIPSecIntegrityAlgorithm = "aes128gmac"
	GatewayIPSecIntegrityAlgorithm_aes256gmac GatewayIPSecIntegrityAlgorithm = "aes256gmac"
	GatewayIPSecIntegrityAlgorithm_sha1       GatewayIPSecIntegrityAlgorithm = "sha1"
	GatewayIPSecIntegrityAlgorithm_sha256     GatewayIPSecIntegrityAlgorithm = "sha256"
	GatewayIPSecIntegrityAlgorithm_sha384     GatewayIPSecIntegrityAlgorithm = "sha384"
	GatewayIPSecIntegrityAlgorithm_sha512     GatewayIPSecIntegrityAlgorithm = "sha512"
)
View Source
const (
	IPAddressFamilyIPv4 = "IPv4"
	IPAddressFamilyIPv6 = "IPv6"

	IPAddressAccessPrivate = "private"
	IPAddressAccessPublic  = "public"
	IPAddressAccessUtility = "utility"
)

Constants

View Source
const (
	KubernetesClusterStatePending     KubernetesClusterState = "pending"
	KubernetesClusterStateRunning     KubernetesClusterState = "running"
	KubernetesClusterStateTerminating KubernetesClusterState = "terminating"
	KubernetesClusterStateTerminated  KubernetesClusterState = "terminated"
	KubernetesClusterStateFailed      KubernetesClusterState = "failed"
	KubernetesClusterStateUnknown     KubernetesClusterState = "unknown"

	KubernetesNodeGroupStatePending     KubernetesNodeGroupState = "pending"
	KubernetesNodeGroupStateRunning     KubernetesNodeGroupState = "running"
	KubernetesNodeGroupStateScalingUp   KubernetesNodeGroupState = "scaling-up"
	KubernetesNodeGroupStateScalingDown KubernetesNodeGroupState = "scaling-down"
	KubernetesNodeGroupStateTerminating KubernetesNodeGroupState = "terminating"
	KubernetesNodeGroupStateFailed      KubernetesNodeGroupState = "failed"
	KubernetesNodeGroupStateUnknown     KubernetesNodeGroupState = "unknown"

	KubernetesClusterTaintEffectNoExecute        KubernetesClusterTaintEffect = "NoExecute"
	KubernetesClusterTaintEffectNoSchedule       KubernetesClusterTaintEffect = "NoSchedule"
	KubernetesClusterTaintEffectPreferNoSchedule KubernetesClusterTaintEffect = "PreferNoSchedule"

	KubernetesNodeStateFailed      KubernetesNodeState = "failed"
	KubernetesNodeStatePending     KubernetesNodeState = "pending"
	KubernetesNodeStateRunning     KubernetesNodeState = "running"
	KubernetesNodeStateTerminating KubernetesNodeState = "terminating"
	KubernetesNodeStateUnknown     KubernetesNodeState = "unknown"

	KubernetesStorageTierHDD     StorageTier = StorageTierHDD
	KubernetesStorageTierMaxIOPS StorageTier = StorageTierMaxIOPS
)
View Source
const (
	LoadBalancerModeHTTP LoadBalancerMode = "http"
	LoadBalancerModeTCP  LoadBalancerMode = "tcp"

	LoadBalancerBackendMemberTypeStatic  LoadBalancerBackendMemberType = "static"
	LoadBalancerBackendMemberTypeDynamic LoadBalancerBackendMemberType = "dynamic"

	LoadBalancerConfiguredStatusStarted LoadBalancerConfiguredStatus = "started"
	LoadBalancerConfiguredStatusStopped LoadBalancerConfiguredStatus = "stopped"

	LoadBalancerCertificateBundleTypeManual    LoadBalancerCertificateBundleType = "manual"
	LoadBalancerCertificateBundleTypeDynamic   LoadBalancerCertificateBundleType = "dynamic"
	LoadBalancerCertificateBundleTypeAuthority LoadBalancerCertificateBundleType = "authority"

	LoadBalancerOperationalStatePending       LoadBalancerOperationalState = "pending"
	LoadBalancerOperationalStateSetupAgent    LoadBalancerOperationalState = "setup-agent"
	LoadBalancerOperationalStateSetupServer   LoadBalancerOperationalState = "setup-server"
	LoadBalancerOperationalStateSetupNetwork  LoadBalancerOperationalState = "setup-network"
	LoadBalancerOperationalStateSetupLB       LoadBalancerOperationalState = "setup-lb"
	LoadBalancerOperationalStateSetupDNS      LoadBalancerOperationalState = "setup-dns"
	LoadBalancerOperationalStateCheckup       LoadBalancerOperationalState = "checkup"
	LoadBalancerOperationalStateRunning       LoadBalancerOperationalState = "running"
	LoadBalancerOperationalStateDeleteDNS     LoadBalancerOperationalState = "delete-dns"
	LoadBalancerOperationalStateDeleteNetwork LoadBalancerOperationalState = "delete-network"
	LoadBalancerOperationalStateDeleteServer  LoadBalancerOperationalState = "delete-server"
	LoadBalancerOperationalStateDeleteService LoadBalancerOperationalState = "delete-service"

	LoadBalancerCertificateBundleOperationalStateIdle              LoadBalancerCertificateBundleOperationalState = "idle"
	LoadBalancerCertificateBundleOperationalStatePending           LoadBalancerCertificateBundleOperationalState = "pending"
	LoadBalancerCertificateBundleOperationalStateSetupChallenge    LoadBalancerCertificateBundleOperationalState = "setup-challenge"
	LoadBalancerCertificateBundleOperationalStateCompleteChallenge LoadBalancerCertificateBundleOperationalState = "complete-challenge"

	LoadBalancerMatcherTypeSrcIP        LoadBalancerMatcherType = "src_ip"
	LoadBalancerMatcherTypeSrcPort      LoadBalancerMatcherType = "src_port"
	LoadBalancerMatcherTypeBodySize     LoadBalancerMatcherType = "body_size"
	LoadBalancerMatcherTypePath         LoadBalancerMatcherType = "path"
	LoadBalancerMatcherTypeURL          LoadBalancerMatcherType = "url"
	LoadBalancerMatcherTypeURLQuery     LoadBalancerMatcherType = "url_query"
	LoadBalancerMatcherTypeHost         LoadBalancerMatcherType = "host"
	LoadBalancerMatcherTypeHTTPMethod   LoadBalancerMatcherType = "http_method"
	LoadBalancerMatcherTypeCookie       LoadBalancerMatcherType = "cookie"
	LoadBalancerMatcherTypeHeader       LoadBalancerMatcherType = "header"
	LoadBalancerMatcherTypeURLParam     LoadBalancerMatcherType = "url_param"
	LoadBalancerMatcherTypeNumMembersUp LoadBalancerMatcherType = "num_members_up"

	LoadBalancerActionTypeUseBackend          LoadBalancerActionType = "use_backend"
	LoadBalancerActionTypeTCPReject           LoadBalancerActionType = "tcp_reject"
	LoadBalancerActionTypeHTTPReturn          LoadBalancerActionType = "http_return"
	LoadBalancerActionTypeHTTPRedirect        LoadBalancerActionType = "http_redirect"
	LoadBalancerActionTypeSetForwardedHeaders LoadBalancerActionType = "set_forwarded_headers"

	LoadBalancerActionHTTPRedirectSchemeHTTP  LoadBalancerActionHTTPRedirectScheme = "http"
	LoadBalancerActionHTTPRedirectSchemeHTTPS LoadBalancerActionHTTPRedirectScheme = "https"

	LoadBalancerStringMatcherMethodExact     LoadBalancerStringMatcherMethod = "exact"
	LoadBalancerStringMatcherMethodSubstring LoadBalancerStringMatcherMethod = "substring"
	LoadBalancerStringMatcherMethodRegexp    LoadBalancerStringMatcherMethod = "regexp"
	LoadBalancerStringMatcherMethodStarts    LoadBalancerStringMatcherMethod = "starts"
	LoadBalancerStringMatcherMethodEnds      LoadBalancerStringMatcherMethod = "ends"
	LoadBalancerStringMatcherMethodDomain    LoadBalancerStringMatcherMethod = "domain"
	LoadBalancerStringMatcherMethodIP        LoadBalancerStringMatcherMethod = "ip"
	LoadBalancerStringMatcherMethodExists    LoadBalancerStringMatcherMethod = "exists"

	LoadBalancerHTTPMatcherMethodGet     LoadBalancerHTTPMatcherMethod = "GET"
	LoadBalancerHTTPMatcherMethodHead    LoadBalancerHTTPMatcherMethod = "HEAD"
	LoadBalancerHTTPMatcherMethodPost    LoadBalancerHTTPMatcherMethod = "POST"
	LoadBalancerHTTPMatcherMethodPut     LoadBalancerHTTPMatcherMethod = "PUT"
	LoadBalancerHTTPMatcherMethodPatch   LoadBalancerHTTPMatcherMethod = "PATCH"
	LoadBalancerHTTPMatcherMethodDelete  LoadBalancerHTTPMatcherMethod = "DELETE"
	LoadBalancerHTTPMatcherMethodConnect LoadBalancerHTTPMatcherMethod = "CONNECT"
	LoadBalancerHTTPMatcherMethodOptions LoadBalancerHTTPMatcherMethod = "OPTIONS"
	LoadBalancerHTTPMatcherMethodTrace   LoadBalancerHTTPMatcherMethod = "TRACE"

	LoadBalancerIntegerMatcherMethodEqual          LoadBalancerIntegerMatcherMethod = "equal"
	LoadBalancerIntegerMatcherMethodGreaterOrEqual LoadBalancerIntegerMatcherMethod = "greater_or_equal"
	LoadBalancerIntegerMatcherMethodGreater        LoadBalancerIntegerMatcherMethod = "greater"
	LoadBalancerIntegerMatcherMethodLessOrEqual    LoadBalancerIntegerMatcherMethod = "less_or_equal"
	LoadBalancerIntegerMatcherMethodLess           LoadBalancerIntegerMatcherMethod = "less"
	LoadBalancerIntegerMatcherMethodRange          LoadBalancerIntegerMatcherMethod = "range"

	LoadBalancerProxyProtocolVersion1 LoadBalancerProxyProtocolVersion = "v1"
	LoadBalancerProxyProtocolVersion2 LoadBalancerProxyProtocolVersion = "v2"

	LoadBalancerHealthCheckTypeTCP  LoadBalancerHealthCheckType = "tcp"
	LoadBalancerHealthCheckTypeHTTP LoadBalancerHealthCheckType = "http"

	LoadBalancerNetworkTypePublic  LoadBalancerNetworkType   = "public"
	LoadBalancerNetworkTypePrivate LoadBalancerNetworkType   = "private"
	LoadBalancerAddressFamilyIPv4  LoadBalancerAddressFamily = "IPv4"

	LoadBalancerNodeOperationalStatePending               LoadBalancerNodeOperationalState = "pending"
	LoadBalancerNodeOperationalStatePullConfig            LoadBalancerNodeOperationalState = "pull-config"
	LoadBalancerNodeOperationalStateSetupLB               LoadBalancerNodeOperationalState = "setup-lb"
	LoadBalancerNodeOperationalStateRunning               LoadBalancerNodeOperationalState = "running"
	LoadBalancerNodeOperationalStateFailing               LoadBalancerNodeOperationalState = "failing"
	LoadBalancerNodeOperationalStateAgentUpgradeStarting  LoadBalancerNodeOperationalState = "agent-upgrade-starting"
	LoadBalancerNodeOperationalStateAgentUpgradeFinishing LoadBalancerNodeOperationalState = "agent-upgrade-finishing"
	LoadBalancerNodeOperationalStateStopped               LoadBalancerNodeOperationalState = "stopped"
	LoadBalancerNodeOperationalStateNotResponding         LoadBalancerNodeOperationalState = "not-responding"

	LoadBalancerMaintenanceDOWMonday    LoadBalancerMaintenanceDOW = "monday"
	LoadBalancerMaintenanceDOWTuesday   LoadBalancerMaintenanceDOW = "tuesday"
	LoadBalancerMaintenanceDOWWednesday LoadBalancerMaintenanceDOW = "wednesday"
	LoadBalancerMaintenanceDOWThursday  LoadBalancerMaintenanceDOW = "thursday"
	LoadBalancerMaintenanceDOWFriday    LoadBalancerMaintenanceDOW = "friday"
	LoadBalancerMaintenanceOWSaturday   LoadBalancerMaintenanceDOW = "saturday"
	LoadBalancerMaintenanceDOWSunday    LoadBalancerMaintenanceDOW = "sunday"
)
View Source
const (
	// ManagedDatabaseComponentRoutePublic component can be reached over public internet
	ManagedDatabaseComponentRoutePublic ManagedDatabaseComponentRoute = "public"
	// ManagedDatabaseComponentRouteDynamic component can be only reached over utility network
	ManagedDatabaseComponentRouteDynamic ManagedDatabaseComponentRoute = "dynamic"

	// ManagedDatabaseComponentUsagePrimary component is a primary (writable) instance in a cluster
	ManagedDatabaseComponentUsagePrimary ManagedDatabaseComponentUsage = "primary"
	// ManagedDatabaseComponentUsageReplica component is a standby (read-only) instance in a cluster
	ManagedDatabaseComponentUsageReplica ManagedDatabaseComponentUsage = "replica"
)
View Source
const (
	NetworkTypePrivate = "private"
	NetworkTypePublic  = "public"
	NetworkTypeUtility = "utility"
)

Constants

View Source
const (
	NetworkPeeringConfiguredStatusActive   NetworkPeeringConfiguredStatus = "active"
	NetworkPeeringConfiguredStatusDisabled NetworkPeeringConfiguredStatus = "disabled"

	NetworkPeeringStateActive             NetworkPeeringState = "active"
	NetworkPeeringStatePendingPeer        NetworkPeeringState = "pending-peer"
	NetworkPeeringStateProvisioning       NetworkPeeringState = "provisioning"
	NetworkPeeringStateConflictSubnet     NetworkPeeringState = "conflict-subnet"
	NetworkPeeringStateMissingLocalRouter NetworkPeeringState = "missing-local-router"
	NetworkPeeringStateMissingPeerRouter  NetworkPeeringState = "missing-peer-router"
	NetworkPeeringStateDeletedPeerNetwork NetworkPeeringState = "deleted-peer-network"
	NetworkPeeringStateDisabled           NetworkPeeringState = "disabled"
	NetworkPeeringStatePeerDisabled       NetworkPeeringState = "peer-disabled"
	NetworkPeeringStateError              NetworkPeeringState = "error"

	NetworkPeeringIPNetworkFamilyIPv4 NetworkPeeringIPNetworkFamily = "IPv4"
	NetworkPeeringIPNetworkFamilyIPv6 NetworkPeeringIPNetworkFamily = "IPv6"
)
View Source
const (
	ServerStateStarted     = "started"
	ServerStateStopped     = "stopped"
	ServerStateMaintenance = "maintenance"
	ServerStateError       = "error"

	VideoModelVGA    = "vga"
	VideoModelCirrus = "cirrus"

	NICModelE1000   = "e1000"
	NICModelVirtio  = "virtio"
	NICModelRTL8139 = "rtl8139"

	StopTypeSoft = "soft"
	StopTypeHard = "hard"

	RemoteAccessTypeVNC   = "vnc"
	RemoteAccessTypeSPICE = "spice"
)

Constants

View Source
const (
	StorageTypeBackup   = "backup"
	StorageTypeCDROM    = "cdrom"
	StorageTypeDisk     = "disk"
	StorageTypeNormal   = "normal"
	StorageTypeTemplate = "template"

	StorageTierHDD     = "hdd"
	StorageTierMaxIOPS = "maxiops"

	StorageAccessPublic  = "public"
	StorageAccessPrivate = "private"

	StorageStateOnline      = "online"
	StorageStateMaintenance = "maintenance"
	StorageStateCloning     = "cloning"
	StorageStateBackuping   = "backuping"
	StorageStateError       = "error"
	StorageStateSyncing     = "syncing"

	BackupRuleIntervalDaily     = "daily"
	BackupRuleIntervalMonday    = "mon"
	BackupRuleIntervalTuesday   = "tue"
	BackupRuleIntervalWednesday = "wed"
	BackupRuleIntervalThursday  = "thu"
	BackupRuleIntervalFriday    = "fri"
	BackupRuleIntervalSaturday  = "sat"
	BackupRuleIntervalSunday    = "sun"

	StorageImportSourceDirectUpload = "direct_upload"
	StorageImportSourceHTTPImport   = "http_import"

	StorageImportStatePrepared   = "prepared"
	StorageImportStatePending    = "pending"
	StorageImportStateImporting  = "importing"
	StorageImportStateFailed     = "failed"
	StorageImportStateCancelling = "cancelling"
	StorageImportStateCancelled  = "cancelled"
	StorageImportStateCompleted  = "completed"

	StorageEncryptionDataAtReset StorageEncryption = "data-at-rest"
)

Constants

Variables

This section is empty.

Functions

func BoolPtr

func BoolPtr(v bool) *bool

func Float64Ptr

func Float64Ptr(v float64) *float64

func IntPtr

func IntPtr(v int) *int

func StringPtr

func StringPtr(v string) *string

func TimePtr

func TimePtr(v time.Time) *time.Time

Types

type Account

type Account struct {
	Credits        float64        `json:"credits"`
	UserName       string         `json:"username"`
	ResourceLimits ResourceLimits `json:"resource_limits"`
}

Account represents an account

func (*Account) UnmarshalJSON

func (s *Account) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type AccountCampaigns

type AccountCampaigns struct {
	Campaign []string `json:"campaign"`
}

AccountCampaigns represents campaigns associated to account

type AccountDetails

type AccountDetails struct {
	MainAccount string      `json:"main_account"`
	Type        AccountType `json:"type"`
	Username    string      `json:"username"`
	FirstName   string      `json:"first_name"`
	LastName    string      `json:"last_name"`
	Company     string      `json:"company"`
	Address     string      `json:"address"`
	PostalCode  string      `json:"postal_code"`
	City        string      `json:"city"`
	Email       string      `json:"email"`

	// Phone number in international format, country code and national part separated by a period
	Phone string `json:"phone"`

	// U.S. state if applicable
	State string `json:"state"`

	// ISO 3166-1 three character country code
	Country       string               `json:"country"`
	Currency      string               `json:"currency"`
	Language      string               `json:"language"`
	VATNnumber    string               `json:"vat_number"`
	Timezone      string               `json:"timezone"`
	AllowAPI      Boolean              `json:"allow_api"`
	AllowGUI      Boolean              `json:"allow_gui"`
	SimpleBackup  Boolean              `json:"simple_backup"`
	TagAccess     AccountTagAccess     `json:"tag_access"`
	Campaigns     AccountCampaigns     `json:"campaigns"`
	Roles         AccountRoles         `json:"roles"`
	ServerAccess  AccountServerAccess  `json:"server_access"`
	StorageAccess AccountStorageAccess `json:"storage_access"`
	NetworkAccess AccountNetworkAccess `json:"network_access"`
	IPFilters     AccountIPFilters     `json:"ip_filters"`

	// Whether 3rd party services are allowed in the account's context when logged in the UpCloud control panel.
	// Consult the complete description in the control panel.
	Enable3rdPartyServices Boolean `json:"enable_3rd_party_services"`
}

AccountDetails represents detailed information about an account

func (AccountDetails) IsSubaccount

func (a AccountDetails) IsSubaccount() bool

IsSubaccount checks if account is subaccount

func (*AccountDetails) UnmarshalJSON

func (a *AccountDetails) UnmarshalJSON(b []byte) error

type AccountIPFilters

type AccountIPFilters struct {
	IPFilter []string `json:"ip_filter"`
}

AccountIPFilters represents IP address restrictions on API access; if set, allowed only from the specified ranges. Ranges can be specified in CIDR format, ranges separated by a dash, or as single IP addresses

type AccountList

type AccountList []AccountListItem

AccountList represents account list

func (*AccountList) UnmarshalJSON

func (a *AccountList) UnmarshalJSON(b []byte) error

type AccountListItem

type AccountListItem struct {
	Type     AccountType  `json:"type"`
	Username string       `json:"username"`
	Roles    AccountRoles `json:"roles"`
}

AccountListItem represents account list item

type AccountNetworkAccess

type AccountNetworkAccess struct {
	Network []string `json:"network"`
}

AccountNetworkAccess represents UUIDs of networks the account is allowed to manage, * means all

type AccountRoles

type AccountRoles struct {
	Role []string `json:"role"`
}

AccountRoles represents roles associated to account Roles for the account; billing, aux_billing, or technical.

type AccountServer

type AccountServer struct {
	UUID    string  `json:"uuid"`
	Storage Boolean `json:"storage"`
}

AccountServer represents server (UUID) and storage access permisission

type AccountServerAccess

type AccountServerAccess struct {
	Server []AccountServer `json:"server"`
}

AccountServerAccess represents servers the account is allowed to manage

type AccountStorageAccess

type AccountStorageAccess struct {
	Storage []string `json:"storage"`
}

AccountStorageAccess represents UUIDs of storages the account is allowed to manage, or * for all

type AccountTag

type AccountTag struct {
	Name    string  `json:"name"`
	Storage Boolean `json:"storage"`
}

AccountTag represents tag and storage access permisission

type AccountTagAccess

type AccountTagAccess struct {
	Tag []AccountTag `json:"tag"`
}

AccountTagAccess represents tags associated to account

type AccountType

type AccountType string
const (
	AccountTypeMain       AccountType = "main"
	AccountTypeSubaccount AccountType = "sub"
)

type BackupRule

type BackupRule struct {
	Interval string `json:"interval,omitempty"`
	// Time should be in the format "hhmm", e.g. "0430"
	Time      string `json:"time,omitempty"`
	Retention int    `json:"retention,string,omitempty"`
}

BackupRule represents a backup rule

type BackupUUIDSlice

type BackupUUIDSlice []string

BackupUUIDSlice is a slice of string. It exists to allow for a custom JSON unmarshaller.

func (*BackupUUIDSlice) UnmarshalJSON

func (s *BackupUUIDSlice) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Boolean

type Boolean int

Boolean is a custom boolean type that allows for custom marshalling and unmarshalling and for an empty value that isn't false so we can distinguish between true, false and not set.

const (
	True  Boolean = 1
	False Boolean = -1
	Empty Boolean = 0
)

Constants

func FromBool

func FromBool(v bool) Boolean

FromBool converts from a standard bool values

func (*Boolean) Bool

func (b *Boolean) Bool() bool

Bool converts to a standard bool value

func (*Boolean) Empty

func (b *Boolean) Empty() bool

Empty checks if this bool is empty

func (*Boolean) MarshalJSON

func (b *Boolean) MarshalJSON() ([]byte, error)

MarshalJSON is a custom unmarshaller that deals with deeply embedded values.

func (*Boolean) String

func (b *Boolean) String() string

String returns a string representation

func (*Boolean) UnmarshalJSON

func (b *Boolean) UnmarshalJSON(buf []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type FirewallRule

type FirewallRule struct {
	Action                  string `json:"action"`
	Comment                 string `json:"comment,omitempty"`
	DestinationAddressStart string `json:"destination_address_start,omitempty"`
	DestinationAddressEnd   string `json:"destination_address_end,omitempty"`
	DestinationPortStart    string `json:"destination_port_start,omitempty"`
	DestinationPortEnd      string `json:"destination_port_end,omitempty"`
	Direction               string `json:"direction"`
	Family                  string `json:"family,omitempty"`
	ICMPType                string `json:"icmp_type,omitempty"`
	Position                int    `json:"position,string,omitempty"`
	Protocol                string `json:"protocol,omitempty"`
	SourceAddressStart      string `json:"source_address_start,omitempty"`
	SourceAddressEnd        string `json:"source_address_end,omitempty"`
	SourcePortStart         string `json:"source_port_start,omitempty"`
	SourcePortEnd           string `json:"source_port_end,omitempty"`
}

FirewallRule represents a single firewall rule. Note that most integer values are represented as strings

func (*FirewallRule) UnmarshalJSON

func (s *FirewallRule) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type FirewallRules

type FirewallRules struct {
	FirewallRules []FirewallRule `json:"firewall_rules"`
}

FirewallRules represents a list of firewall rules

func (*FirewallRules) UnmarshalJSON

func (s *FirewallRules) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Gateway

type Gateway struct {
	UUID             string                  `json:"uuid,omitempty"`
	Name             string                  `json:"name,omitempty"`
	Zone             string                  `json:"zone,omitempty"`
	Plan             string                  `json:"plan,omitempty"`
	Labels           []Label                 `json:"labels,omitempty"`
	ConfiguredStatus GatewayConfiguredStatus `json:"configured_status,omitempty"`
	OperationalState GatewayOperationalState `json:"operational_state,omitempty"`
	Features         []GatewayFeature        `json:"features,omitempty"`
	Routers          []GatewayRouter         `json:"routers,omitempty"`
	CreatedAt        time.Time               `json:"created_at,omitempty"`
	UpdatedAt        time.Time               `json:"updated_at,omitempty"`
	Addresses        []GatewayAddress        `json:"addresses,omitempty"`
	Connections      []GatewayConnection     `json:"connections,omitempty"`
}

type GatewayAddress

type GatewayAddress struct {
	Address string `json:"address,omitempty"`
	Name    string `json:"name,omitempty"`
}

type GatewayConfiguredStatus

type GatewayConfiguredStatus string

GatewayConfiguredStatus represents a desired status of the service

type GatewayConnection added in v8.3.0

type GatewayConnection struct {
	Name         string                `json:"name,omitempty"`
	Type         GatewayConnectionType `json:"type,omitempty"`
	LocalRoutes  []GatewayRoute        `json:"local_routes,omitempty"`
	RemoteRoutes []GatewayRoute        `json:"remote_routes,omitempty"`
	Tunnels      []GatewayTunnel       `json:"tunnels,omitempty"`
	CreatedAt    time.Time             `json:"created_at,omitempty"`
	UpdatedAt    time.Time             `json:"updated_at,omitempty"`
}

type GatewayConnectionType added in v8.3.0

type GatewayConnectionType string

type GatewayFeature

type GatewayFeature string

GatewayFeature represents a feature of the service

type GatewayIPSecAlgorithm added in v8.3.0

type GatewayIPSecAlgorithm string

type GatewayIPSecAuthType added in v8.3.0

type GatewayIPSecAuthType string

type GatewayIPSecIntegrityAlgorithm added in v8.3.0

type GatewayIPSecIntegrityAlgorithm string

type GatewayOperationalState

type GatewayOperationalState string

GatewayConfiguredStatus represents current, actual status of the service

type GatewayPlan added in v8.3.0

type GatewayPlan struct {
	Name                     string           `json:"name,omitempty"`
	PerGatewayBandwidthMbps  int              `json:"per_gateway_bandwidth_mbps,omitempty"`
	PerGatewayMaxConnections int              `json:"per_gateway_max_connections,omitempty"`
	ServerNumber             int              `json:"server_number,omitempty"`
	SupportedFeatures        []GatewayFeature `json:"supported_features,omitempty"`
	VPNTunnelAmount          int              `json:"vpn_tunnel_amount,omitempty"`
}

type GatewayRoute added in v8.3.0

type GatewayRoute struct {
	Name          string           `json:"name,omitempty"`
	StaticNetwork string           `json:"static_network,omitempty"`
	Type          GatewayRouteType `json:"type,omitempty"`
}

type GatewayRouteType added in v8.3.0

type GatewayRouteType string

type GatewayRouter

type GatewayRouter struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	UUID      string    `json:"uuid,omitempty"`
}

type GatewayTunnel added in v8.3.0

type GatewayTunnel struct {
	Name             string                        `json:"name,omitempty"`
	LocalAddress     GatewayTunnelLocalAddress     `json:"local_address,omitempty"`
	RemoteAddress    GatewayTunnelRemoteAddress    `json:"remote_address,omitempty"`
	IPSec            GatewayTunnelIPSec            `json:"ipsec,omitempty"`
	OperationalState GatewayTunnelOperationalState `json:"operational_state,omitempty"`
	CreatedAt        time.Time                     `json:"created_at,omitempty"`
	UpdatedAt        time.Time                     `json:"updated_at,omitempty"`
}

type GatewayTunnelIPSec added in v8.3.0

type GatewayTunnelIPSec struct {
	// Tunnel IPSec authentication object
	Authentication GatewayTunnelIPSecAuth `json:"authentication,omitempty"`
	// IKE SA rekey time in seconds
	RekeyTime int `json:"rekey_time,omitempty"`
	// IKE child SA rekey time in seconds
	ChildRekeyTime int `json:"child_rekey_time,omitempty"`
	// Delay before sending Dead Peer Detection packets if no traffic is detected, in seconds
	DPDDelay int `json:"dpd_delay,omitempty"`
	// Timeout period for DPD reply before considering the peer to be dead, in seconds
	DPDTimeout int `json:"dpd_timeout,omitempty"`
	// Maximum IKE SA lifetime in seconds
	IKELifetime int `json:"ike_lifetime,omitempty"`
	// List of Phase 1: Proposal algorithms
	Phase1Algorithms []GatewayIPSecAlgorithm `json:"phase1_algorithms,omitempty"`
	// List of Phase 1 integrity algorithms
	Phase1IntegrityAlgorithms []GatewayIPSecIntegrityAlgorithm `json:"phase1_integrity_algorithms,omitempty"`
	// List of Phase 1 Diffie-Hellman group numbers
	Phase1DHGroupNumbers []int `json:"phase1_dh_group_numbers,omitempty"`
	// List of Phase 2: Security Association algorithms
	Phase2Algorithms []GatewayIPSecAlgorithm `json:"phase2_algorithms,omitempty"`
	// List of Phase 2 integrity algorithms
	Phase2IntegrityAlgorithms []GatewayIPSecIntegrityAlgorithm `json:"phase2_integrity_algorithms,omitempty"`
	// List of Phase 2 Diffie-Hellman group numbers
	Phase2DHGroupNumbers []int `json:"phase2_dh_group_numbers,omitempty"`
}

type GatewayTunnelIPSecAuth added in v8.3.0

type GatewayTunnelIPSecAuth struct {
	Authentication GatewayIPSecAuthType `json:"authentication,omitempty"`
	// PSK is a user-provided pre-shared key.
	// Note that this field is only meant to be used when providing API with your pre-shared key; it will always be empty in API responses
	PSK string `json:"psk,omitempty"`
}

type GatewayTunnelLocalAddress added in v8.3.0

type GatewayTunnelLocalAddress struct {
	// Name of the UpCloud gateway address; should correspond to the name of one of the gateway address structs
	Name string `json:"name,omitempty"`
}

type GatewayTunnelOperationalState added in v8.3.0

type GatewayTunnelOperationalState string

GatewayTunnelOperationalState represents current, actual status of the tunnel

type GatewayTunnelRemoteAddress added in v8.3.0

type GatewayTunnelRemoteAddress struct {
	// Address is a remote peer address VPN will connect to; must be global non-private unicast IP address.
	Address string `json:"address,omitempty"`
}

type Host

type Host struct {
	ID             int       `json:"id"`
	Description    string    `json:"description"`
	Zone           string    `json:"zone"`
	WindowsEnabled Boolean   `json:"windows_enabled"`
	Stats          StatSlice `json:"stats"`
}

Host represents an individual Host in a response

func (*Host) UnmarshalJSON

func (s *Host) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Hosts

type Hosts struct {
	Hosts []Host `json:"hosts"`
}

Hosts represents a GetHosts response

func (*Hosts) UnmarshalJSON

func (n *Hosts) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type IPAddress

type IPAddress struct {
	Access     string  `json:"access"`
	Address    string  `json:"address"`
	Family     string  `json:"family"`
	PartOfPlan Boolean `json:"part_of_plan"`
	PTRRecord  string  `json:"ptr_record"`
	ServerUUID string  `json:"server"`
	MAC        string  `json:"mac"`
	Floating   Boolean `json:"floating"`
	Zone       string  `json:"zone"`
}

IPAddress represents an IP address

func (*IPAddress) UnmarshalJSON

func (s *IPAddress) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type IPAddressSlice

type IPAddressSlice []IPAddress

IPAddressSlice is a slice of IPAddress. It exists to allow for a custom JSON unmarshaller.

func (*IPAddressSlice) UnmarshalJSON

func (i *IPAddressSlice) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type IPAddresses

type IPAddresses struct {
	IPAddresses []IPAddress `json:"ip_addresses"`
}

IPAddresses represents a /ip_address response

func (*IPAddresses) UnmarshalJSON

func (s *IPAddresses) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type IPNetwork

type IPNetwork struct {
	Address          string   `json:"address,omitempty"`
	DHCP             Boolean  `json:"dhcp"`
	DHCPDefaultRoute Boolean  `json:"dhcp_default_route"`
	DHCPDns          []string `json:"dhcp_dns,omitempty"`
	DHCPRoutes       []string `json:"dhcp_routes,omitempty"`
	Family           string   `json:"family,omitempty"`
	Gateway          string   `json:"gateway,omitempty"`
}

IPNetwork represents an IP network in a response.

type IPNetworkSlice

type IPNetworkSlice []IPNetwork

IPNetworkSlice is a slice of IPNetworks It exists to allow for a custom unmarshaller.

func (IPNetworkSlice) MarshalJSON

func (t IPNetworkSlice) MarshalJSON() ([]byte, error)

MarshalJSON is a custom marshaller that deals with deeply embedded values.

func (*IPNetworkSlice) UnmarshalJSON

func (t *IPNetworkSlice) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Interface

type Interface struct {
	Index             int            `json:"index"`
	IPAddresses       IPAddressSlice `json:"ip_addresses"`
	MAC               string         `json:"mac"`
	Network           string         `json:"network"`
	Type              string         `json:"type"`
	Bootable          Boolean        `json:"bootable"`
	SourceIPFiltering Boolean        `json:"source_ip_filtering"`
}

Interface represents a network interface in a response

func (*Interface) UnmarshalJSON

func (s *Interface) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type KubernetesCluster

type KubernetesCluster struct {
	ControlPlaneIPFilter []string               `json:"control_plane_ip_filter,omitempty"`
	Labels               []Label                `json:"labels,omitempty"`
	Name                 string                 `json:"name,omitempty"`
	Network              string                 `json:"network,omitempty"`
	NetworkCIDR          string                 `json:"network_cidr,omitempty"`
	NodeGroups           []KubernetesNodeGroup  `json:"node_groups,omitempty"`
	State                KubernetesClusterState `json:"state,omitempty"`
	UUID                 string                 `json:"uuid,omitempty"`
	Version              string                 `json:"version,omitempty"`
	Zone                 string                 `json:"zone,omitempty"`
	Plan                 string                 `json:"plan,omitempty"`
	PrivateNodeGroups    bool                   `json:"private_node_groups,omitempty"`
	// The default storage encryption strategy for all node groups.
	StorageEncryption StorageEncryption `json:"storage_encryption,omitempty"`
}

type KubernetesClusterState

type KubernetesClusterState string

type KubernetesClusterTaintEffect

type KubernetesClusterTaintEffect string

type KubernetesClusterType

type KubernetesClusterType string

type KubernetesKubeletArg

type KubernetesKubeletArg struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type KubernetesNode

type KubernetesNode struct {
	UUID  string              `json:"uuid,omitempty"`
	Name  string              `json:"name,omitempty"`
	State KubernetesNodeState `json:"state,omitempty"`
}

type KubernetesNodeGroup

type KubernetesNodeGroup struct {
	AntiAffinity         bool                           `json:"anti_affinity,omitempty"`
	Count                int                            `json:"count,omitempty"`
	KubeletArgs          []KubernetesKubeletArg         `json:"kubelet_args,omitempty"`
	Labels               []Label                        `json:"labels,omitempty"`
	Name                 string                         `json:"name,omitempty"`
	Plan                 string                         `json:"plan,omitempty"`
	CustomPlan           *KubernetesNodeGroupCustomPlan `json:"custom_plan,omitempty"`
	SSHKeys              []string                       `json:"ssh_keys,omitempty"`
	State                KubernetesNodeGroupState       `json:"state,omitempty"`
	Storage              string                         `json:"storage,omitempty"`
	Taints               []KubernetesTaint              `json:"taints,omitempty"`
	UtilityNetworkAccess bool                           `json:"utility_network_access,omitempty"`
	// Node group storage encryption strategy.
	StorageEncryption StorageEncryption `json:"storage_encryption,omitempty"`
}

type KubernetesNodeGroupCustomPlan added in v8.5.0

type KubernetesNodeGroupCustomPlan struct {
	// The number of CPU cores dedicated to individual node group node
	Cores int `json:"cores"`
	// The amount of memory in megabytes to assign to individual node group node
	Memory int `json:"memory"`
	// The size of the storage device in gigabytes.
	StorageSize int `json:"storage_size"`
	// The storage tier is MaxIOPS® or HDD.
	StorageTier StorageTier `json:"storage_tier,omitempty"`
}

KubernetesNodeGroupCustomPlan represents custom server plan used for each node in the node group.

type KubernetesNodeGroupDetails

type KubernetesNodeGroupDetails struct {
	KubernetesNodeGroup

	Nodes []KubernetesNode `json:"nodes,omitempty"`
}

type KubernetesNodeGroupState

type KubernetesNodeGroupState string

type KubernetesNodeState

type KubernetesNodeState string

type KubernetesPlan

type KubernetesPlan struct {
	Name         string `json:"name"`
	ServerNumber int    `json:"server_number"`
	MaxNodes     int    `json:"max_nodes"`
}

type KubernetesTaint

type KubernetesTaint struct {
	Effect KubernetesClusterTaintEffect `json:"effect"`
	Key    string                       `json:"key"`
	Value  string                       `json:"value"`
}

type KubernetesVersion

type KubernetesVersion struct {
	Id      string `json:"id"`
	Version string `json:"version"`
}

type Label

type Label struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Label represents a key-value pair label in a response.

type LabelSlice

type LabelSlice []Label

LabelSlice is a slice of Labels It exists to allow for a custom unmarshaller.

func (LabelSlice) MarshalJSON

func (ls LabelSlice) MarshalJSON() ([]byte, error)

MarshalJSON is a custom marshaller that deals with deeply embedded values.

func (*LabelSlice) UnmarshalJSON

func (ls *LabelSlice) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type LoadBalancer

type LoadBalancer struct {
	UUID             string                       `json:"uuid,omitempty"`
	Name             string                       `json:"name,omitempty"`
	Zone             string                       `json:"zone,omitempty"`
	Plan             string                       `json:"plan,omitempty"`
	NetworkUUID      string                       `json:"network_uuid,omitempty"` // deprecated
	Networks         []LoadBalancerNetwork        `json:"networks,omitempty"`
	DNSName          string                       `json:"dns_name,omitempty"` // deprecated
	Labels           []Label                      `json:"labels,omitempty"`
	ConfiguredStatus LoadBalancerConfiguredStatus `json:"configured_status,omitempty"`
	OperationalState LoadBalancerOperationalState `json:"operational_state,omitempty"`
	Frontends        []LoadBalancerFrontend       `json:"frontends,omitempty"`
	Backends         []LoadBalancerBackend        `json:"backends,omitempty"`
	Resolvers        []LoadBalancerResolver       `json:"resolvers,omitempty"`
	Nodes            []LoadBalancerNode           `json:"nodes,omitempty"`
	CreatedAt        time.Time                    `json:"created_at,omitempty"`
	UpdatedAt        time.Time                    `json:"updated_at,omitempty"`
	MaintenanceDOW   LoadBalancerMaintenanceDOW   `json:"maintenance_dow,omitempty"`
	MaintenanceTime  string                       `json:"maintenance_time,omitempty"`
}

LoadBalancer service

type LoadBalancerAction

type LoadBalancerAction struct {
	Type                LoadBalancerActionType                 `json:"type,omitempty"`
	UseBackend          *LoadBalancerActionUseBackend          `json:"action_use_backend,omitempty"`
	TCPReject           *LoadBalancerActionTCPReject           `json:"action_tcp_reject,omitempty"`
	HTTPReturn          *LoadBalancerActionHTTPReturn          `json:"action_http_return,omitempty"`
	HTTPRedirect        *LoadBalancerActionHTTPRedirect        `json:"action_http_redirect,omitempty"`
	SetForwardedHeaders *LoadBalancerActionSetForwardedHeaders `json:"action_set_forwarded_headers,omitempty"`
}

LoadBalancerAction represents rule action

type LoadBalancerActionHTTPRedirect

type LoadBalancerActionHTTPRedirect struct {
	Location string                               `json:"location,omitempty"`
	Scheme   LoadBalancerActionHTTPRedirectScheme `json:"scheme,omitempty"`
}

LoadBalancerActionHTTPRedirect represents 'http_redirect' action. Only either Location or Scheme should be defined.

type LoadBalancerActionHTTPRedirectScheme

type LoadBalancerActionHTTPRedirectScheme string

type LoadBalancerActionHTTPReturn

type LoadBalancerActionHTTPReturn struct {
	Status      int    `json:"status,omitempty"`
	ContentType string `json:"content_type,omitempty"`
	Payload     string `json:"payload,omitempty"`
}

LoadBalancerActionHTTPReturn represents 'http_return' action

type LoadBalancerActionSetForwardedHeaders

type LoadBalancerActionSetForwardedHeaders struct{}

LoadBalancerActionSetForwardedHeaders represents 'set_forwarded_headers' action

type LoadBalancerActionTCPReject

type LoadBalancerActionTCPReject struct{}

LoadBalancerActionTCPReject represents 'tcp_reject' action

type LoadBalancerActionType

type LoadBalancerActionType string

type LoadBalancerActionUseBackend

type LoadBalancerActionUseBackend struct {
	Backend string `json:"backend,omitempty"`
}

LoadBalancerActionUseBackend represents 'use_backend' action

type LoadBalancerAddressFamily

type LoadBalancerAddressFamily string

type LoadBalancerBackend

type LoadBalancerBackend struct {
	Name       string                         `json:"name"`
	Members    []LoadBalancerBackendMember    `json:"members"`
	Resolver   string                         `json:"resolver,omitempty"`
	Properties *LoadBalancerBackendProperties `json:"properties,omitempty"`
	TLSConfigs []LoadBalancerBackendTLSConfig `json:"tls_configs,omitempty"`
	CreatedAt  time.Time                      `json:"created_at,omitempty"`
	UpdatedAt  time.Time                      `json:"updated_at,omitempty"`
}

LoadBalancerBackend represents service backend

type LoadBalancerBackendMember

type LoadBalancerBackendMember struct {
	Name        string                        `json:"name"`
	IP          string                        `json:"ip"`
	Port        int                           `json:"port"`
	Weight      int                           `json:"weight"`
	MaxSessions int                           `json:"max_sessions"`
	Type        LoadBalancerBackendMemberType `json:"type"`
	Enabled     bool                          `json:"enabled"`
	CreatedAt   time.Time                     `json:"created_at,omitempty"`
	UpdatedAt   time.Time                     `json:"updated_at,omitempty"`
}

LoadBalancerBackendMember represents backend member

type LoadBalancerBackendMemberType

type LoadBalancerBackendMemberType string

type LoadBalancerBackendProperties

type LoadBalancerBackendProperties struct {
	TimeoutServer             int                              `json:"timeout_server,omitempty"`
	TimeoutTunnel             int                              `json:"timeout_tunnel,omitempty"`
	HealthCheckTLSVerify      *bool                            `json:"health_check_tls_verify,omitempty"`
	HealthCheckType           LoadBalancerHealthCheckType      `json:"health_check_type,omitempty"`
	HealthCheckInterval       int                              `json:"health_check_interval,omitempty"`
	HealthCheckFall           int                              `json:"health_check_fall,omitempty"`
	HealthCheckRise           int                              `json:"health_check_rise,omitempty"`
	HealthCheckURL            string                           `json:"health_check_url,omitempty"`
	HealthCheckExpectedStatus int                              `json:"health_check_expected_status,omitempty"`
	StickySessionCookieName   string                           `json:"sticky_session_cookie_name,omitempty"`
	OutboundProxyProtocol     LoadBalancerProxyProtocolVersion `json:"outbound_proxy_protocol,omitempty"`
	TLSEnabled                *bool                            `json:"tls_enabled,omitempty"`
	TLSVerify                 *bool                            `json:"tls_verify,omitempty"`
	TLSUseSystemCA            *bool                            `json:"tls_use_system_ca,omitempty"`
	HTTP2Enabled              *bool                            `json:"http2_enabled,omitempty"`
}

LoadBalancerBackendProperties represents backend properties

type LoadBalancerBackendTLSConfig

type LoadBalancerBackendTLSConfig struct {
	Name                  string    `json:"name,omitempty"`
	CertificateBundleUUID string    `json:"certificate_bundle_uuid,omitempty"`
	CreatedAt             time.Time `json:"created_at,omitempty"`
	UpdatedAt             time.Time `json:"updated_at,omitempty"`
}

LoadBalancerBackendTLSConfig represents backend TLS configuration

type LoadBalancerCertificateBundle

type LoadBalancerCertificateBundle struct {
	UUID          string    `json:"uuid,omitempty"`
	Certificate   string    `json:"certificate,omitempty"`
	Intermediates string    `json:"intermediates,omitempty"`
	Hostnames     []string  `json:"hostnames,omitempty"`
	KeyType       string    `json:"key_type,omitempty"`
	Name          string    `json:"name,omitempty"`
	NotAfter      time.Time `json:"not_after,omitempty"`
	NotBefore     time.Time `json:"not_before,omitempty"`
	CreatedAt     time.Time `json:"created_at,omitempty"`
	UpdatedAt     time.Time `json:"updated_at,omitempty"`

	Type             LoadBalancerCertificateBundleType             `json:"type,omitempty"`
	OperationalState LoadBalancerCertificateBundleOperationalState `json:"operational_state,omitempty"`
}

LoadBalancerCertificateBundle represents certificate bundle

type LoadBalancerCertificateBundleOperationalState

type LoadBalancerCertificateBundleOperationalState string

type LoadBalancerCertificateBundleType

type LoadBalancerCertificateBundleType string

type LoadBalancerConfiguredStatus

type LoadBalancerConfiguredStatus string

type LoadBalancerFrontend

type LoadBalancerFrontend struct {
	Name           string                          `json:"name,omitempty"`
	Mode           LoadBalancerMode                `json:"mode,omitempty"`
	Port           int                             `json:"port,omitempty"`
	Networks       []LoadBalancerFrontendNetwork   `json:"networks,omitempty"`
	DefaultBackend string                          `json:"default_backend,omitempty"`
	Rules          []LoadBalancerFrontendRule      `json:"rules,omitempty"`
	TLSConfigs     []LoadBalancerFrontendTLSConfig `json:"tls_configs,omitempty"`
	Properties     *LoadBalancerFrontendProperties `json:"properties,omitempty"`
	CreatedAt      time.Time                       `json:"created_at,omitempty"`
	UpdatedAt      time.Time                       `json:"updated_at,omitempty"`
}

LoadBalancerFrontend represents service frontend

type LoadBalancerFrontendNetwork

type LoadBalancerFrontendNetwork struct {
	Name string `json:"name,omitempty"`
}

LoadBalancerFrontendNetwork represents network attached to loadbalancer

type LoadBalancerFrontendProperties

type LoadBalancerFrontendProperties struct {
	TimeoutClient        int   `json:"timeout_client,omitempty"`
	InboundProxyProtocol *bool `json:"inbound_proxy_protocol,omitempty"`
	HTTP2Enabled         *bool `json:"http2_enabled,omitempty"`
}

LoadBalancerFrontendProperties represents frontend properties

type LoadBalancerFrontendRule

type LoadBalancerFrontendRule struct {
	Name      string                `json:"name,omitempty"`
	Priority  int                   `json:"priority,omitempty"`
	Matchers  []LoadBalancerMatcher `json:"matchers,omitempty"`
	Actions   []LoadBalancerAction  `json:"actions,omitempty"`
	CreatedAt time.Time             `json:"created_at,omitempty"`
	UpdatedAt time.Time             `json:"updated_at,omitempty"`
}

LoadBalancerFrontendRule represents frontend rule

type LoadBalancerFrontendTLSConfig

type LoadBalancerFrontendTLSConfig struct {
	Name                  string    `json:"name,omitempty"`
	CertificateBundleUUID string    `json:"certificate_bundle_uuid,omitempty"`
	CreatedAt             time.Time `json:"created_at,omitempty"`
	UpdatedAt             time.Time `json:"updated_at,omitempty"`
}

LoadBalancerFrontendTLSConfig represents frontend TLS configuration

type LoadBalancerHTTPMatcherMethod

type LoadBalancerHTTPMatcherMethod string

type LoadBalancerHealthCheckType

type LoadBalancerHealthCheckType string

type LoadBalancerIPAddress

type LoadBalancerIPAddress struct {
	Address string `json:"address,omitempty"`
	Listen  bool   `json:"listen"`
}

LoadBalancerIPAddress represents IP address inside loadbalancer service

type LoadBalancerIntegerMatcherMethod

type LoadBalancerIntegerMatcherMethod string

type LoadBalancerMaintenanceDOW

type LoadBalancerMaintenanceDOW string

type LoadBalancerMatcher

type LoadBalancerMatcher struct {
	Type         LoadBalancerMatcherType                `json:"type,omitempty"`
	SrcIP        *LoadBalancerMatcherSourceIP           `json:"match_src_ip,omitempty"`
	SrcPort      *LoadBalancerMatcherInteger            `json:"match_src_port,omitempty"`
	BodySize     *LoadBalancerMatcherInteger            `json:"match_body_size,omitempty"`
	Path         *LoadBalancerMatcherString             `json:"match_path,omitempty"`
	URL          *LoadBalancerMatcherString             `json:"match_url,omitempty"`
	URLQuery     *LoadBalancerMatcherString             `json:"match_url_query,omitempty"`
	Host         *LoadBalancerMatcherHost               `json:"match_host,omitempty"`
	HTTPMethod   *LoadBalancerMatcherHTTPMethod         `json:"match_http_method,omitempty"`
	Cookie       *LoadBalancerMatcherStringWithArgument `json:"match_cookie,omitempty"`
	Header       *LoadBalancerMatcherStringWithArgument `json:"match_header,omitempty"`
	URLParam     *LoadBalancerMatcherStringWithArgument `json:"match_url_param,omitempty"`
	NumMembersUp *LoadBalancerMatcherNumMembersUp       `json:"match_num_members_up,omitempty"`
	Inverse      *bool                                  `json:"inverse,omitempty"`
}

LoadBalancerMatcher represents rule matcher

type LoadBalancerMatcherHTTPMethod

type LoadBalancerMatcherHTTPMethod struct {
	Value LoadBalancerHTTPMatcherMethod `json:"value,omitempty"`
}

LoadBalancerMatcherHTTPMethod represents 'http_method' matcher

type LoadBalancerMatcherHost

type LoadBalancerMatcherHost struct {
	Value string `json:"value,omitempty"`
}

LoadBalancerMatcherHost represents 'host' matcher

type LoadBalancerMatcherInteger

type LoadBalancerMatcherInteger struct {
	Method     LoadBalancerIntegerMatcherMethod `json:"method,omitempty"`
	Value      int                              `json:"value,omitempty"`
	RangeStart int                              `json:"range_start,omitempty"`
	RangeEnd   int                              `json:"range_end,omitempty"`
}

LoadBalancerMatcherInteger represents integer matcher

type LoadBalancerMatcherNumMembersUp

type LoadBalancerMatcherNumMembersUp struct {
	Method  LoadBalancerIntegerMatcherMethod `json:"method,omitempty"`
	Value   int                              `json:"value,omitempty"`
	Backend string                           `json:"backend,omitempty"`
}

LoadBalancerMatcherNumMembersUp represents 'num_members_up' matcher

type LoadBalancerMatcherSourceIP

type LoadBalancerMatcherSourceIP struct {
	Value string `json:"value,omitempty"`
}

LoadBalancerMatcherSourceIP represents 'src_ip' matcher

type LoadBalancerMatcherString

type LoadBalancerMatcherString struct {
	Method     LoadBalancerStringMatcherMethod `json:"method,omitempty"`
	Value      string                          `json:"value,omitempty"`
	IgnoreCase *bool                           `json:"ignore_case,omitempty"`
}

LoadBalancerMatcherString represents string matcher

type LoadBalancerMatcherStringWithArgument

type LoadBalancerMatcherStringWithArgument struct {
	Method     LoadBalancerStringMatcherMethod `json:"method,omitempty"`
	Name       string                          `json:"name,omitempty"`
	Value      string                          `json:"value,omitempty"`
	IgnoreCase *bool                           `json:"ignore_case,omitempty"`
}

LoadBalancerMatcherStringWithArgument represents 'string with argument' matcher

type LoadBalancerMatcherType

type LoadBalancerMatcherType string

type LoadBalancerMode

type LoadBalancerMode string

type LoadBalancerNetwork

type LoadBalancerNetwork struct {
	UUID        string                    `json:"uuid,omitempty"`
	Name        string                    `json:"name,omitempty"`
	Type        LoadBalancerNetworkType   `json:"type,omitempty"`
	Family      LoadBalancerAddressFamily `json:"family,omitempty"`
	IPAddresses []LoadBalancerIPAddress   `json:"ip_addresses,omitempty"`
	DNSName     string                    `json:"dns_name,omitempty"`
	CreatedAt   time.Time                 `json:"created_at,omitempty"`
	UpdatedAt   time.Time                 `json:"updated_at,omitempty"`
}

LoadBalancerNetwork represents network attached to loadbalancer

type LoadBalancerNetworkType

type LoadBalancerNetworkType string

type LoadBalancerNode

type LoadBalancerNode struct {
	Networks         []LoadBalancerNodeNetwork        `json:"networks,omitempty"`
	OperationalState LoadBalancerNodeOperationalState `json:"operational_state,omitempty"`
}

LoadBalancerNode represents loadbalancer node

type LoadBalancerNodeNetwork

type LoadBalancerNodeNetwork struct {
	Name        string                  `json:"name,omitempty"`
	Type        LoadBalancerNetworkType `json:"type,omitempty"`
	IPAddresses []LoadBalancerIPAddress `json:"ip_addresses,omitempty"`
}

LoadBalancerNodeNetwork represents node network

type LoadBalancerNodeOperationalState

type LoadBalancerNodeOperationalState string

type LoadBalancerOperationalState

type LoadBalancerOperationalState string

type LoadBalancerPlan

type LoadBalancerPlan struct {
	Name                 string `json:"name,omitempty"`
	PerServerMaxSessions int    `json:"per_server_max_sessions,omitempty"`
	ServerNumber         int    `json:"server_number,omitempty"`
}

LoadBalancerPlan represents load balancer plan details

type LoadBalancerProxyProtocolVersion

type LoadBalancerProxyProtocolVersion string

type LoadBalancerResolver

type LoadBalancerResolver struct {
	Name         string    `json:"name,omitempty"`
	Nameservers  []string  `json:"nameservers,omitempty"`
	Retries      int       `json:"retries,omitempty"`
	Timeout      int       `json:"timeout,omitempty"`
	TimeoutRetry int       `json:"timeout_retry,omitempty"`
	CacheValid   int       `json:"cache_valid,omitempty"`
	CacheInvalid int       `json:"cache_invalid,omitempty"`
	CreatedAt    time.Time `json:"created_at,omitempty"`
	UpdatedAt    time.Time `json:"updated_at,omitempty"`
}

LoadBalancerResolver represents domain name resolver

type LoadBalancerStringMatcherMethod

type LoadBalancerStringMatcherMethod string

type ManagedDatabase

type ManagedDatabase struct {
	Backups          []ManagedDatabaseBackup         `json:"backups,omitempty"`
	Components       []ManagedDatabaseComponent      `json:"components,omitempty"`
	CreateTime       time.Time                       `json:"create_time,omitempty"`
	Maintenance      ManagedDatabaseMaintenanceTime  `json:"maintenance,omitempty"`
	Name             string                          `json:"name,omitempty"`
	Networks         []ManagedDatabaseNetwork        `json:"networks,omitempty"`
	NodeCount        int                             `json:"node_count,omitempty"`
	NodeStates       []ManagedDatabaseNodeState      `json:"node_states,omitempty"`
	Plan             string                          `json:"plan,omitempty"`
	Powered          bool                            `json:"powered,omitempty"`
	Properties       ManagedDatabaseProperties       `json:"properties,omitempty"`
	State            ManagedDatabaseState            `json:"state,omitempty"`
	Title            string                          `json:"title,omitempty"`
	Type             ManagedDatabaseServiceType      `json:"type,omitempty"`
	UpdateTime       time.Time                       `json:"update_time,omitempty"`
	ServiceURI       string                          `json:"service_uri,omitempty"`
	ServiceURIParams ManagedDatabaseServiceURIParams `json:"service_uri_params,omitempty"`
	Users            []ManagedDatabaseUser           `json:"users,omitempty"`
	UUID             string                          `json:"uuid,omitempty"`
	Zone             string                          `json:"zone,omitempty"`
	Metadata         *ManagedDatabaseMetadata        `json:"metadata,omitempty"`
}

ManagedDatabase represents an existing managed database instance

type ManagedDatabaseAccessControl

type ManagedDatabaseAccessControl struct {
	ACLsEnabled         *bool `json:"access_control"`
	ExtendedACLsEnabled *bool `json:"extended_access_control"`
}

ManagedDatabaseAccessControl contains access controls settings for an OpenSearch Managed Database service

type ManagedDatabaseBackup

type ManagedDatabaseBackup struct {
	BackupName string    `json:"backup_name"`
	BackupTime time.Time `json:"backup_time"`
	DataSize   int       `json:"data_size"`
}

ManagedDatabaseBackup represents a full backup taken at a point in time. It should be noted that both MySQL and PostgreSQL support restoring to any point in time between full backups.

type ManagedDatabaseBackupConfig deprecated

type ManagedDatabaseBackupConfig struct {
	Interval     int    `json:"interval"`
	MaxCount     int    `json:"max_count"`
	RecoveryMode string `json:"recovery_mode"`
}

Deprecated: ManagedDatabaseBackupConfig is deprecated in favor of service specific ManagedDatabaseBackupConfig<ServiceType> types. Represents backup configuration of a database service plan.

type ManagedDatabaseBackupConfigMySQL

type ManagedDatabaseBackupConfigMySQL struct {
	Interval     int    `json:"interval"`
	MaxCount     int    `json:"max_count"`
	RecoveryMode string `json:"recovery_mode"`
}

ManagedDatabaseBackupConfigMySQL represents backup configuration of a MySQL database service plan

type ManagedDatabaseBackupConfigOpenSearch

type ManagedDatabaseBackupConfigOpenSearch struct {
	FrequentIntervalMinutes    int    `json:"frequent_interval_minutes"`
	FrequentOldestAgeMinutes   int    `json:"frequent_oldest_age_minutes"`
	InfrequentIntervalMinutes  int    `json:"infrequent_interval_minutes"`
	InfrequentOldestAgeMinutes int    `json:"infrequent_oldest_age_minutes"`
	RecoveryMode               string `json:"recovery_mode"`
}

ManagedDatabaseBackupConfigOpenSearch represents backup configuration of a OpenSearch database service plan

type ManagedDatabaseBackupConfigPostgreSQL

type ManagedDatabaseBackupConfigPostgreSQL struct {
	Interval     int    `json:"interval"`
	MaxCount     int    `json:"max_count"`
	RecoveryMode string `json:"recovery_mode"`
}

ManagedDatabaseBackupConfigPostgreSQL represents backup configuration of a PostgreSQL database service plan

type ManagedDatabaseBackupConfigRedis

type ManagedDatabaseBackupConfigRedis struct {
	Interval     int    `json:"interval"`
	MaxCount     int    `json:"max_count"`
	RecoveryMode string `json:"recovery_mode"`
}

ManagedDatabaseBackupConfigRedis represents backup configuration of a Redis database service plan

type ManagedDatabaseComponent

type ManagedDatabaseComponent struct {
	Component string `json:"component"`
	Host      string `json:"host"`
	Port      int    `json:"port"`
	// Route describes how the component can be reached. See following:
	//	upcloud.ManagedDatabaseComponentRoutePublic
	//	upcloud.ManagedDatabaseComponentRouteDynamic
	Route ManagedDatabaseComponentRoute `json:"route"`
	// Usage describes the role of the component. See following:
	//	upcloud.ManagedDatabaseComponentUsagePrimary
	//	upcloud.ManagedDatabaseComponentUsageReplica
	Usage ManagedDatabaseComponentUsage `json:"usage"`
}

ManagedDatabaseComponent represents an accessible component within a service. The usage varies between service types

type ManagedDatabaseComponentRoute

type ManagedDatabaseComponentRoute string

ManagedDatabaseComponentRoute represents the access route a component is associated with

type ManagedDatabaseComponentUsage

type ManagedDatabaseComponentUsage string

ManagedDatabaseComponentUsage represents the logical usage for the component in question

type ManagedDatabaseIndex

type ManagedDatabaseIndex struct {
	CreateTime          time.Time `json:"create_time"`
	Docs                int       `json:"docs"`
	Health              string    `json:"health"`
	IndexName           string    `json:"index_name"`
	NumberOfReplicas    int       `json:"number_of_replicas"`
	NumberOfShards      int       `json:"number_of_shards"`
	ReadOnlyAllowDelete bool      `json:"read_only_allow_delete"`
	Size                int       `json:"size"`
	Status              string    `json:"status"`
}

ManagedDatabaseIndex represents an index of an OpenSearch Managed Database

type ManagedDatabaseLogEntry

type ManagedDatabaseLogEntry struct {
	Hostname string    `json:"hostname"`
	Message  string    `json:"msg"`
	Time     time.Time `json:"time"`
	Service  string    `json:"service"`
}

type ManagedDatabaseLogOrder

type ManagedDatabaseLogOrder string

ManagedDatabaseLogOrder represents the order the logs are queried in

const (
	// ManagedDatabaseLogOrderAscending can be used to query logs in ascending order
	ManagedDatabaseLogOrderAscending ManagedDatabaseLogOrder = "asc"
	// ManagedDatabaseLogOrderDescending can be used to query logs in descending order
	ManagedDatabaseLogOrderDescending ManagedDatabaseLogOrder = "desc"
)

type ManagedDatabaseLogicalDatabase

type ManagedDatabaseLogicalDatabase struct {
	Name string `json:"name"`
	// LCCollate represents a default string sort order of a logical database
	LCCollate string `json:"lc_collate"`
	// LCCType represents a default character classification of a logical database
	LCCType string `json:"lc_ctype"`
}

ManagedDatabaseLogicalDatabase represents a logical database inside a managed database service instance

type ManagedDatabaseLogs

type ManagedDatabaseLogs struct {
	// Offset describes the next available offset. Use this to query more logs.
	Offset string `json:"offset"`
	Logs   []ManagedDatabaseLogEntry
}

type ManagedDatabaseMaintenanceTime

type ManagedDatabaseMaintenanceTime struct {
	DayOfWeek string `json:"dow"`
	Time      string `json:"time"`
}

ManagedDatabaseMaintenanceTime represents the set time of week when automatic maintenance operations are allowed

type ManagedDatabaseMetadata

type ManagedDatabaseMetadata struct {
	MaxConnections              int    `json:"max_connections,omitempty"`
	PGVersion                   string `json:"pg_version,omitempty"`
	MySQLVersion                string `json:"mysql_version,omitempty"`
	RedisVersion                string `json:"redis_version,omitempty"`
	WriteBlockThresholdExceeded *bool  `json:"write_block_threshold_exceeded,omitempty"`
	OpenSearchVersion           string `json:"opensearch_version,omitempty"`
	UpgradeVersion              string `json:"upgrade_version,omitempty"`
}

ManagedDatabaseMetadata contains additional read-only informational data about the managed database

type ManagedDatabaseMetricPeriod

type ManagedDatabaseMetricPeriod string

ManagedDatabaseMetricPeriod represents the observation period of database metrics

const (
	// ManagedDatabaseMetricPeriodHour represents the observation period of an hour for metrics request
	ManagedDatabaseMetricPeriodHour ManagedDatabaseMetricPeriod = "hour"
	// ManagedDatabaseMetricPeriodDay represents the observation period of a day for metrics request
	ManagedDatabaseMetricPeriodDay ManagedDatabaseMetricPeriod = "day"
	// ManagedDatabaseMetricPeriodWeek represents the observation period of a week for metrics request
	ManagedDatabaseMetricPeriodWeek ManagedDatabaseMetricPeriod = "week"
	// ManagedDatabaseMetricPeriodMonth represents the observation period of a month for metrics request
	ManagedDatabaseMetricPeriodMonth ManagedDatabaseMetricPeriod = "month"
	// ManagedDatabaseMetricPeriodYear represents the observation period of a year for metrics request
	ManagedDatabaseMetricPeriodYear ManagedDatabaseMetricPeriod = "year"
)

type ManagedDatabaseMetrics

type ManagedDatabaseMetrics struct {
	CPUUsage       ManagedDatabaseMetricsChartFloat64 `json:"cpu_usage"`
	DiskUsage      ManagedDatabaseMetricsChartFloat64 `json:"disk_usage"`
	DiskIOReads    ManagedDatabaseMetricsChartInt     `json:"diskio_reads"`
	DiskIOWrite    ManagedDatabaseMetricsChartInt     `json:"diskio_writes"`
	LoadAverage    ManagedDatabaseMetricsChartFloat64 `json:"load_average"`
	MemoryUsage    ManagedDatabaseMetricsChartFloat64 `json:"mem_usage"`
	NetworkReceive ManagedDatabaseMetricsChartInt     `json:"net_receive"`
	NetworkSend    ManagedDatabaseMetricsChartInt     `json:"net_send"`
}

ManagedDatabaseMetrics represents managed database service metrics

Metrics are represented in chart form containing a set of columns and two-dimensional slice of rows. The inner slice index corresponds a column. If the service consists of multiple nodes, each node gets their own column in the chart.

The first column is always a timestamp which denotes the timestamp for the recorded metric

type ManagedDatabaseMetricsChartFloat64

type ManagedDatabaseMetricsChartFloat64 struct {
	ManagedDatabaseMetricsChartHeader
	// Rows contains a slice of values per row. The inner slice has the same indexing as the
	// ManagedDatabaseMetricsChartHeader.Columns
	Rows [][]float64
}

ManagedDatabaseMetricsChartFloat64 represents a metric chart with float64 row values

func (ManagedDatabaseMetricsChartFloat64) MarshalJSON

func (m ManagedDatabaseMetricsChartFloat64) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler for the canonical form of metrics chart

func (*ManagedDatabaseMetricsChartFloat64) UnmarshalJSON

func (m *ManagedDatabaseMetricsChartFloat64) UnmarshalJSON(d []byte) error

UnmarshalJSON implements json.Unmarshaler for the canonical form of metrics chart

type ManagedDatabaseMetricsChartHeader

type ManagedDatabaseMetricsChartHeader struct {
	// Columns contains a set of columns that describe for what node the corresponding row element belongs to
	// as well as the type of the metric value
	Columns []ManagedDatabaseMetricsColumn
	// Timestamps contains the timestamps of the rows. Its indexing corresponds the rows.
	Timestamps []time.Time
	// Title contains a description of the metrics chart
	Title string
}

ManagedDatabaseMetricsChartHeader represents common fields of a metrics chart

type ManagedDatabaseMetricsChartInt

type ManagedDatabaseMetricsChartInt struct {
	ManagedDatabaseMetricsChartHeader
	// Rows contains a slice of values per row. The inner slice has the same indexing as the
	// ManagedDatabaseMetricsChartHeader.Columns
	Rows [][]int
}

ManagedDatabaseMetricsChartInt represents a metric chart with int row values

func (ManagedDatabaseMetricsChartInt) MarshalJSON

func (m ManagedDatabaseMetricsChartInt) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler for the canonical form of metrics chart

func (*ManagedDatabaseMetricsChartInt) UnmarshalJSON

func (m *ManagedDatabaseMetricsChartInt) UnmarshalJSON(d []byte) error

UnmarshalJSON implements json.Unmarshaler for the canonical form of metrics chart

type ManagedDatabaseMetricsColumn

type ManagedDatabaseMetricsColumn struct {
	// Label describes the usage of chart's column
	Label string `json:"label"`
	// Type describes the type of values in chart's column
	Type string `json:"type"`
}

ManagedDatabaseMetricsColumn represents a single column of a metrics chart

type ManagedDatabaseNetwork added in v8.1.0

type ManagedDatabaseNetwork struct {
	Family string  `json:"family"`
	Name   string  `json:"name"`
	Type   string  `json:"type"`
	UUID   *string `json:"uuid,omitempty"`
}

ManagedDatabaseNetwork represents a network from where database can be used

type ManagedDatabaseNodeRole

type ManagedDatabaseNodeRole string

ManagedDatabaseNodeRole represents the role of a node implementing a service

const (
	// ManagedDatabaseNodeRoleMaster node serves read and write requests
	ManagedDatabaseNodeRoleMaster ManagedDatabaseNodeRole = "master"
	// ManagedDatabaseNodeRoleStandby node serves read-only requests and is ready to assume the master role during failure scenario
	ManagedDatabaseNodeRoleStandby ManagedDatabaseNodeRole = "standby"
)

type ManagedDatabaseNodeState

type ManagedDatabaseNodeState struct {
	// Name field is same as the ManagedDatabase.Name plus a dash plus an index value. The index represents the
	// generation of a node. Certain modifications require re-provisioning of a node.
	Name string `json:"name"`
	// Role represents the role of a node
	Role ManagedDatabaseNodeRole `json:"role,omitempty"`
	// State represents the current state of a node
	State string `json:"state"`
}

ManagedDatabaseNodeState represents a database node that is part of the service instance

type ManagedDatabaseProperties

type ManagedDatabaseProperties map[ManagedDatabasePropertyKey]interface{}

ManagedDatabaseProperties is a Properties helper type for ManagedDatabase

func (*ManagedDatabaseProperties) Get

func (m *ManagedDatabaseProperties) Get(name ManagedDatabasePropertyKey) interface{}

Get returns a property value by name. The underlying map is initialised if it's nil

func (*ManagedDatabaseProperties) GetAutoUtilityIPFilter

func (m *ManagedDatabaseProperties) GetAutoUtilityIPFilter() bool

GetAutoUtilityIPFilter returns the state of automatic utility network IP filtering. See upcloud.ManagedDatabasePropertyAutoUtilityIPFilter for more information.

func (*ManagedDatabaseProperties) GetBool

GetBool returns a boolean property value. The underlying map is initialised if it's nil.

func (*ManagedDatabaseProperties) GetIPFilter

func (m *ManagedDatabaseProperties) GetIPFilter() []string

GetIPFilter returns a slice of allowed hosts or networks. See upcloud.ManagedDatabasePropertyIPFilter for more information.

func (*ManagedDatabaseProperties) GetInt

GetInt returns an integer property value. The underlying map is initialised if it's nil.

func (*ManagedDatabaseProperties) GetMaxIndexCount deprecated

func (m *ManagedDatabaseProperties) GetMaxIndexCount() int

Deprecated: GetMaxIndexCount is deprecated in favor of field upcloud.ManagedDatabasePropertyMaxIndexCount. Returns the maximum index count of the service.

func (*ManagedDatabaseProperties) GetPublicAccess

func (m *ManagedDatabaseProperties) GetPublicAccess() bool

GetPublicAccess returns the state of public access to the service. See upcloud.ManagedDatabasePropertyPublicAccess for more information.

func (*ManagedDatabaseProperties) GetString

GetString returns a string property value. The underlying map is initialised if it's nil.

func (*ManagedDatabaseProperties) GetStringSlice

GetStringSlice returns a string-slice property value. The underlying map is initialised if it's nil.

type ManagedDatabasePropertyKey

type ManagedDatabasePropertyKey string

ManagedDatabasePropertyKey represents a property name of a service

const (
	// ManagedDatabasePropertyAutoUtilityIPFilter enables automatic ip filter generation from utility network
	// within the same zone.
	ManagedDatabasePropertyAutoUtilityIPFilter ManagedDatabasePropertyKey = "automatic_utility_network_ip_filter"
	// ManagedDatabasePropertyIPFilter allows adjusting the custom IP filter of a service. The value should
	// contain a slice of strings representing individual IP addresses or IP addresses with CIDR mask.
	// Currently, IPv4 addresses or networks are supported.
	ManagedDatabasePropertyIPFilter ManagedDatabasePropertyKey = "ip_filter"
	// ManagedDatabasePropertyPublicAccess enables public access via internet to the service. A separate public
	// endpoint DNS name will be available under Components after enabling.
	ManagedDatabasePropertyPublicAccess ManagedDatabasePropertyKey = "public_access"
	// Deprecated: ManagedDatabasePropertyMaxIndexCount in favor of ManagedDatabaseUserOpenSearchAccessControlRule.
	// Allows adjusting the maximum number of indices of an OpenSearch Managed Database service. Use ManagedDatabaseUserOpenSearchAccessControlRule instead.
	ManagedDatabasePropertyMaxIndexCount ManagedDatabasePropertyKey = "max_index_count"

	// ManagedDatabaseAllIPv4 property value can be used together with ManagedDatabasePropertyIPFilter to allow access from all
	// IPv4 hosts.
	ManagedDatabaseAllIPv4 = "0.0.0.0/0"
)

type ManagedDatabaseQueryStatisticsMySQL

type ManagedDatabaseQueryStatisticsMySQL struct {
	AvgTimerWait            time.Duration `json:"avg_timer_wait"`
	CountStar               uint64        `json:"count_star"`
	Digest                  string        `json:"digest"`
	DigestText              string        `json:"digest_text"`
	FirstSeen               time.Time     `json:"first_seen"`
	LastSeen                time.Time     `json:"last_seen"`
	MaxTimerWait            time.Duration `json:"max_timer_wait"`
	MinTimerWait            time.Duration `json:"min_timer_wait"`
	Quantile95              time.Duration `json:"quantile_95"`
	Quantile99              time.Duration `json:"quantile_99"`
	Quantile999             time.Duration `json:"quantile_999"`
	QuerySampleSeen         time.Time     `json:"query_sample_seen"`
	QuerySampleText         string        `json:"query_sample_text"`
	QuerySampleTimerWait    time.Duration `json:"query_sample_timer_wait"`
	SchemaName              string        `json:"schema_name"`
	SumCreatedTmpDiskTables uint64        `json:"sum_created_tmp_disk_tables"`
	SumCreatedTmpTables     uint64        `json:"sum_created_tmp_tables"`
	SumErrors               uint64        `json:"sum_errors"`
	SumLockTime             uint64        `json:"sum_lock_time"`
	SumNoGoodIndexUsed      uint64        `json:"sum_no_good_index_used"`
	SumNoIndexUsed          uint64        `json:"sum_no_index_used"`
	SumRowsAffected         uint64        `json:"sum_rows_affected"`
	SumRowsExamined         uint64        `json:"sum_rows_examined"`
	SumRowsSent             uint64        `json:"sum_rows_sent"`
	SumSelectFullJoin       uint64        `json:"sum_select_full_join"`
	SumSelectFullRangeJoin  uint64        `json:"sum_select_full_range_join"`
	SumSelectRange          uint64        `json:"sum_select_range"`
	SumSelectRangeCheck     uint64        `json:"sum_select_range_check"`
	SumSelectScan           uint64        `json:"sum_select_scan"`
	SumSortMergePasses      uint64        `json:"sum_sort_merge_passes"`
	SumSortRange            uint64        `json:"sum_sort_range"`
	SumSortRows             uint64        `json:"sum_sort_rows"`
	SumSortScan             uint64        `json:"sum_sort_scan"`
	SumTimerWait            time.Duration `json:"sum_timer_wait"`
	SumWarnings             uint64        `json:"sum_warnings"`
}

ManagedDatabaseQueryStatisticsMySQL represents statistics reported by a MySQL server. Statistics are per Digest which is derived from DigestText

type ManagedDatabaseQueryStatisticsPostgreSQL

type ManagedDatabaseQueryStatisticsPostgreSQL struct {
	BlockReadTime       time.Duration `json:"blk_read_time"`
	BlockWriteTime      time.Duration `json:"blk_write_time"`
	Calls               uint64        `json:"calls"`
	DatabaseName        string        `json:"database_name"`
	LocalBlocksDirtied  uint64        `json:"local_blks_dirtied"`
	LocalBlocksHit      uint64        `json:"local_blks_hit"`
	LocalBlocksRead     uint64        `json:"local_blks_read"`
	LocalBlocksWritten  uint64        `json:"local_blks_written"`
	MaxTime             time.Duration `json:"max_time"`
	MeanTime            time.Duration `json:"mean_time"`
	MinTime             time.Duration `json:"min_time"`
	Query               string        `json:"query"`
	Rows                uint64        `json:"rows"`
	SharedBlocksDirtied uint64        `json:"shared_blks_dirtied"`
	SharedBlocksHit     uint64        `json:"shared_blks_hit"`
	SharedBlocksRead    uint64        `json:"shared_blks_read"`
	SharedBlocksWritten uint64        `json:"shared_blks_written"`
	StddevTime          time.Duration `json:"stddev_time"`
	TempBlocksRead      uint64        `json:"temp_blks_read"`
	TempBlocksWritten   uint64        `json:"temp_blks_written"`
	TotalTime           time.Duration `json:"total_time"`
	UserName            string        `json:"user_name"`
}

ManagedDatabaseQueryStatisticsPostgreSQL represents statistics reported by a PostgreSQL server. Statistics are per Query without parameters.

type ManagedDatabaseServicePlan

type ManagedDatabaseServicePlan struct {
	BackupConfig           ManagedDatabaseBackupConfig            `json:"backup_config"`
	BackupConfigMySQL      *ManagedDatabaseBackupConfigMySQL      `json:"backup_config_mysql,omitempty"`
	BackupConfigOpenSearch *ManagedDatabaseBackupConfigOpenSearch `json:"backup_config_opensearch,omitempty"`
	BackupConfigPostgreSQL *ManagedDatabaseBackupConfigPostgreSQL `json:"backup_config_pg,omitempty"`
	BackupConfigRedis      *ManagedDatabaseBackupConfigRedis      `json:"backup_config_redis,omitempty"`
	NodeCount              int                                    `json:"node_count"`
	Plan                   string                                 `json:"plan"`
	CoreNumber             int                                    `json:"core_number"`
	StorageSize            int                                    `json:"storage_size"`
	MemoryAmount           int                                    `json:"memory_amount"`
	Zones                  ManagedDatabaseServicePlanZones        `json:"zones"`
}

ManagedDatabaseServicePlan represents details of a database service plan.

type ManagedDatabaseServicePlanZone

type ManagedDatabaseServicePlanZone struct {
	Name string `json:"name"`
}

ManagedDatabaseServicePlanZone represents zone where parent database plan is available

type ManagedDatabaseServicePlanZones

type ManagedDatabaseServicePlanZones []ManagedDatabaseServicePlanZone

ManagedDatabaseServicePlanZones is a helper for unmarshaling database plan zones

func (*ManagedDatabaseServicePlanZones) UnmarshalJSON

func (s *ManagedDatabaseServicePlanZones) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type ManagedDatabaseServiceProperty

type ManagedDatabaseServiceProperty struct {
	CreateOnly  bool                                      `json:"createOnly,omitempty"`
	Default     interface{}                               `json:"default,omitempty"`
	Example     interface{}                               `json:"example,omitempty"`
	MaxLength   int                                       `json:"maxLength,omitempty"`
	Maximum     *float64                                  `json:"maximum,omitempty"`
	MinLength   int                                       `json:"minLength,omitempty"`
	Minimum     *float64                                  `json:"minimum,omitempty"`
	Pattern     string                                    `json:"pattern,omitempty"`
	Type        interface{}                               `json:"type"`
	Title       string                                    `json:"title"`
	Description string                                    `json:"description,omitempty"`
	Enum        interface{}                               `json:"enum,omitempty"`
	UserError   string                                    `json:"user_error,omitempty"`
	Properties  map[string]ManagedDatabaseServiceProperty `json:"properties,omitempty"`
}

ManagedDatabaseServiceProperty contains help for database property usage and validation

type ManagedDatabaseServiceType

type ManagedDatabaseServiceType string

ManagedDatabaseServiceType represents the type of the service. It mainly refers to the underlying database engine that is exposed by the service.

const (
	// ManagedDatabaseServiceTypePostgreSQL references a PostgreSQL type of database instance
	ManagedDatabaseServiceTypePostgreSQL ManagedDatabaseServiceType = "pg"
	// ManagedDatabaseServiceTypeMySQL references a MySQL type of database instance
	ManagedDatabaseServiceTypeMySQL ManagedDatabaseServiceType = "mysql"
	// ManagedDatabaseServiceTypeRedis references a Redis type of database instance
	ManagedDatabaseServiceTypeRedis ManagedDatabaseServiceType = "redis"
	// ManagedDatabaseServiceTypeOpenSearch references an OpenSearch type of database instance
	ManagedDatabaseServiceTypeOpenSearch ManagedDatabaseServiceType = "opensearch"
)

type ManagedDatabaseServiceURIParams

type ManagedDatabaseServiceURIParams struct {
	DatabaseName string `json:"dbname"`
	Host         string `json:"host"`
	Password     string `json:"password"`
	Port         string `json:"port"`
	SSLMode      string `json:"ssl_mode"`
	User         string `json:"user"`
}

ManagedDatabaseServiceURIParams represents individual components of ServiceURI field

type ManagedDatabaseSessionMySQL

type ManagedDatabaseSessionMySQL struct {
	ApplicationName string        `json:"application_name"`
	ClientAddr      string        `json:"client_addr"`
	Datname         string        `json:"datname"`
	Id              string        `json:"id"`
	Query           string        `json:"query"`
	QueryDuration   time.Duration `json:"query_duration"`
	State           string        `json:"state"`
	Usename         string        `json:"usename"`
}

ManagedDatabaseSessionMySQL represents a session in a managed MySQL database instance.

type ManagedDatabaseSessionPostgreSQL

type ManagedDatabaseSessionPostgreSQL struct {
	ApplicationName string        `json:"application_name"`
	BackendStart    time.Time     `json:"backend_start"`
	BackendType     string        `json:"backend_type"`
	BackendXid      *int          `json:"backend_xid"`
	BackendXmin     *int          `json:"backend_xmin"`
	ClientAddr      string        `json:"client_addr"`
	ClientHostname  *string       `json:"client_hostname"`
	ClientPort      int           `json:"client_port"`
	Datid           int           `json:"datid"`
	Datname         string        `json:"datname"`
	Id              string        `json:"id"`
	Query           string        `json:"query"`
	QueryDuration   time.Duration `json:"query_duration"`
	QueryStart      time.Time     `json:"query_start"`
	State           string        `json:"state"`
	StateChange     time.Time     `json:"state_change"`
	Usename         string        `json:"usename"`
	Usesysid        int           `json:"usesysid"`
	WaitEvent       string        `json:"wait_event"`
	WaitEventType   string        `json:"wait_event_type"`
	XactStart       *time.Time    `json:"xact_start"`
}

ManagedDatabaseSessionPostgreSQL represents a session in a managed PostgreSQL database instance.

type ManagedDatabaseSessionRedis

type ManagedDatabaseSessionRedis struct {
	ActiveChannelSubscriptions                int           `json:"active_channel_subscriptions"`
	ActiveDatabase                            string        `json:"active_database"`
	ActivePatternMatchingChannelSubscriptions int           `json:"active_pattern_matching_channel_subscriptions"`
	ApplicationName                           string        `json:"application_name"`
	ClientAddr                                string        `json:"client_addr"`
	ConnectionAge                             time.Duration `json:"connection_age"`
	ConnectionIdle                            time.Duration `json:"connection_idle"`
	Flags                                     []string      `json:"flags"`
	FlagsRaw                                  string        `json:"flags_raw"`
	Id                                        string        `json:"id"`
	MultiExecCommands                         int           `json:"multi_exec_commands"`
	OutputBuffer                              int           `json:"output_buffer"`
	OutputBufferMemory                        int           `json:"output_buffer_memory"`
	OutputListLength                          int           `json:"output_list_length"`
	Query                                     string        `json:"query"`
	QueryBuffer                               int           `json:"query_buffer"`
	QueryBufferFree                           int           `json:"query_buffer_free"`
}

ManagedDatabaseSessionRedis represents a session in a managed Redis database instance.

type ManagedDatabaseSessions

type ManagedDatabaseSessions struct {
	MySQL      []ManagedDatabaseSessionMySQL      `json:"mysql,omitempty"`
	PostgreSQL []ManagedDatabaseSessionPostgreSQL `json:"pg,omitempty"`
	Redis      []ManagedDatabaseSessionRedis      `json:"redis,omitempty"`
}

ManagedDatabaseSessions represents sessions in the managed database instance by database instance type.

type ManagedDatabaseState

type ManagedDatabaseState string

ManagedDatabaseState represents a current state the service is in

const (
	// Indicates newly created service or started reconfiguration
	ManagedDatabaseStatePending ManagedDatabaseState = "pending"
	// Configuring network
	ManagedDatabaseStateSetupNetwork ManagedDatabaseState = "setup-network"
	// Check that the network configuration was applied correctly
	ManagedDatabaseStateCheckNetwork ManagedDatabaseState = "check-network"
	// Configuring SDN network peerings if provided
	ManagedDatabaseStateSetupPeer ManagedDatabaseState = "setup-peer"
	// Check SDN network peerings was established if provided
	ManagedDatabaseStateCheckPeer ManagedDatabaseState = "check-peer"
	// Service is being created or reconfigured
	ManagedDatabaseStateSetupService ManagedDatabaseState = "setup-service"
	// Service creation in progress
	ManagedDatabaseStateRebuilding ManagedDatabaseState = "rebuilding"
	// Service is being upgraded or migrated
	ManagedDatabaseStateRebalancing ManagedDatabaseState = "rebalancing"
	// Service encountered an error that requires user action
	ManagedDatabaseStateError ManagedDatabaseState = "error"
	// Indicates service up and running
	ManagedDatabaseStateRunning ManagedDatabaseState = "running"
	// Service is stopped
	ManagedDatabaseStateStopped ManagedDatabaseState = "stopped"
	// Cleaning up service resources
	ManagedDatabaseStateCleanupService ManagedDatabaseState = "cleanup-service"
	// Cleaning up network resources
	ManagedDatabaseStateCleanupNetwork ManagedDatabaseState = "cleanup-network"
	// Deleting the service
	ManagedDatabaseStateDeleteService ManagedDatabaseState = "delete-service"
)

type ManagedDatabaseType

type ManagedDatabaseType struct {
	Name                   string                                    `json:"name"`
	Description            string                                    `json:"description"`
	LatestAvailableVersion string                                    `json:"latest_available_version"`
	ServicePlans           []ManagedDatabaseServicePlan              `json:"service_plans"`
	Properties             map[string]ManagedDatabaseServiceProperty `json:"properties"`
}

ManagedDatabaseType represets details of a database service type.

type ManagedDatabaseUser

type ManagedDatabaseUser struct {
	// Authentication field represents an allowed authentication type for this user. For more information see:
	// 	upcloud.ManagedDatabaseUserAuthenticationCachingSHA2Password
	// 	upcloud.ManagedDatabaseUserAuthenticationMySQLNativePassword
	Authentication ManagedDatabaseUserAuthenticationType `json:"authentication,omitempty"`
	Type           ManagedDatabaseUserType               `json:"type,omitempty"`
	// Password field is only visible when querying an individual user. It is omitted in main service view and in
	// get all users view.
	Password                string                                      `json:"password,omitempty"`
	Username                string                                      `json:"username,omitempty"`
	PGAccessControl         *ManagedDatabaseUserPGAccessControl         `json:"pg_access_control,omitempty"`
	RedisAccessControl      *ManagedDatabaseUserRedisAccessControl      `json:"redis_access_control,omitempty"`
	OpenSearchAccessControl *ManagedDatabaseUserOpenSearchAccessControl `json:"opensearch_access_control,omitempty"`
}

ManagedDatabaseUser represents a database internal user

type ManagedDatabaseUserAuthenticationType

type ManagedDatabaseUserAuthenticationType string

ManagedDatabaseUserAuthenticationType represents the type of authentication method for an internal database user

const (
	// ManagedDatabaseUserAuthenticationCachingSHA2Password selects "caching_sha2_password" type of authentication type.
	// This type is only supported with MySQL services.
	//nolint:gosec // this is not actually a password but an authentication type
	ManagedDatabaseUserAuthenticationCachingSHA2Password ManagedDatabaseUserAuthenticationType = "caching_sha2_password"
	// ManagedDatabaseUserAuthenticationMySQLNativePassword selects "mysql_native_password" type of authentication type.
	// This type is only supported with MySQL services.
	//nolint:gosec // this is not actually a password but an authentication type
	ManagedDatabaseUserAuthenticationMySQLNativePassword ManagedDatabaseUserAuthenticationType = "mysql_native_password"
)

type ManagedDatabaseUserOpenSearchAccessControl

type ManagedDatabaseUserOpenSearchAccessControl struct {
	Rules *[]ManagedDatabaseUserOpenSearchAccessControlRule `json:"rules,omitempty"`
}

type ManagedDatabaseUserOpenSearchAccessControlRule

type ManagedDatabaseUserOpenSearchAccessControlRule struct {
	Index      string                                                   `json:"index"`
	Permission ManagedDatabaseUserOpenSearchAccessControlRulePermission `json:"permission"`
}

type ManagedDatabaseUserOpenSearchAccessControlRulePermission

type ManagedDatabaseUserOpenSearchAccessControlRulePermission string

ManagedDatabaseUserOpenSearchAccessControlRulePermission represents a permission for user access control rule in an OpenSearch Managed Database service.

const (
	// ManagedDatabaseUserOpenSearchAccessControlRulePermissionAdmin references "admin" permission
	ManagedDatabaseUserOpenSearchAccessControlRulePermissionAdmin ManagedDatabaseUserOpenSearchAccessControlRulePermission = "admin"
	// ManagedDatabaseUserOpenSearchAccessControlRulePermissionDeny references "deny" permission
	ManagedDatabaseUserOpenSearchAccessControlRulePermissionDeny ManagedDatabaseUserOpenSearchAccessControlRulePermission = "deny"
	// ManagedDatabaseUserOpenSearchAccessControlRulePermissionReadWrite references "read-write" permission
	ManagedDatabaseUserOpenSearchAccessControlRulePermissionReadWrite ManagedDatabaseUserOpenSearchAccessControlRulePermission = "readwrite"
	// ManagedDatabaseUserOpenSearchAccessControlRulePermissionRead references "read" permission
	ManagedDatabaseUserOpenSearchAccessControlRulePermissionRead ManagedDatabaseUserOpenSearchAccessControlRulePermission = "read"
	// ManagedDatabaseUserOpenSearchAccessControlRulePermissionWrite references "write" permission
	ManagedDatabaseUserOpenSearchAccessControlRulePermissionWrite ManagedDatabaseUserOpenSearchAccessControlRulePermission = "write"
)

type ManagedDatabaseUserPGAccessControl

type ManagedDatabaseUserPGAccessControl struct {
	AllowReplication *bool `json:"allow_replication,omitempty"`
}

type ManagedDatabaseUserRedisAccessControl

type ManagedDatabaseUserRedisAccessControl struct {
	Categories *[]string `json:"categories,omitempty"`
	Channels   *[]string `json:"channels,omitempty"`
	Commands   *[]string `json:"commands,omitempty"`
	Keys       *[]string `json:"keys,omitempty"`
}

type ManagedDatabaseUserType

type ManagedDatabaseUserType string

ManagedDatabaseUserType represents the type of internal database user

const (
	// ManagedDatabaseUserTypePrimary is a type of the primary user of a managed database service. There can be only
	// one primary user per service. The primary user has administrative privileges to manage logical databases and
	// users through the database's native API.
	ManagedDatabaseUserTypePrimary ManagedDatabaseUserType = "primary"
	// ManagedDatabaseUserTypeNormal is a type of normal database user of a managed database service. There can
	// be multiple normal users and the primary user can manage the privileges of these users through the database's
	// native API.
	ManagedDatabaseUserTypeNormal ManagedDatabaseUserType = "normal"
)

type ManagedObjectStorage

type ManagedObjectStorage struct {
	ConfiguredStatus ManagedObjectStorageConfiguredStatus `json:"configured_status"`
	CreatedAt        time.Time                            `json:"created_at"`
	Endpoints        []ManagedObjectStorageEndpoint       `json:"endpoints"`
	Labels           []Label                              `json:"labels"`
	Name             string                               `json:"name,omitempty"`
	Networks         []ManagedObjectStorageNetwork        `json:"networks"`
	OperationalState ManagedObjectStorageOperationalState `json:"operational_state"`
	Region           string                               `json:"region"`
	UpdatedAt        time.Time                            `json:"updated_at"`
	UUID             string                               `json:"uuid"`
}

ManagedObjectStorage represents a Managed Object Storage service

type ManagedObjectStorageBucketMetrics

type ManagedObjectStorageBucketMetrics struct {
	Name           string `json:"name"`
	TotalObjects   int    `json:"total_objects"`
	TotalSizeBytes int    `json:"total_size_bytes"`
}

ManagedObjectStorageBucketMetrics represents metrics for a Managed Object Storage service bucket

type ManagedObjectStorageConfiguredStatus

type ManagedObjectStorageConfiguredStatus string

ManagedObjectStorageConfiguredStatus indicates the service's current intended status. Managed by the customer

const (
	// ManagedObjectStorageConfiguredStatusStarted indicates that service is running
	ManagedObjectStorageConfiguredStatusStarted ManagedObjectStorageConfiguredStatus = "started"
	// ManagedObjectStorageConfiguredStatusStopped indicates that service is stopped
	ManagedObjectStorageConfiguredStatusStopped ManagedObjectStorageConfiguredStatus = "stopped"
)

type ManagedObjectStorageEndpoint

type ManagedObjectStorageEndpoint struct {
	DomainName string `json:"domain_name"`
	Type       string `json:"type"`
	IAMURL     string `json:"iam_url"`
	STSURL     string `json:"sts_url"`
}

ManagedObjectStorageEndpoint represents an endpoint for accessing the Managed Object Storage service

type ManagedObjectStorageMetrics

type ManagedObjectStorageMetrics struct {
	TotalObjects   int `json:"total_objects"`
	TotalSizeBytes int `json:"total_size_bytes"`
}

ManagedObjectStorageMetrics represents metrics for a Managed Object Storage service

type ManagedObjectStorageNetwork

type ManagedObjectStorageNetwork struct {
	Family string  `json:"family"`
	Name   string  `json:"name"`
	Type   string  `json:"type"`
	UUID   *string `json:"uuid,omitempty"`
}

ManagedObjectStorageNetwork represents a network from where object storage can be used. Private networks must reside in object storage region

type ManagedObjectStorageOperationalState

type ManagedObjectStorageOperationalState string

ManagedObjectStorageOperationalState indicates the service's current operational, effective state. Managed by the system

const (
	// ManagedObjectStorageOperationalStateDeleteDNS indicates that DNS records are being removed
	ManagedObjectStorageOperationalStateDeleteDNS ManagedObjectStorageOperationalState = "delete-dns"
	// ManagedObjectStorageOperationalStateDeleteNetwork indicates that network is being reconfigured
	ManagedObjectStorageOperationalStateDeleteNetwork ManagedObjectStorageOperationalState = "delete-network"
	// ManagedObjectStorageOperationalStateDeleteService indicates that service is being deleted
	ManagedObjectStorageOperationalStateDeleteService ManagedObjectStorageOperationalState = "delete-service"
	// ManagedObjectStorageOperationalStatePending indicates newly created service or that started reconfiguration
	ManagedObjectStorageOperationalStatePending ManagedObjectStorageOperationalState = "started"
	// ManagedObjectStorageOperationalStateRunning indicates that service is up and running
	ManagedObjectStorageOperationalStateRunning ManagedObjectStorageOperationalState = "running"
	// ManagedObjectStorageOperationalStateSetupCheckup indicates that service configuration and state are being verified
	ManagedObjectStorageOperationalStateSetupCheckup ManagedObjectStorageOperationalState = "setup-checkup"
	// ManagedObjectStorageOperationalStateSetupDNS indicates that DNS records are being updated
	ManagedObjectStorageOperationalStateSetupDNS ManagedObjectStorageOperationalState = "setup-dns"
	// ManagedObjectStorageOperationalStateSetupNetwork indicates that network is being configured
	ManagedObjectStorageOperationalStateSetupNetwork ManagedObjectStorageOperationalState = "setup-network"
	// ManagedObjectStorageOperationalStateSetupService indicates that service is being configured
	ManagedObjectStorageOperationalStateSetupService ManagedObjectStorageOperationalState = "setup-service"
	// ManagedObjectStorageOperationalStateStopped indicates that service is down
	ManagedObjectStorageOperationalStateStopped ManagedObjectStorageOperationalState = "stopped"
)

type ManagedObjectStoragePolicy

type ManagedObjectStoragePolicy struct {
	ARN              string    `json:"arn"`
	AttachmentCount  int       `json:"attachment_count"`
	CreatedAt        time.Time `json:"created_at"`
	DefaultVersionID string    `json:"default_version_id"`
	Description      string    `json:"description"`
	Document         string    `json:"document"`
	Name             string    `json:"name"`
	System           bool      `json:"system"`
	UpdatedAt        time.Time `json:"updated_at"`
}

ManagedObjectStoragePolicy represents a policy for the Managed Object Storage service

type ManagedObjectStorageRegion

type ManagedObjectStorageRegion struct {
	Name        string                           `json:"name"`
	PrimaryZone string                           `json:"primary_zone"`
	Zones       []ManagedObjectStorageRegionZone `json:"zones"`
}

ManagedObjectStorageRegion represents a region where Managed Object Storage service can be hosted

type ManagedObjectStorageRegionZone

type ManagedObjectStorageRegionZone struct {
	Name string `json:"name"`
}

ManagedObjectStorageRegionZone represents a zone within the Managed Object Storage service region

type ManagedObjectStorageUser

type ManagedObjectStorageUser struct {
	AccessKeys []ManagedObjectStorageUserAccessKey `json:"access_keys"`
	ARN        string                              `json:"arn"`
	CreatedAt  time.Time                           `json:"created_at"`
	Policies   []ManagedObjectStoragePolicy        `json:"policies"`
	Username   string                              `json:"username"`
}

ManagedObjectStorageUser represents a user for the Managed Object Storage service

type ManagedObjectStorageUserAccessKey

type ManagedObjectStorageUserAccessKey struct {
	AccessKeyID     string                                  `json:"access_key_id"`
	CreatedAt       time.Time                               `json:"created_at"`
	LastUsedAt      time.Time                               `json:"last_used_at"`
	SecretAccessKey *string                                 `json:"secret_access_key,omitempty"`
	Status          ManagedObjectStorageUserAccessKeyStatus `json:"status"`
}

ManagedObjectStorageUserAccessKey represents Access Key details for a Managed Object Storage service user

type ManagedObjectStorageUserAccessKeyStatus

type ManagedObjectStorageUserAccessKeyStatus string

ManagedObjectStorageUserAccessKeyStatus indicates the access key's current status. Managed by the customer

const (
	// ManagedObjectStorageUserAccessKeyStatusActive indicates an active access key
	ManagedObjectStorageUserAccessKeyStatusActive ManagedObjectStorageUserAccessKeyStatus = "Active"
	// ManagedObjectStorageUserAccessKeyStatusInactive indicates an inactive access key
	ManagedObjectStorageUserAccessKeyStatusInactive ManagedObjectStorageUserAccessKeyStatus = "Inactive"
)

type ManagedObjectStorageUserPolicy

type ManagedObjectStorageUserPolicy struct {
	ARN  string `json:"arn"`
	Name string `json:"name"`
}

ManagedObjectStorageUserPolicy represents a policy attached to a Managed Object Storage user

type Network

type Network struct {
	IPNetworks IPNetworkSlice     `json:"ip_networks"`
	Name       string             `json:"name"`
	Type       string             `json:"type"`
	UUID       string             `json:"uuid"`
	Zone       string             `json:"zone"`
	Router     string             `json:"router"`
	Servers    NetworkServerSlice `json:"servers"`
	Labels     []Label            `json:"labels"`
}

Network represents a network in a networking response.

func (*Network) UnmarshalJSON

func (s *Network) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type NetworkPeering

type NetworkPeering struct {
	UUID             string                         `json:"uuid,omitempty"`
	ConfiguredStatus NetworkPeeringConfiguredStatus `json:"configured_status,omitempty"`
	Name             string                         `json:"name,omitempty"`
	Network          NetworkPeeringNetwork          `json:"network,omitempty"`
	PeerNetwork      NetworkPeeringNetwork          `json:"peer_network,omitempty"`
	State            NetworkPeeringState            `json:"state,omitempty"`
	Labels           []Label                        `json:"labels,omitempty"`
}

func (*NetworkPeering) UnmarshalJSON

func (n *NetworkPeering) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type NetworkPeeringConfiguredStatus

type NetworkPeeringConfiguredStatus string

NetworkPeeringConfiguredStatus is configured network peering status set by user.

type NetworkPeeringIPNetwork

type NetworkPeeringIPNetwork struct {
	Address string                        `json:"address,omitempty"`
	Family  NetworkPeeringIPNetworkFamily `json:"family,omitempty"`
}

type NetworkPeeringIPNetworkFamily

type NetworkPeeringIPNetworkFamily string

type NetworkPeeringNetwork

type NetworkPeeringNetwork struct {
	UUID       string `json:"uuid,omitempty"`
	IPNetworks []NetworkPeeringIPNetwork
}

func (*NetworkPeeringNetwork) UnmarshalJSON

func (n *NetworkPeeringNetwork) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type NetworkPeeringState

type NetworkPeeringState string

NetworkPeeringState is current state of network peering reported by backend.

type NetworkPeerings

type NetworkPeerings []NetworkPeering

func (*NetworkPeerings) UnmarshalJSON

func (n *NetworkPeerings) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type NetworkServer

type NetworkServer struct {
	ServerUUID  string `json:"uuid"`
	ServerTitle string `json:"title"`
}

NetworkServer represents a server in a networking response

type NetworkServerSlice

type NetworkServerSlice []NetworkServer

NetworkServerSlice is a slice of NetworkServers. It exists to allow for a custom JSON unmarshaller.

func (*NetworkServerSlice) UnmarshalJSON

func (t *NetworkServerSlice) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type NetworkSlice

type NetworkSlice []Network

NetworkSlice is a slice of Networks. It exists to allow for a custom JSON unmarshaller.

func (*NetworkSlice) UnmarshalJSON

func (t *NetworkSlice) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Networking

type Networking struct {
	Interfaces ServerInterfaceSlice `json:"interfaces"`
}

Networking represents networking in a response

func (*Networking) UnmarshalJSON

func (s *Networking) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Networks

type Networks struct {
	Networks []Network `json:"networks"`
}

Networks represents multiple networks in a GetNetworks and GetNetworksInZone response.

func (*Networks) UnmarshalJSON

func (n *Networks) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type ObjectStorage

type ObjectStorage struct {
	Created     string `json:"created"`
	Description string `json:"description"`
	Name        string `json:"name"`
	Size        int    `json:"size"`
	State       string `json:"state"`
	URL         string `json:"url"`
	UUID        string `json:"uuid"`
	Zone        string `json:"zone"`
}

ObjectStorage represents a Object Storage

type ObjectStorageDetails

type ObjectStorageDetails struct {
	ObjectStorage
	UsedSpace int `json:"used_space"`
}

ObjectStorageDetails represents details about a Object Storage

func (*ObjectStorageDetails) UnmarshalJSON

func (o *ObjectStorageDetails) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type ObjectStorages

type ObjectStorages struct {
	ObjectStorages []ObjectStorage `json:"object_storages"`
}

ObjectStorages represent a /object-storage response

func (*ObjectStorages) UnmarshalJSON

func (o *ObjectStorages) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Permission

type Permission struct {
	TargetIdentifier string             `json:"target_identifier,omitempty"`
	TargetType       PermissionTarget   `json:"target_type,omitempty"`
	User             string             `json:"user,omitempty"`
	Options          *PermissionOptions `json:"options,omitempty"`
}

type PermissionOptions

type PermissionOptions struct {
	Storage Boolean `json:"storage,omitempty"`
}

type PermissionTarget

type PermissionTarget string
const (
	PermissionTargetServer              PermissionTarget = "server"
	PermissionTargetStorage             PermissionTarget = "storage"
	PermissionTargetNetwork             PermissionTarget = "network"
	PermissionTargetRouter              PermissionTarget = "router"
	PermissionTargetObjectStorage       PermissionTarget = "object_storage"
	PermissionTargetManagedDatabase     PermissionTarget = "managed_database"
	PermissionTargetManagedLoadbalancer PermissionTarget = "managed_loadbalancer"
	PermissionTargetTagAccess           PermissionTarget = "tag_access"
)

type Permissions

type Permissions []Permission

func (*Permissions) UnmarshalJSON

func (p *Permissions) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Plan

type Plan struct {
	CoreNumber       int    `json:"core_number"`
	MemoryAmount     int    `json:"memory_amount"`
	Name             string `json:"name"`
	PublicTrafficOut int    `json:"public_traffic_out"`
	StorageSize      int    `json:"storage_size"`
	StorageTier      string `json:"storage_tier"`
}

Plan represents a pre-configured server configuration plan

type Plans

type Plans struct {
	Plans []Plan `json:"plans"`
}

Plans represents a /plan response

func (*Plans) UnmarshalJSON

func (s *Plans) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Price

type Price struct {
	Amount int     `json:"amount"`
	Price  float64 `json:"price"`
}

Price represents a price

type PriceZone

type PriceZone struct {
	Name string `json:"name"`

	Firewall               *Price `json:"firewall"`
	IORequestBackup        *Price `json:"io_request_backup"`
	IORequestMaxIOPS       *Price `json:"io_request_maxiops"`
	IPv4Address            *Price `json:"ipv4_address"`
	IPv6Address            *Price `json:"ipv6_address"`
	PublicIPv4BandwidthIn  *Price `json:"public_ipv4_bandwidth_in"`
	PublicIPv4BandwidthOut *Price `json:"public_ipv4_bandwidth_out"`
	PublicIPv6BandwidthIn  *Price `json:"public_ipv6_bandwidth_in"`
	PublicIPv6BandwidthOut *Price `json:"public_ipv6_bandwidth_out"`
	ServerCore             *Price `json:"server_core"`
	ServerMemory           *Price `json:"server_memory"`
	ServerPlan1xCPU1GB     *Price `json:"server_plan_1xCPU-1GB"`
	ServerPlan2xCPU2GB     *Price `json:"server_plan_1xCPU-2GB"`
	ServerPlan4xCPU4GB     *Price `json:"server_plan_4xCPU-4GB"`
	ServerPlan6xCPU8GB     *Price `json:"server_plan_6xCPU-8GB"`
	StorageBackup          *Price `json:"storage_backup"`
	StorageMaxIOPS         *Price `json:"storage_maxiops"`
	StorageTemplate        *Price `json:"storage_template"`
}

PriceZone represents a price zone. A prize zone consists of multiple items that each have a price.

type PriceZones

type PriceZones struct {
	PriceZones []PriceZone `json:"prices"`
}

PriceZones represents a /price response

func (*PriceZones) UnmarshalJSON

func (s *PriceZones) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Problem

type Problem struct {
	// Type is the URI to a page describing the problem
	Type string `json:"type"`
	// Title is the human-readable description if the problem
	Title string `json:"title"`
	// InvalidParams if set, is a list of ProblemInvalidParam describing a specific part(s) of the request
	// that caused the problem
	InvalidParams []ProblemInvalidParam `json:"invalid_params,omitempty"`
	// CorrelationID is a unique string that identifies the request that caused the problem
	// Please note that it is not always available
	CorrelationID string `json:"correlation_id,omitempty"`
	// HTTP Status code
	Status int `json:"status"`
}

Problem is the type conforming to RFC7807 that represents an error or a problem associated with an HTTP request.

func (*Problem) Error

func (p *Problem) Error() string

func (*Problem) ErrorCode

func (p *Problem) ErrorCode() string

ErrorCode returns a short string that identifies the error; it should be used for programmatic comparisons

type ProblemInvalidParam

type ProblemInvalidParam struct {
	Name   string `json:"name"`
	Reason string `json:"reason"`
}

ProblemInvalidParam is a type describing extra information in the Problem type's InvalidParams field.

type ResizeStorageFilesystemBackup

type ResizeStorageFilesystemBackup struct {
	Access  string          `json:"access"`
	Created time.Time       `json:"created"`
	License float64         `json:"license"`
	Origin  string          `json:"origin"`
	Servers ServerUUIDSlice `json:"servers"`
	Size    int             `json:"size"`
	State   string          `json:"state"`
	Title   string          `json:"title"`
	Type    string          `json:"type"`
	UUID    string          `json:"uuid"`
	Zone    string          `json:"zone"`
}

ResizeStorageFilesystemBackup represents the backup details taken before an resize operation.

func (*ResizeStorageFilesystemBackup) UnmarshalJSON

func (s *ResizeStorageFilesystemBackup) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type ResourceLimits

type ResourceLimits struct {
	Cores                 int `json:"cores,omitempty"`
	DetachedFloatingIps   int `json:"detached_floating_ips,omitempty"`
	ManagedObjectStorages int `json:"managed_object_storages,omitempty"`
	Memory                int `json:"memory,omitempty"`
	NetworkPeerings       int `json:"network_peerings,omitempty"`
	Networks              int `json:"networks,omitempty"`
	NTPExcessGiB          int `json:"ntp_excess_gib,omitempty"`
	PublicIPv4            int `json:"public_ipv4,omitempty"`
	PublicIPv6            int `json:"public_ipv6,omitempty"`
	StorageHDD            int `json:"storage_hdd,omitempty"`
	StorageMaxIOPS        int `json:"storage_maxiops,omitempty"`
	StorageSSD            int `json:"storage_ssd,omitempty"`
	LoadBalancers         int `json:"load_balancers,omitempty"`
}

ResourceLimits represents an account's resource limits

type Router

type Router struct {
	AttachedNetworks RouterNetworkSlice `json:"attached_networks"`
	Name             string             `json:"name"`
	Type             string             `json:"type"`
	UUID             string             `json:"uuid"`
	Labels           []Label            `json:"labels"`
	StaticRoutes     []StaticRoute      `json:"static_routes"`
}

Router represents a Router in a response

func (*Router) UnmarshalJSON

func (s *Router) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type RouterNetwork

type RouterNetwork struct {
	NetworkUUID string `json:"uuid"`
}

RouterNetwork represents the networks in a router response.

type RouterNetworkSlice

type RouterNetworkSlice []RouterNetwork

RouterNetworkSlice is a slice of RouterNetworks. It exists to allow for a custom unmarshaller.

func (*RouterNetworkSlice) UnmarshalJSON

func (t *RouterNetworkSlice) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Routers

type Routers struct {
	Routers []Router `json:"routers"`
}

Routers represents a response to a GetRouters request

func (*Routers) UnmarshalJSON

func (n *Routers) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Server

type Server struct {
	CoreNumber   int            `json:"core_number,string"`
	Hostname     string         `json:"hostname"`
	License      float64        `json:"license"`
	MemoryAmount int            `json:"memory_amount,string"`
	Plan         string         `json:"plan"`
	Progress     int            `json:"progress,string"`
	State        string         `json:"state"`
	Tags         ServerTagSlice `json:"tags"`
	Title        string         `json:"title"`
	UUID         string         `json:"uuid"`
	Zone         string         `json:"zone"`
}

Server represents a server

type ServerAntiAffinityStatus

type ServerAntiAffinityStatus string

ServerAntiAffinityStatus represents the current status of anti affinity setting for a single server. Can be "met" or "unmet"

const (
	ServerAntiAffinityStatusMet   ServerAntiAffinityStatus = "met"
	ServerAntiAffinityStatusUnmet ServerAntiAffinityStatus = "unmet"
)

type ServerConfiguration

type ServerConfiguration struct {
	CoreNumber   int `json:"core_number,string"`
	MemoryAmount int `json:"memory_amount,string"`
}

ServerConfiguration represents a server configuration

type ServerConfigurations

type ServerConfigurations struct {
	ServerConfigurations []ServerConfiguration `json:"server_sizes"`
}

ServerConfigurations represents a /server_size response

func (*ServerConfigurations) UnmarshalJSON

func (s *ServerConfigurations) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type ServerDetails

type ServerDetails struct {
	Server

	BootOrder string `json:"boot_order"`
	// TODO: Convert to boolean
	Firewall             string                   `json:"firewall"`
	Host                 int                      `json:"host"`
	IPAddresses          IPAddressSlice           `json:"ip_addresses"`
	Labels               LabelSlice               `json:"labels"`
	Metadata             Boolean                  `json:"metadata"`
	NICModel             string                   `json:"nic_model"`
	Networking           ServerNetworking         `json:"networking"`
	ServerGroup          string                   `json:"server_group"`
	SimpleBackup         string                   `json:"simple_backup"`
	StorageDevices       ServerStorageDeviceSlice `json:"storage_devices"`
	Timezone             string                   `json:"timezone"`
	VideoModel           string                   `json:"video_model"`
	RemoteAccessEnabled  Boolean                  `json:"remote_access_enabled"`
	RemoteAccessType     string                   `json:"remote_access_type"`
	RemoteAccessHost     string                   `json:"remote_access_host"`
	RemoteAccessPassword string                   `json:"remote_access_password"`
	RemoteAccessPort     int                      `json:"remote_access_port,string"`
}

ServerDetails represents details about a server

func (*ServerDetails) StorageDevice

func (s *ServerDetails) StorageDevice(storageUUID string) *ServerStorageDevice

func (*ServerDetails) UnmarshalJSON

func (s *ServerDetails) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type ServerGroup

type ServerGroup struct {
	Labels             LabelSlice                            `json:"labels,omitempty"`
	Members            ServerUUIDSlice                       `json:"servers,omitempty"`
	Title              string                                `json:"title,omitempty"`
	UUID               string                                `json:"uuid,omitempty"`
	AntiAffinityPolicy ServerGroupAntiAffinityPolicy         `json:"anti_affinity,omitempty"`
	AntiAffinityStatus []ServerGroupMemberAntiAffinityStatus `json:"anti_affinity_status,omitempty"`
}

ServerGroup represents server group

func (*ServerGroup) UnmarshalJSON

func (s *ServerGroup) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type ServerGroupAntiAffinityPolicy

type ServerGroupAntiAffinityPolicy string

ServerGroupAntiAffinityPolicy represents the anti affinity setting for a server groups. Can be "strict", "yes" or "no"

const (
	// ServerGroupAntiAffinityPolicyStrict doesn't allow servers in the same server group to be on the same host
	ServerGroupAntiAffinityPolicyStrict ServerGroupAntiAffinityPolicy = "strict"
	// ServerGroupAntiAffinityPolicyBestEffort tries to put servers on different hosts, but this is not guaranteed
	ServerGroupAntiAffinityPolicyBestEffort ServerGroupAntiAffinityPolicy = "yes"
	// ServerGroupAntiAffinityPolicyOff doesn't affect server host affinity i.e. the feature is turned off
	ServerGroupAntiAffinityPolicyOff ServerGroupAntiAffinityPolicy = "no"
)

type ServerGroupMemberAntiAffinityStatus

type ServerGroupMemberAntiAffinityStatus struct {
	ServerUUID string                   `json:"uuid"`
	Status     ServerAntiAffinityStatus `json:"status"`
}

ServerGroupMemberAntiAffinityStatus represents all the data related to an anti affinity status for a single member within the server group

type ServerGroups

type ServerGroups []ServerGroup

ServerGroups represents list of server groups

func (*ServerGroups) UnmarshalJSON

func (s *ServerGroups) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type ServerInterface

type ServerInterface Interface

ServerInterface represent a network interface on the server

type ServerInterfaceSlice

type ServerInterfaceSlice []ServerInterface

ServerInterfaceSlice is a slice of ServerInterfaces. It exists to allow for a custom JSON unmarshaller.

func (*ServerInterfaceSlice) UnmarshalJSON

func (s *ServerInterfaceSlice) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type ServerNetworking

type ServerNetworking Networking

ServerNetworking represents the networking on a server response. It is castable to a Networking struct.

type ServerStorageDevice

type ServerStorageDevice struct {
	Address   string  `json:"address"`
	Encrypted Boolean `json:"storage_encrypted"`
	// TODO: Convert to boolean
	PartOfPlan string `json:"part_of_plan"`
	UUID       string `json:"storage"`
	Size       int    `json:"storage_size"`
	Tier       string `json:"storage_tier"`
	Title      string `json:"storage_title"`
	Type       string `json:"type"`
	BootDisk   int    `json:"boot_disk,string"`
}

ServerStorageDevice represents a storage device in the context of server requests or server details

type ServerStorageDeviceSlice

type ServerStorageDeviceSlice []ServerStorageDevice

ServerStorageDeviceSlice is a slice of ServerStorageDevices. It exists to allow for a custom JSON unmarshaller.

func (*ServerStorageDeviceSlice) UnmarshalJSON

func (s *ServerStorageDeviceSlice) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type ServerTagSlice

type ServerTagSlice []string

ServerTagSlice is a slice of string. It exists to allow for a custom JSON unmarshaller.

func (*ServerTagSlice) UnmarshalJSON

func (t *ServerTagSlice) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type ServerUUIDSlice

type ServerUUIDSlice []string

ServerUUIDSlice is a slice of string. It exists to allow for a custom JSON unmarshaller.

func (*ServerUUIDSlice) MarshalJSON

func (s *ServerUUIDSlice) MarshalJSON() ([]byte, error)

MarshalJSON is a custom marshaller that deals with deeply embedded values.

func (*ServerUUIDSlice) UnmarshalJSON

func (s *ServerUUIDSlice) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Servers

type Servers struct {
	Servers []Server `json:"servers"`
}

Servers represents a /server response

func (*Servers) UnmarshalJSON

func (s *Servers) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Stat

type Stat struct {
	Name      string    `json:"name"`
	Timestamp time.Time `json:"timestamp"`
	Value     float64   `json:"value"`
}

Stat represents Host stats in a response

type StatSlice

type StatSlice []Stat

StatSlice is a slice of Stat structs This exsits to support a custom unmarshaller

func (*StatSlice) UnmarshalJSON

func (t *StatSlice) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type StaticRoute

type StaticRoute struct {
	Name    string `json:"name,omitempty"`
	Route   string `json:"route"`
	Nexthop string `json:"nexthop"`
}

StaticRoute represents a Static route

type Storage

type Storage struct {
	Access    string  `json:"access"`
	Encrypted Boolean `json:"encrypted"`
	License   float64 `json:"license"`
	// TODO: Convert to boolean
	PartOfPlan string `json:"part_of_plan"`
	Size       int    `json:"size"`
	State      string `json:"state"`
	Tier       string `json:"tier"`
	Title      string `json:"title"`
	Type       string `json:"type"`
	UUID       string `json:"uuid"`
	Zone       string `json:"zone"`
	// Only for type "backup":
	Origin  string    `json:"origin"`
	Created time.Time `json:"created"`
	Labels  []Label   `json:"labels,omitempty"`
}

Storage represents a storage device

type StorageDetails

type StorageDetails struct {
	Storage

	BackupRule  *BackupRule     `json:"backup_rule"`
	BackupUUIDs BackupUUIDSlice `json:"backups"`
	ServerUUIDs ServerUUIDSlice `json:"servers"`
}

StorageDetails represents detailed information about a piece of storage

func (*StorageDetails) UnmarshalJSON

func (s *StorageDetails) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type StorageEncryption added in v8.5.0

type StorageEncryption string

StorageEncryption is storage encryption strategy enum type.

type StorageImportDetails

type StorageImportDetails struct {
	ClientContentLength int       `json:"client_content_length"`
	ClientContentType   string    `json:"client_content_type"`
	Completed           time.Time `json:"completed"`
	Created             time.Time `json:"created"`
	DirectUploadURL     string    `json:"direct_upload_url"`
	ErrorCode           string    `json:"error_code"`
	ErrorMessage        string    `json:"error_message"`
	MD5Sum              string    `json:"md5sum"`
	ReadBytes           int       `json:"read_bytes"`
	SHA256Sum           string    `json:"sha256sum"`
	Source              string    `json:"source"`
	SourceLocation      string    `json:"source_location"`
	State               string    `json:"state"`
	UUID                string    `json:"uuid"`
	WrittenBytes        int       `json:"written_bytes"`
}

StorageImportDetails represents the details of an ongoing or completed storage import operation.

func (*StorageImportDetails) UnmarshalJSON

func (s *StorageImportDetails) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type StorageTier added in v8.5.0

type StorageTier string

StorageTier is storage tier enum type.

type Storages

type Storages struct {
	Storages []Storage `json:"storages"`
}

Storages represents a /storage response

func (*Storages) UnmarshalJSON

func (s *Storages) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Tag

type Tag struct {
	Name        string         `json:"name"`
	Description string         `json:"description,omitempty"`
	Servers     TagServerSlice `json:"servers"`
}

Tag represents a server tag

func (*Tag) UnmarshalJSON

func (s *Tag) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type TagServerSlice

type TagServerSlice []string

TagServerSlice is a slice of string. It exists to allow for a custom JSON unmarshaller.

func (TagServerSlice) MarshalJSON

func (t TagServerSlice) MarshalJSON() ([]byte, error)

MarshalJSON is a custom marshaller that deals with deeply embedded values.

func (*TagServerSlice) UnmarshalJSON

func (t *TagServerSlice) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Tags

type Tags struct {
	Tags []Tag
}

Tags represents a list of tags

func (*Tags) UnmarshalJSON

func (s *Tags) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type TimeZones

type TimeZones struct {
	TimeZones []string `json:"timezone"`
}

TimeZones represents a list of timezones

func (*TimeZones) UnmarshalJSON

func (s *TimeZones) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

type Zone

type Zone struct {
	ID          string  `json:"id"`
	Description string  `json:"description"`
	Public      Boolean `json:"public"`
	ParentZone  string  `json:"parent_zone,omitempty"`
}

Zone represents a zone

type Zones

type Zones struct {
	Zones []Zone `json:"zone"`
}

Zones represents a /zone response

func (*Zones) UnmarshalJSON

func (s *Zones) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL