-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add error case for Error JSON parsing (#21)
- Loading branch information
1 parent
6fb5744
commit 87668d9
Showing
2 changed files
with
12 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
package reggie | ||
|
||
import ( | ||
spec "github.com/opencontainers/distribution-spec/specs-go/v1" | ||
) | ||
|
||
type ( | ||
ErrorResponse struct { | ||
Errors []ErrorInfo `json:"errors"` | ||
} | ||
|
||
// ErrorInfo describes a server error returned from a registry. | ||
ErrorInfo struct { | ||
*spec.ErrorInfo | ||
Code string `json:"code"` | ||
Message string `json:"message"` | ||
Detail interface{} `json:"detail"` | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters