extended response struct
This commit is contained in:
parent
3a94226aa8
commit
43465c6ae9
20
client.go
20
client.go
@ -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{
|
||||
|
Loading…
Reference in New Issue
Block a user