aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--errors.go12
-rw-r--r--provider.go12
2 files changed, 12 insertions, 12 deletions
diff --git a/errors.go b/errors.go
index 7e5bc17..4aadab6 100644
--- a/errors.go
+++ b/errors.go
@@ -6,6 +6,18 @@ import (
"io"
)
+// Problem description
+type Problem struct {
+ Type string `json:"type"`
+ Detail string `json:"detail"`
+ Instance string `json:"instance"`
+ Err error `json:"-"`
+}
+
+func (p Problem) Error() string {
+ return p.Detail
+}
+
var (
ErrBadCSR = errors.New("CSR is unacceptable")
ErrBadNonce = errors.New("Client sent an unacceptable anti-replay nonce")
diff --git a/provider.go b/provider.go
index 0e1d70f..98a3b25 100644
--- a/provider.go
+++ b/provider.go
@@ -39,14 +39,6 @@ type Directory struct {
RevokeCert string `json:"revoke-cert"`
}
-// Problem description
-type Problem struct {
- Type string `json:"type"`
- Detail string `json:"detail"`
- Instance string `json:"instance"`
- Err error `json:"-"`
-}
-
// Provider ...
type Provider struct {
Directory
@@ -71,10 +63,6 @@ const (
poll = time.Second
)
-func (p Problem) Error() string {
- return p.Detail
-}
-
// RoundTrip extracts nonces from HTTP reponse
func (p Provider) RoundTrip(req *http.Request) (*http.Response, error) {
resp, err := p.Transport.RoundTrip(req)