Documentation ¶
Index ¶
- Constants
- Variables
- type DNSBackend
- type DNSClient
- func (c *DNSClient) Create(params *DNSRecordParams) (*DNSRecord, error)
- func (c *DNSClient) Delete(params *DNSRecordParams) (*DNSRecordDeletion, error)
- func (c *DNSClient) Details(id int) (*DNSRecord, error)
- func (c *DNSClient) List(params *DNSRecordParams) (*DNSRecordList, error)
- func (c *DNSClient) ListAll(zone string) (result DNSRecordList, err error)
- func (c *DNSClient) Update(params *DNSRecordParams) (*DNSRecord, error)
- type DNSRecord
- type DNSRecordDeletion
- type DNSRecordList
- type DNSRecordParams
- type DNSZone
- type DNSZoneBackend
- type DNSZoneClient
- func (c *DNSZoneClient) Create(params DNSZoneCreateParams) (result DNSZone, err error)
- func (c *DNSZoneClient) DeleteByName(zoneName string) (err error)
- func (c *DNSZoneClient) Details(zoneName string) (zone DNSZone, err error)
- func (c *DNSZoneClient) List(params liquidweb.ListMeta) (result DNSZoneList, err error)
- func (c *DNSZoneClient) ListAll() (result DNSZoneList, err error)
- type DNSZoneCreateParams
- type DNSZoneList
- type LoadBalancer
- type LoadBalancerBackend
- type LoadBalancerClient
- func (c *LoadBalancerClient) Create(params LoadBalancerParams) (*LoadBalancer, error)
- func (c *LoadBalancerClient) Delete(uniqID string) (*LoadBalancerDeletion, error)
- func (c *LoadBalancerClient) Details(uniqID string) (*LoadBalancer, error)
- func (c *LoadBalancerClient) Update(params LoadBalancerParams) (*LoadBalancer, error)
- type LoadBalancerDeletion
- type LoadBalancerNode
- type LoadBalancerNodeParams
- type LoadBalancerParams
- type LoadBalancerService
- type LoadBalancerServiceParams
- type RegionOverrides
- type VIP
- type VIPBackend
- type VIPClient
- type VIPDeletion
- type VIPParams
- type Zone
- type ZoneBackend
- type ZoneClient
- type ZoneList
- type ZoneListParams
- type ZoneParams
- type ZoneRegion
Constants ¶
const VIPActiveStatus = "Active"
VIPActiveStatus represents a VIP's status when active.
const VIPBucketPart = "BucketPart"
VIPBucketPart represents a VIP's status when termination is pending.
const VIPDisabledStatus = "Disabled"
VIPDisabledStatus represents a VIP's status when disabled.
const VIPNewStatus = "New"
VIPNewStatus represents a VIP's status when new.
const VIPPendingActivation = "Pending-Activation"
VIPPendingActivation represents a VIP's status when activation is pending.
const VIPPendingConfig = "Pending-Config"
VIPPendingConfig represents a VIP's status when configuration is pending.
const VIPPendingPayment = "Pending-Payment"
VIPPendingPayment represents a VIP's status when payment is pending.
const VIPPendingTermination = "Pending-Termination"
VIPPendingTermination represents a VIP's status when termination is pending.
const VIPTerminatedStatus = "Terminated"
VIPTerminatedStatus represents a VIP's status when terminated.
Variables ¶
var PendingStatuses = []string{ VIPNewStatus, VIPPendingTermination, VIPPendingActivation, VIPPendingPayment, VIPPendingConfig, }
PendingStatuses is an array of strings representing the different statuses a VIP can be in before it is active.
Functions ¶
This section is empty.
Types ¶
type DNSBackend ¶
type DNSBackend interface { Create(*DNSRecordParams) (*DNSRecord, error) Details(int) (*DNSRecord, error) List(*DNSRecordParams) (*DNSRecordList, error) ListAll(string) (DNSRecordList, error) Update(*DNSRecordParams) (*DNSRecord, error) Delete(*DNSRecordParams) (*DNSRecordDeletion, error) }
DNSBackend describes the interface for interactions with the API.
type DNSClient ¶
DNSClient is the backend implementation for interacting with DNS Records.
func (*DNSClient) Create ¶
func (c *DNSClient) Create(params *DNSRecordParams) (*DNSRecord, error)
Create creates a new DNS Record.
func (*DNSClient) Delete ¶
func (c *DNSClient) Delete(params *DNSRecordParams) (*DNSRecordDeletion, error)
Delete will delete a DNS Record.
func (*DNSClient) List ¶
func (c *DNSClient) List(params *DNSRecordParams) (*DNSRecordList, error)
List returns a list of DNS Records.
type DNSRecord ¶
type DNSRecord struct { ID types.FlexInt `json:"id,omitempty"` Name string `json:"name,omitempty"` Prio types.FlexInt `json:"prio,omitempty"` RData string `json:"rdata,omitempty"` TTL types.FlexInt `json:"ttl,omitempty"` Type string `json:"type,omitempty"` Zone string `json:"zone,omitempty"` ZoneID types.FlexInt `json:"zone_id,omitempty"` AdminEmail string `json:"adminEmail,omitempty"` Created string `json:"created,omitempty"` Exchange string `json:"exchange,omitempty"` Expiry types.FlexInt `json:"expiry,omitempty"` FullData string `json:"fullData,omitempty"` LastUpdated string `json:"last_updated,omitempty"` Minimum types.FlexInt `json:"minimum,omitempty"` Nameserver string `json:"nameserver,omitempty"` Port types.FlexInt `json:"port,omitempty"` RefreshInterval types.FlexInt `json:"refreshInterval,omitempty"` RegionOverrides *RegionOverrides `json:"regionOverrides,omitempty"` Retry types.FlexInt `json:"retry,omitempty"` Serial types.FlexInt `json:"serial,omitempty"` Target string `json:"target,omitempty"` Weight types.FlexInt `json:"weight,omitempty"` }
DNSRecord is the resource representing a DNS record entry.
type DNSRecordDeletion ¶
DNSRecordDeletion represents the API result when deleting a DNS Record.
type DNSRecordList ¶
DNSRecordList is an envelope for the API result containing either a list of DNS Records or an error.
type DNSRecordParams ¶
type DNSRecordParams struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Prio int `json:"prio,omitempty"` RData string `json:"rdata,omitempty"` TTL int `json:"ttl,omitempty"` Type string `json:"type,omitempty"` Zone string `json:"zone,omitempty"` ZoneID int `json:"zone_id,omitempty"` AdminEmail string `json:"adminEmail,omitempty"` Created string `json:"created,omitempty"` Exchange string `json:"exchange,omitempty"` Expiry int `json:"expiry,omitempty"` FullData string `json:"fullData,omitempty"` LastUpdated string `json:"last_updated,omitempty"` Minimum int `json:"minimum,omitempty"` Nameserver string `json:"nameserver,omitempty"` Port int `json:"port,omitempty"` RefreshInterval int `json:"refreshInterval,omitempty"` RegionOverrides *RegionOverrides `json:"regionOverrides,omitempty"` Retry int `json:"retry,omitempty"` Serial int `json:"serial,omitempty"` Target string `json:"target,omitempty"` Weight int `json:"weight,omitempty"` PageNum int `json:"page_num,omitempty"` }
DNSRecordParams is the set of parameters used when creating or updating a DNS record.
type DNSZone ¶ added in v1.6.4
type DNSZone struct { ID types.FlexInt `json:"id,omitempty"` Name string `json:"name,omitempty"` Active types.FlexInt `json:"active,omitempty"` DelegationStatus string `json:"delegation_status,omitempty"` PrimaryNameserver string `json:"master,omitempty"` NotifiedSerial *types.FlexInt `json:"notified_serial,omitempty"` Contact string `json:"contact,omitempty"` }
DNSRecord is the resource representing a DNS record entry.
type DNSZoneBackend ¶ added in v1.6.4
type DNSZoneBackend interface { List(liquidweb.ListMeta) (DNSZoneList, error) ListAll() (DNSZoneList, error) Create(DNSZoneCreateParams) (DNSZone, error) Details(string) (DNSZone, error) DeleteByName(string) error }
type DNSZoneClient ¶ added in v1.6.4
func (*DNSZoneClient) Create ¶ added in v1.6.4
func (c *DNSZoneClient) Create(params DNSZoneCreateParams) (result DNSZone, err error)
func (*DNSZoneClient) DeleteByName ¶ added in v1.6.4
func (c *DNSZoneClient) DeleteByName(zoneName string) (err error)
func (*DNSZoneClient) Details ¶ added in v1.6.4
func (c *DNSZoneClient) Details(zoneName string) (zone DNSZone, err error)
func (*DNSZoneClient) List ¶ added in v1.6.4
func (c *DNSZoneClient) List(params liquidweb.ListMeta) (result DNSZoneList, err error)
func (*DNSZoneClient) ListAll ¶ added in v1.6.4
func (c *DNSZoneClient) ListAll() (result DNSZoneList, err error)
type DNSZoneCreateParams ¶ added in v1.6.4
type DNSZoneList ¶ added in v1.6.4
type LoadBalancer ¶
type LoadBalancer struct { Name string `json:"name,omitempty"` Nodes []LoadBalancerNode `json:"nodes,omitempty"` RegionID types.FlexInt `json:"region_id,omitempty"` Services []LoadBalancerService `json:"services,omitempty"` SessionPersistence types.NumericalBoolean `json:"session_persistence,omitempty"` SSLIncludes types.NumericalBoolean `json:"ssl_includes,omitempty"` SSLTermination types.NumericalBoolean `json:"ssl_termination,omitempty"` Strategy string `json:"ip,omitempty"` UniqID string `json:"uniq_id,omitempty"` VIP types.IPAddr `json:"vip,omitempty"` }
LoadBalancer is the resource representing a load balancer.
type LoadBalancerBackend ¶
type LoadBalancerBackend interface { Create(LoadBalancerParams) (*LoadBalancer, error) Details(string) (*LoadBalancer, error) Update(LoadBalancerParams) (*LoadBalancer, error) Delete(string) (*LoadBalancerDeletion, error) }
LoadBalancerBackend describes the interface for interactions with the API.
type LoadBalancerClient ¶
LoadBalancerClient is the backend implementation for interacting with the API.
func (*LoadBalancerClient) Create ¶
func (c *LoadBalancerClient) Create(params LoadBalancerParams) (*LoadBalancer, error)
Create creates a new load balancer.
func (*LoadBalancerClient) Delete ¶
func (c *LoadBalancerClient) Delete(uniqID string) (*LoadBalancerDeletion, error)
Delete will delete a load balancer.
func (*LoadBalancerClient) Details ¶
func (c *LoadBalancerClient) Details(uniqID string) (*LoadBalancer, error)
Details returns details about a load balancer.
func (*LoadBalancerClient) Update ¶
func (c *LoadBalancerClient) Update(params LoadBalancerParams) (*LoadBalancer, error)
Update will update a load balancer.
type LoadBalancerDeletion ¶
type LoadBalancerDeletion struct {
Destroyed string `json:"destroyed"`
}
LoadBalancerDeletion represents the API result when deleting a load balancer.
type LoadBalancerNode ¶
type LoadBalancerNode struct { Domain string `json:"domain,omitempty"` IP net.IP `json:"ip,omitempty"` UniqID string `json:"uniq_id,omitempty"` }
LoadBalancerNode is the resource representing a load balancer node.
type LoadBalancerNodeParams ¶
type LoadBalancerNodeParams struct { Domain string `json:"domain,omitempty"` IP net.IP `json:"ip,omitempty"` UniqID string `json:"uniq_id,omitempty"` }
LoadBalancerNodeParams is the resource representing a load balancer node.
type LoadBalancerParams ¶
type LoadBalancerParams struct { UniqID string `json:"uniq_id,omitempty"` Name string `json:"name,omitempty"` Nodes []string `json:"nodes,omitempty"` Region int `json:"region,omitempty"` Services []LoadBalancerServiceParams `json:"services,omitempty"` SessionPersistence bool `json:"session_persistence,omitempty"` SSLCert string `json:"ssl_cert,omitempty"` SSLIncludes bool `json:"ssl_includes,omitempty"` SSLInt string `json:"ssl_int,omitempty"` SSLKey string `json:"ssl_key,omitempty"` SSLTermination bool `json:"ssl_termination,omitempty"` Strategy string `json:"strategy,omitempty"` }
LoadBalancerParams is the set of parameters used when creating or updating a load balancer.
type LoadBalancerService ¶
type LoadBalancerService struct { UniqID string `json:"uniq_id,omitempty"` SrcPort types.FlexInt `json:"src_port,omitempty"` DestPort types.FlexInt `json:"dest_port,omitempty"` Protocol string `json:"protocol,omitempty"` }
LoadBalancerService is the resource representing a load balancer service.
type LoadBalancerServiceParams ¶
type LoadBalancerServiceParams struct { UniqID string `json:"uniq_id,omitempty"` SrcPort int `json:"src_port,omitempty"` DestPort int `json:"dest_port,omitempty"` }
LoadBalancerServiceParams is the set of parameters used when adding services to a load balancer.
type RegionOverrides ¶
RegionOverrides contains region data.
type VIP ¶
type VIP struct { Domain string `json:"domain,omitempty"` Active types.NumericalBoolean `json:"active,omitempty"` ActiveStatus string `json:"activeStatus,omitempty"` UniqID string `json:"uniq_id,omitempty"` Destroyed string `json:"destroyed,omitempty"` IP string `json:"ip,omitempty"` }
VIP is the resource representing a VIP entry.
type VIPBackend ¶
type VIPBackend interface { Create(VIPParams) (*VIP, error) Destroy(string) (*VIPDeletion, error) Details(string) (*VIP, error) }
VIPBackend describes the interface for interactions with the API.
type VIPClient ¶
VIPClient is the backend implementation for interacting with VIP.
type VIPDeletion ¶
type VIPDeletion struct {
Destroyed string `json:"destroyed"`
}
VIPDeletion represents the API result when deleting a VIP.
type VIPParams ¶
type VIPParams struct { Domain string `json:"domain,omitempty"` Zone int `json:"zone,omitempty"` UniqID string `json:"uniq_id,omitempty"` SubAccount string `json:"subaccnt,omitempty"` }
VIPParams is the set of parameters used when creating or updating a VIP.
type Zone ¶
type Zone struct { ID types.FlexInt `json:"id,omitempty"` IsDefault types.NumericalBoolean `json:"is_default,omitempty"` Name string `json:"name,omitempty"` Region ZoneRegion `json:"region,omitempty"` Status string `json:"status,omitempty"` ValidSourceHVS map[string]types.NumericalBoolean `json:"valid_source_hvs,omitempty"` }
Zone is a grouping of network resources.
type ZoneBackend ¶
ZoneBackend is the interface for network zones.
type ZoneClient ¶
ZoneClient is the API client for network zones.
func (*ZoneClient) Details ¶
func (c *ZoneClient) Details(id int) (*Zone, error)
Details fetches the details for a zone.
func (*ZoneClient) List ¶
func (c *ZoneClient) List(params *ZoneListParams) (*ZoneList, error)
List returns a list of network zones.
type ZoneList ¶
ZoneList is an envelope for the API result containing either a list of zones or an error.
type ZoneListParams ¶
type ZoneListParams struct { PageNum int `json:"page_num,omitempty"` PageSize int `json:"page_size,omitempty"` Region string `json:"region,omitempty"` }
ZoneListParams are the set of parameters you can pass to the API for listing Network Zones.
type ZoneParams ¶
type ZoneParams struct {
ID int `json:"id,omitempty"`
}
ZoneParams are the set of parameters you can pass to the API for Network Zones.
type ZoneRegion ¶
ZoneRegion describes the zone the resources should be in.