aboutsummaryrefslogtreecommitdiff
path: root/messages.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-12-13 01:29:26 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-12-13 01:29:26 +0100
commitdbc27c3a29e6644688d015f36c689165e6d90168 (patch)
tree3dc34b6faf621f8eeb72719b09301d045955591b /messages.go
parentbfeba6089e5eaf07f0a8141c800e91cf0842f4ba (diff)
More strong typing
Diffstat (limited to 'messages.go')
-rw-r--r--messages.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/messages.go b/messages.go
index 7527aa3..c4bf8e5 100644
--- a/messages.go
+++ b/messages.go
@@ -24,18 +24,18 @@ type Directory struct {
// Registration Objects
type Registration struct {
- Resource Resource `json:"resource"` // new-reg
- Contact []Contact `json:"contact,omitempty"`
- Agreement string `json:"agreement,omitempty"`
- Authorizations string `json:"authorizations,omitempty"`
- Certificates string `json:"certificates,omitempty"`
+ Resource Resource `json:"resource"` // new-reg
+ Contact Contacts `json:"contact,omitempty"`
+ Agreement string `json:"agreement,omitempty"`
+ Authorizations string `json:"authorizations,omitempty"`
+ Certificates string `json:"certificates,omitempty"`
}
// RegistrationResp ...
type RegistrationResp struct {
ID int `json:"id"`
Key Key `json:"key"`
- Contact []string `json:"contact"`
+ Contact Contacts `json:"contact"`
InitialIP net.IP `json:"initialIp"` // not in draft
CreatedAt time.Time `json:"createdAt"` // 2006-01-02T15:04:05.999999999Z
}
@@ -57,7 +57,7 @@ type Authorization struct {
type AuthorizationResp struct {
Identifier Identifier `json:"identifier"`
Status Status `json:"status,omitemtpy"` // e.g. valid
- Expires string `json:"expires,omitempty"` // 2006-01-02
+ Expires time.Time `json:"expires,omitempty"` // 2006-01-02
Challenges []Challenge `json:"challenges"`
Combinations [][]int `json:"combinations,omitemtpy"`
}
@@ -72,7 +72,7 @@ type Identifier struct {
type Challenge struct {
Type ChallengeType `json:"type"` // http-01
Status Status `json:"status"` // e.g. valid
- Validated string `json:"validated"` // 2006-01-02T15:04Z
+ Validated time.Time `json:"validated"` // 2006-01-02T15:04Z
KeyAuthorization string `json:"keyAuthorization"`
}