1 package network
2 3 import (
4 "github.com/liquidweb/liquidweb-go/types"
5 )
6 7 // VIPParams is the set of parameters used when creating or updating a VIP.
8 type VIPParams struct {
9 Domain string `json:"domain,omitempty"`
10 Zone int `json:"zone,omitempty"`
11 UniqID string `json:"uniq_id,omitempty"`
12 SubAccount string `json:"subaccnt,omitempty"`
13 }
14 15 // VIP is the resource representing a VIP entry.
16 type VIP struct {
17 Domain string `json:"domain,omitempty"`
18 Active types.NumericalBoolean `json:"active,omitempty"`
19 ActiveStatus string `json:"activeStatus,omitempty"`
20 UniqID string `json:"uniq_id,omitempty"`
21 Destroyed string `json:"destroyed,omitempty"`
22 IP string `json:"ip,omitempty"`
23 }
24 25 // VIPDeletion represents the API result when deleting a VIP.
26 type VIPDeletion struct {
27 Destroyed string `json:"destroyed"`
28 }
29 30 // VIPNewStatus represents a VIP's status when new.
31 const VIPNewStatus = "New"
32 33 // VIPActiveStatus represents a VIP's status when active.
34 const VIPActiveStatus = "Active"
35 36 // VIPDisabledStatus represents a VIP's status when disabled.
37 const VIPDisabledStatus = "Disabled"
38 39 // VIPTerminatedStatus represents a VIP's status when terminated.
40 const VIPTerminatedStatus = "Terminated"
41 42 // VIPPendingTermination represents a VIP's status when termination is pending.
43 const VIPPendingTermination = "Pending-Termination"
44 45 // VIPPendingActivation represents a VIP's status when activation is pending.
46 const VIPPendingActivation = "Pending-Activation"
47 48 // VIPPendingPayment represents a VIP's status when payment is pending.
49 const VIPPendingPayment = "Pending-Payment"
50 51 // VIPBucketPart represents a VIP's status when termination is pending.
52 const VIPBucketPart = "BucketPart"
53 54 // VIPPendingConfig represents a VIP's status when configuration is pending.
55 const VIPPendingConfig = "Pending-Config"
56 57 // PendingStatuses is an array of strings representing the different statuses a
58 // VIP can be in before it is active.
59 var PendingStatuses = []string{
60 VIPNewStatus,
61 VIPPendingTermination,
62 VIPPendingActivation,
63 VIPPendingPayment,
64 VIPPendingConfig,
65 }
66