-
Notifications
You must be signed in to change notification settings - Fork 0
/
responses.go
executable file
·160 lines (145 loc) · 5.22 KB
/
responses.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
package xolphin
type BaseResponse struct {
Message string `json:"message"`
Page int `json:"page"`
Limit int `json:"limit"`
Pages int `json:"pages"`
Total int `json:"total"`
}
func (self BaseResponse) isError() bool {
return self.Message != ""
}
type RequestsResponse struct {
BaseResponse
Embedded struct {
Requests []RequestResponse `json:"requests"`
} `json:"_embedded"`
}
type RequestValidationResponse struct {
Status bool `json:"status"`
StatusDetail int `json:"statusDetail"`
StatusMessage string `json:"statusMessage"`
Domains []struct {
Domain string `json:"domain"`
DCVType string `json:"dcvType"`
DCVEmail string `json:"dcvEmail"`
Status interface{} `json:"status"` // TODO: what is proper type for this - boolean or integer?
StatusDetail interface{} `json:"statusDetail"` // TODO: what is proper type for this - boolean or integer?
StatusMessage string `json:"statusMessage"`
Md5 string `json:"md5"`
Sha1 string `json:"sha1"`
}
}
type ProductsResponse struct {
BaseResponse
Embedded struct {
Products []ProductResponse `json:"products"`
} `json:"_embedded"`
}
type ProductResponse struct {
BaseResponse
Id int `json:"id"`
Brand string `json:"brand"`
Name string `json:"name"`
Type string `json:"type"`
Validation string `json:"validation"`
IncludeDomains int `json:"includeDomains"`
MaxDomains int `json:"maxDomains"`
Prices []struct {
Years int `json:"years"`
Price float64 `json:"price,string"`
PriceExtra float64 `json:"priceExtra,string"`
PriceExtraWildcard float64 `json:"priceExtraWildcard,string"`
} `json:"prices"`
}
type RequestResponse struct {
BaseResponse
Id int `json:"id"`
DomainName string `json:"domainName"`
SubjectAlternativeNames []string `json:"subjectAlternativeNames"`
Years int `json:"years"`
Company string `json:"company"`
DateOrdered CustomTime `json:"dateOrdered"`
Validations struct {
Docs RequestValidationResponse `json:"docs"`
Organization RequestValidationResponse `json:"organization"`
Phone RequestValidationResponse `json:"phone"`
Whois RequestValidationResponse `json:"whois"`
DCV RequestValidationResponse `json:"dcv"`
Request RequestValidationResponse `json:"request"`
} `json:"validations"`
Department string `json:"department"`
Address string `json:"address"`
ZIPCode string `json:"zipCode"`
City string `json:"city"`
Province string `json:"province"`
Country string `json:"country"`
Reference string `json:"reference"`
ApproverFirstName string `json:"approverFirstName"`
ApproverLastName string `json:"approverLastName"`
ApproverEmail string `json:"approverEmail"`
ApproverPhone string `json:"approverPhone"`
ApproverRepresentativeFirstName string `json:"approverRepresentativeFirstName"`
ApproverRepresentativeLastName string `json:"approverRepresentativeLastName"`
ApproverRepresentativeEmail string `json:"approverRepresentativeEmail"`
ApproverRepresentativePhone string `json:"approverRepresentativePhone"`
ApproverRepresentativePositon string `json:"approverRepresentativePositon"`
RequiresAction bool `json:"requiresAction"`
BrandValidation bool `json:"brandValidation"`
KVK string `json:"kvk"`
Embedded struct {
Product ProductResponse `json:"product"`
} `json:"_embedded"`
}
type RequestEEResponse struct {
BaseResponse
Id int `json:"id"`
DateOrdered CustomTime `json:"dateOrdered"`
Pkcs7 string `json:"pkcs7"`
Certificate string `json:"crt"`
}
type CertificatesResponse struct {
BaseResponse
Embedded struct {
Certificates []CertificateResponse `json:"certificates"`
} `json:"_embedded"`
}
type CertificateResponse struct {
BaseResponse
Id int `json:"id"`
DomainName string `json:"domainName"`
SubjectAlternativeNames []string `json:"subjectAlternativeNames"`
DateIssued CustomTime `json:"dateIssued"`
DateExpired CustomTime `json:"dateExpired"`
Company string `json:"company"`
CustomerId int `json:"customerId"`
Embedded struct {
Product ProductResponse `json:"product"`
} `json:"_embedded"`
}
type CSRResponse struct {
BaseResponse
Type string `json:"type"`
Size int `json:"size"`
Company string `json:"company"`
CN string `json:"cn"`
State string `json:"state"`
City string `json:"city"`
Country string `json:"country"`
AltNames []string `json:"altNames"`
}
type NotesResponse struct {
BaseResponse
Embedded struct {
Notes []NoteResponse `json:"notes"`
} `json:"_embedded"`
}
type NoteResponse struct {
BaseResponse
Contact string `json:"contact"`
Staff string `json:"staff"`
Date string `json:"date"`
Time string `json:"time"`
Message string `json:"message"`
CreatedAt CustomTime `json:"createdAt"`
}