Documentation
¶
Index ¶
- Constants
- type Account
- type BackupRule
- type BackupUUIDSlice
- type Boolean
- type Error
- type FirewallRule
- type FirewallRules
- type Host
- type Hosts
- type IPAddress
- type IPAddressSlice
- type IPAddresses
- type IPNetwork
- type IPNetworkSlice
- type Interface
- type ManagedDatabase
- type ManagedDatabaseBackup
- type ManagedDatabaseComponent
- type ManagedDatabaseComponentRoute
- type ManagedDatabaseComponentUsage
- type ManagedDatabaseConnection
- type ManagedDatabaseLogEntry
- type ManagedDatabaseLogOrder
- type ManagedDatabaseLogicalDatabase
- type ManagedDatabaseLogs
- type ManagedDatabaseMaintenanceTime
- type ManagedDatabaseMetricPeriod
- type ManagedDatabaseMetrics
- type ManagedDatabaseMetricsChartFloat64
- type ManagedDatabaseMetricsChartHeader
- type ManagedDatabaseMetricsChartInt
- type ManagedDatabaseMetricsColumn
- type ManagedDatabaseNodeRole
- type ManagedDatabaseNodeState
- type ManagedDatabaseProperties
- func (m *ManagedDatabaseProperties) Get(name ManagedDatabasePropertyKey) interface{}
- func (m *ManagedDatabaseProperties) GetAutoUtilityIPFilter() bool
- func (m *ManagedDatabaseProperties) GetBool(name ManagedDatabasePropertyKey) (bool, error)
- func (m *ManagedDatabaseProperties) GetIPFilter() []string
- func (m *ManagedDatabaseProperties) GetInt(name ManagedDatabasePropertyKey) (int, error)
- func (m *ManagedDatabaseProperties) GetPublicAccess() bool
- func (m *ManagedDatabaseProperties) GetString(name ManagedDatabasePropertyKey) (string, error)
- func (m *ManagedDatabaseProperties) GetStringSlice(name ManagedDatabasePropertyKey) ([]string, error)
- type ManagedDatabasePropertyKey
- type ManagedDatabaseQueryStatisticsMySQL
- type ManagedDatabaseQueryStatisticsPostgreSQL
- type ManagedDatabaseServiceType
- type ManagedDatabaseServiceURIParams
- type ManagedDatabaseState
- type ManagedDatabaseUser
- type ManagedDatabaseUserAuthenticationType
- type ManagedDatabaseUserType
- type Network
- type NetworkServer
- type NetworkServerSlice
- type NetworkSlice
- type Networking
- type Networks
- type ObjectStorage
- type ObjectStorageDetails
- type ObjectStorages
- type Plan
- type Plans
- type Price
- type PriceZone
- type PriceZones
- type ResourceLimits
- type Router
- type RouterNetwork
- type RouterNetworkSlice
- type Routers
- type Server
- type ServerConfiguration
- type ServerConfigurations
- type ServerDetails
- type ServerInterface
- type ServerInterfaceSlice
- type ServerNetworking
- type ServerStorageDevice
- type ServerStorageDeviceSlice
- type ServerTagSlice
- type ServerUUIDSlice
- type Servers
- type Stat
- type StatSlice
- type Storage
- type StorageDetails
- type StorageImportDetails
- type Storages
- type Tag
- type TagServerSlice
- type Tags
- type TimeZones
- type Zone
- type Zones
Constants ¶
const ( FirewallRuleActionAccept = "accept" FirewallRuleActionReject = "reject" FirewallRuleActionDrop = "drop" FirewallRuleDirectionIn = "in" FirewallRuleDirectionOut = "out" FirewallRuleProtocolTCP = "tcp" FirewallRuleProtocolUDP = "udp" FirewallRuleProtocolICMP = "icmp" )
Constants
const ( IPAddressFamilyIPv4 = "IPv4" IPAddressFamilyIPv6 = "IPv6" IPAddressAccessPrivate = "private" IPAddressAccessPublic = "public" IPAddressAccessUtility = "utility" )
Constants
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" )
const ( NetworkTypePrivate = "private" NetworkTypePublic = "public" NetworkTypeUtility = "utility" )
Constants
const ( ServerStateStarted = "started" ServerStateStopped = "stopped" ServerStateMaintenance = "maintenance" ServerStateError = "error" VideoModelVGA = "vga" VideoModelCirrus = "cirrus" StopTypeSoft = "soft" StopTypeHard = "hard" RemoteAccessTypeVNC = "vnc" RemoteAccessTypeSPICE = "spice" )
Constants
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" )
Constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 ¶
UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.
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.
func (*Boolean) MarshalJSON ¶
MarshalJSON is a custom unmarshaller that deals with deeply embedded values.
func (*Boolean) UnmarshalJSON ¶
UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.
type Error ¶
type Error struct {
ErrorCode string `json:"error_code"`
ErrorMessage string `json:"error_message"`
}
Error represents an error
func (*Error) UnmarshalJSON ¶
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"`
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 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 ¶
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 ¶
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 ¶
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"`
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 ¶
UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.
type ManagedDatabase ¶
type ManagedDatabase struct {
Backups []ManagedDatabaseBackup `json:"backups"`
Components []ManagedDatabaseComponent `json:"components"`
CreateTime time.Time `json:"create_time"`
Maintenance ManagedDatabaseMaintenanceTime `json:"maintenance"`
Name string `json:"name"`
NodeCount int `json:"node_count"`
NodeStates []ManagedDatabaseNodeState `json:"node_states"`
Plan string `json:"plan"`
Powered bool `json:"powered"`
Properties ManagedDatabaseProperties `json:"properties"`
State ManagedDatabaseState `json:"state"`
Title string `json:"title"`
Type ManagedDatabaseServiceType `json:"type"`
UpdateTime time.Time `json:"update_time"`
ServiceURI string `json:"service_uri"`
ServiceURIParams ManagedDatabaseServiceURIParams `json:"service_uri_params"`
Users []ManagedDatabaseUser `json:"users"`
UUID string `json:"uuid"`
Zone string `json:"zone"`
}
ManagedDatabase represents an existing managed database instance
type ManagedDatabaseBackup ¶
type ManagedDatabaseBackup struct {
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 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 ManagedDatabaseConnection ¶
type ManagedDatabaseConnection struct {
ApplicationName string `json:"application_name"`
BackendStart time.Time `json:"backend_start"`
BackendType string `json:"backend_type"`
BackendXid string `json:"backend_xid"`
BackendXmin string `json:"backend_xmin"`
ClientAddr string `json:"client_addr"`
ClientHostname string `json:"client_hostname"`
ClientPort int `json:"client_port"`
DatId int `json:"dat_id"`
DatName string `json:"dat_name"`
Pid int `json:"pid"`
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"`
Username string `json:"usename"`
UseSysId int `json:"usesysid"`
WaitEvent string `json:"wait_event"`
WaintEventType string `json:"waint_event_type"`
XactStart time.Time `json:"xact_start"`
}
ManagedDatabaseConnection represents a connection to the managed database instance. The available fields vary between database types.
type ManagedDatabaseLogEntry ¶
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 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 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"`
// 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 ¶
func (m *ManagedDatabaseProperties) GetBool(name ManagedDatabasePropertyKey) (bool, error)
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 ¶
func (m *ManagedDatabaseProperties) GetInt(name ManagedDatabasePropertyKey) (int, error)
GetInt returns an integer property value. The underlying map is initialised if it's nil.
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 ¶
func (m *ManagedDatabaseProperties) GetString(name ManagedDatabasePropertyKey) (string, error)
GetString returns a string property value. The underlying map is initialised if it's nil.
func (*ManagedDatabaseProperties) GetStringSlice ¶
func (m *ManagedDatabaseProperties) GetStringSlice(name ManagedDatabasePropertyKey) ([]string, error)
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" // 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"`
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 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" )
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 ManagedDatabaseState ¶
type ManagedDatabaseState string
ManagedDatabaseState represents a current state the service is in
const ( // ManagedDatabaseStateRunning represents a managed database instance in running state ManagedDatabaseStateRunning ManagedDatabaseState = "running" // ManagedDatabaseStatePoweroff represents a managed database instance in powered off state ManagedDatabaseStatePoweroff ManagedDatabaseState = "poweroff" )
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"`
// 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"`
}
ManagedDatabaseUser represents a database internal user
type ManagedDatabaseUserAuthenticationType ¶
type ManagedDatabaseUserAuthenticationType string
ManagedDatabaseUserAuthenticationType represents the type of an 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 ManagedDatabaseUserType ¶
type ManagedDatabaseUserType string
ManagedDatabaseUserType represents the type of an 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 thru the database's native API. ManagedDatabaseUserTypePrimary ManagedDatabaseUserType = "primary" // ManagedDatabaseUserTypeNormal is a type of a 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 thru the database's // native API. ManagedDatabaseUserTypeNormal ManagedDatabaseUserType = "normal" )
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"`
}
Network represents a network in a networking response.
func (*Network) UnmarshalJSON ¶
UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.
type NetworkServer ¶
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 ¶
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 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 ¶
UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.
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 ResourceLimits ¶
type ResourceLimits struct {
Cores int `json:"cores,omitempty"`
DetachedFloatingIps int `json:"detached_floating_ips,omitempty"`
Memory int `json:"memory,omitempty"`
Networks int `json:"networks,omitempty"`
PublicIPv4 int `json:"public_ipv4,omitempty"`
PublicIPv6 int `json:"public_ipv6,omitempty"`
StorageHDD int `json:"storage_hdd,omitempty"`
StorageSSD int `json:"storage_ssd,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"`
}
Router represents a Router in a response
func (*Router) UnmarshalJSON ¶
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 ¶
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 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"`
Metadata Boolean `json:"metadata"`
NICModel string `json:"nic_model"`
Networking ServerNetworking `json:"networking"`
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 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"`
// 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) 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 ¶
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 ¶
UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.
type Storage ¶
type Storage struct {
Access string `json:"access"`
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"`
}
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 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 storge import operation.
func (*StorageImportDetails) UnmarshalJSON ¶
func (s *StorageImportDetails) UnmarshalJSON(b []byte) error
UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.
type Storages ¶
type Storages struct {
Storages []Storage `json:"storages"`
}
Storages represents a /storage response
func (*Storages) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.