...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package v3alpha1
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 import (
36 "encoding/json"
37 )
38
39 const (
40 HostState_Initial = HostState(iota)
41 HostState_Pending
42 HostState_Ready
43 HostState_Error
44 )
45
46 var (
47 hostState_name = map[HostState]string{
48 0: "Initial",
49 1: "Pending",
50 2: "Ready",
51 3: "Error",
52 }
53
54 hostState_value = map[string]HostState{
55 "Initial": 0,
56 "Pending": 1,
57 "Ready": 2,
58 "Error": 3,
59 }
60 )
61
62 func (o HostState) MarshalJSON() ([]byte, error) {
63 return json.Marshal(o.String())
64 }
65
66 func (o HostState) String() string {
67 return hostState_name[o]
68 }
69
70 func (o *HostState) UnmarshalJSON(data []byte) error {
71 if string(data) == "null" {
72 *o = 0
73 return nil
74 }
75
76 var str string
77 if err := json.Unmarshal(data, &str); err != nil {
78 return err
79 }
80
81 *o = hostState_value[str]
82 return nil
83 }
84
85 const (
86 HostPhase_NA = HostPhase(iota)
87 HostPhase_DefaultsFilled
88 HostPhase_ACMEUserPrivateKeyCreated
89 HostPhase_ACMEUserRegistered
90 HostPhase_ACMECertificateChallenge
91 )
92
93 var (
94 hostPhase_name = map[HostPhase]string{
95 HostPhase_NA: "NA",
96 HostPhase_DefaultsFilled: "DefaultsFilled",
97 HostPhase_ACMEUserPrivateKeyCreated: "ACMEUserPrivateKeyCreated",
98 HostPhase_ACMEUserRegistered: "ACMEUserRegistered",
99 HostPhase_ACMECertificateChallenge: "ACMECertificateChallenge",
100 }
101
102 hostPhase_value = map[string]HostPhase{
103 "NA": HostPhase_NA,
104 "DefaultsFilled": HostPhase_DefaultsFilled,
105 "ACMEUserPrivateKeyCreated": HostPhase_ACMEUserPrivateKeyCreated,
106 "ACMEUserRegistered": HostPhase_ACMEUserRegistered,
107 "ACMECertificateChallenge": HostPhase_ACMECertificateChallenge,
108 }
109 )
110
111 func (o HostPhase) MarshalJSON() ([]byte, error) {
112 return json.Marshal(o.String())
113 }
114
115 func (o HostPhase) String() string {
116 return hostPhase_name[o]
117 }
118
119 func (o *HostPhase) UnmarshalJSON(data []byte) error {
120 if string(data) == "null" {
121 *o = 0
122 return nil
123 }
124
125 var str string
126 if err := json.Unmarshal(data, &str); err != nil {
127 return err
128 }
129
130 *o = hostPhase_value[str]
131 return nil
132 }
133
134 const (
135 PreviewURLType_Path = "Path"
136 )
137
138 const (
139 HostTLSCertificateSource_Unknown = "Unknown"
140 HostTLSCertificateSource_None = "None"
141 HostTLSCertificateSource_Other = "Other"
142 HostTLSCertificateSource_ACME = "ACME"
143 )
144
View as plain text