From 54975553c4b67d2b2d9d6edcbf18dbcbdc508fec Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Thu, 10 Dec 2015 17:01:14 +0100 Subject: Reimplement registration --- messages.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'messages.go') 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, -- cgit v1.2.3