aboutsummaryrefslogtreecommitdiff
path: root/messages.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-11-28 18:52:49 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-11-28 18:52:49 +0100
commitc6261c5ce9537296479b621e91a90e4f57a21734 (patch)
treea81f7dfc613bec42437890fedeb9af8b01adf5a5 /messages.go
parentf280d0d011a8dd1fbc582b54a248c9e8459311b0 (diff)
WIP error handler
Diffstat (limited to 'messages.go')
-rw-r--r--messages.go36
1 files changed, 28 insertions, 8 deletions
diff --git a/messages.go b/messages.go
index 07c6fe7..511c713 100644
--- a/messages.go
+++ b/messages.go
@@ -1,7 +1,5 @@
package acme
-import jose "github.com/square/go-jose"
-
const (
// LEV1 Let's Encrytpt V1
LEV1 = `https://acme-v01.api.letsencrypt.org/directory`
@@ -20,12 +18,27 @@ type Directory struct {
// Registration Objects
type Registration struct {
- Resource string `json:"resource"`
- Key jose.JsonWebKey `json:"key"`
- Contact []string `json:"contact,omitempty"`
- Agreement string `json:"agreement,omitempty"`
- Authorizations string `json:"authorizations,omitempty"`
- Certificates string `json:"certificates,omitempty"`
+ Resource string `json:"resource"`
+ Contact []string `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"`
+ InitialIP string `json:"initalIp"`
+ CreatedAt string `json:"createdAt"` // 2006-01-02T15:04:05.999999999Z
+}
+
+// Key ...
+type Key struct {
+ Kty string `json:"kty"` // RSA, EC
+ E string `json:"e"`
+ N string `json:"n"`
}
// Authorization Objects
@@ -51,3 +64,10 @@ type Challege struct {
Validated string `json:"validated"` // 2006-01-02T15:04Z
KeyAuthorization string `json:"keyAuthorization"`
}
+
+// Problem description
+type Problem struct {
+ Type string `json:"type"`
+ Detail string `json:"detail"`
+ Instance string `json:"instance"`
+}