-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcerts.go
More file actions
28 lines (25 loc) · 830 Bytes
/
certs.go
File metadata and controls
28 lines (25 loc) · 830 Bytes
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
package api
// Cert is the definition of the cert object.
// Some fields are omtempty because they are only
// returned when creating or getting a cert.
type Cert struct {
Updated string `json:"updated,omitempty"`
Created string `json:"created,omitempty"`
Name string `json:"common_name"`
Expires string `json:"expires"`
Owner string `json:"owner,omitempty"`
ID int `json:"id,omitempty"`
}
// Certs is the definition of GET /v1/certs/.
type Certs struct {
Count int `json:"count"`
Next int `json:"next"`
Previous int `json:"previous"`
Certs []Cert `json:"results"`
}
// CertCreateRequest is the definition of POST /v1/certs/.
type CertCreateRequest struct {
Certificate string `json:"certificate"`
Key string `json:"key"`
Name string `json:"common_name,omitempty"`
}