Refactor API calls

This commit is contained in:
Alexander Zobnin
2020-05-29 12:31:43 +03:00
parent efb4d41da5
commit 9f344cb867
10 changed files with 66 additions and 254 deletions

View File

@@ -115,6 +115,10 @@ type ZabbixAPIRequest struct {
Params map[string]interface{} `json:"params,omitempty"`
}
type ZabbixAPIResourceResponse struct {
Result interface{} `json:"result,omitempty"`
}
func (r *ZabbixAPIRequest) String() string {
jsonRequest, _ := json.Marshal(r.Params)
return r.Method + string(jsonRequest)