-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapimodel.go
More file actions
59 lines (51 loc) · 2.1 KB
/
apimodel.go
File metadata and controls
59 lines (51 loc) · 2.1 KB
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
package entrust
import "time"
// Response holds the default API response
type Response struct {
Status int
Errors []struct {
Message string
}
}
// AddDomainRequest contains the paramters to create a new domain
type AddDomainRequest struct {
DomainName string `json:"domainName"`
VerificationMethod string `json:"verificationMethod"` // enum (DNS, EMAIL, MANUAL, WEB_SERVER)
}
// ReverifyDomainRequest schedule domain for revalidation
type ReverifyDomainRequest struct {
VerificationMethod string `json:"verificationMethod"` // enum (DNS, EMAIL, MANUAL, WEB_SERVER)
}
// GetDomainsResponse holds a list of domains
type GetDomainsResponse struct {
Response
Summary *Summary `json:"summary"`
Domains []Domain `json:"domains"`
}
// Domain model
type Domain struct {
ClientID int `json:"clientId,omitempty"` // Client id of the client to which the domain belongs to
DomainName string `json:"domainName,omitempty"` // Domain name
EVEligible bool `json:"evEligible,omitempty"` // Whether this domain can be used for EV certificates
EVExpiry time.Time `json:"evExpiry,omitempty"` // Expiry time of verified EV information
OVEligible bool `json:"ovEligible,omitempty"` // Whether this domain can be used for OV certificates
OVExpiry time.Time `json:"ovExpiry,omitempty"` // Expiry time of verified OV information
VerificationMethod string `json:"verificationMethod,omitempty"` // (DNS, EMAIL, MANUAL, WEB_SERVER)
VerificationStatus string `json:"verificationStatus,omitempty"`
DNSMethod *DNSMethod `json:"dnsMethod"`
}
// DNSMethod information
type DNSMethod struct {
RecordDomain string `json:"recordDomain"`
RecvordType string `json:"recvordType"`
RecordValue string `json:"recordValue"`
}
// Summary of the response
type Summary struct {
Timestamp time.Time `json:"timestamp"`
Elapsed int `json:"elapsed"`
Offset int `json:"offset"`
Limit int `json:"limit"`
Total int `json:"total"`
Sort string `json:"sort"`
}