extended response struct

This commit is contained in:
Ryan Cavicchioni 2020-03-06 01:27:46 -06:00
parent 3a94226aa8
commit 43465c6ae9
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -18,15 +18,27 @@ type (
Client *http.Client
}
Results struct {
Results []Result `json:results`
}
Result struct {
ID string `json:"id"`
Label string `json:"label"`
Status Status `json:"status"`
}
Error struct {
Field string `json:"field"`
Message []string `json:"message"`
}
Warning struct {
Warning string `json:"warning"`
}
Response struct {
Error string `json:"error"`
Errors []Error `json:"errors"`
Warnings []Warning `json:"warnings"`
Results []Result `json:"results"`
}
)
var errorMap = map[int]error{