aboutsummaryrefslogtreecommitdiff
path: root/messages.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-12-10 17:01:14 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-12-10 17:01:14 +0100
commit54975553c4b67d2b2d9d6edcbf18dbcbdc508fec (patch)
tree368e07db912904c7982358ad60e76a35404121b5 /messages.go
parentf8176a30d5193f77fd7a76492f8245620035ffb7 (diff)
Reimplement registration
Diffstat (limited to 'messages.go')
-rw-r--r--messages.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/messages.go b/messages.go
index 33f5873..c270f32 100644
--- a/messages.go
+++ b/messages.go
@@ -24,7 +24,7 @@ type Directory struct {
// Registration Objects
type Registration struct {
- Resource string `json:"resource"` // new-reg
+ Resource Resource `json:"resource"` // new-reg
Contact []Contact `json:"contact,omitempty"`
Agreement string `json:"agreement,omitempty"`
Authorizations string `json:"authorizations,omitempty"`
@@ -49,7 +49,7 @@ type Key struct {
// Authorization request
type Authorization struct {
- Resource string `json:"resource"` // new-authz
+ Resource Resource `json:"resource"` // new-authz
Identifier Identifier `json:"identifier"`
}
@@ -69,7 +69,7 @@ type Identifier struct {
}
// Challege ...
-type Challege struct {
+type Challenge struct {
Type string `json:"type"` // http-01
Status Status `json:"status"` // e.g. valid
Validated string `json:"validated"` // 2006-01-02T15:04Z
@@ -96,8 +96,8 @@ const (
StatusRevoked
)
-// UnmarshalJSON implemets json interface for status decoding
-func (s *Status) UnmarshalJSON(b []byte) error {
+// UnmarshalText implemets json interface for status decoding
+func (s *Status) UnmarshalText(b []byte) error {
var status = map[string]Status{
"unknown": StatusUnknown,
"pending": StatusPending,