aboutsummaryrefslogtreecommitdiff
path: root/messages.go
diff options
context:
space:
mode:
Diffstat (limited to 'messages.go')
-rw-r--r--messages.go19
1 files changed, 12 insertions, 7 deletions
diff --git a/messages.go b/messages.go
index cb10a79..b5a1738 100644
--- a/messages.go
+++ b/messages.go
@@ -1,5 +1,10 @@
package acme
+import (
+ "net"
+ "time"
+)
+
const (
// LEV1 Let's Encrytpt V1
LEV1 = `https://acme-v01.api.letsencrypt.org/directory`
@@ -27,11 +32,11 @@ type Registration struct {
// RegistrationResp ...
type RegistrationResp struct {
- ID int `json:"id"`
- Key Key `json:"key"`
- Contact []string `json:"contact"`
- InitialIP string `json:"initalIp"` // not in draft
- CreatedAt string `json:"createdAt"` // 2006-01-02T15:04:05.999999999Z
+ ID int `json:"id"`
+ Key Key `json:"key"`
+ Contact []string `json:"contact"`
+ InitialIP net.IP `json:"initialIp"` // not in draft
+ CreatedAt time.Time `json:"createdAt"` // 2006-01-02T15:04:05.999999999Z
}
// Key contains public part of jose.JsonWebKey
@@ -50,7 +55,7 @@ type Authorization struct {
// AuthorizationResp Objects
type AuthorizationResp struct {
Identifier Identifier `json:"identifier"`
- Status string `json:"status,omitemtpy"` // e.g. valid
+ Status Status `json:"status,omitemtpy"` // e.g. valid
Expires string `json:"expires,omitempty"` // 2006-01-02
Challenges []Challenge `json:"challenges"`
Combinations [][]int `json:"combinations,omitemtpy"`
@@ -65,7 +70,7 @@ type Identifier struct {
// Challege ...
type Challege struct {
Type string `json:"type"` // http-01
- Status string `json:"status"` // e.g. valid
+ Status Status `json:"status"` // e.g. valid
Validated string `json:"validated"` // 2006-01-02T15:04Z
KeyAuthorization string `json:"keyAuthorization"`
}