Documentation
¶
Index ¶
- type API
- func (api *API) GetAuth() string
- func (api *API) Graph(method string, data interface{}) ([]ZabbixGraph, error)
- func (api *API) History(method string, data interface{}) ([]ZabbixHistoryItem, error)
- func (api *API) Host(method string, data interface{}) ([]ZabbixHost, error)
- func (api *API) Hostgroup(method string, data interface{}) ([]ZabbixHostInterface, error)
- func (api *API) Interface(method string, data interface{}) ([]ZabbixHostInterface, error)
- func (api *API) Login() (bool, error)
- func (api *API) Logout() (bool, error)
- func (api *API) User(method string, data interface{}) ([]interface{}, error)
- func (api *API) Version() (string, error)
- func (api *API) ZabbixRequest(method string, data interface{}) (JsonRPCResponse, error)
- type JsonRPCRequest
- type JsonRPCResponse
- type ZabbixError
- type ZabbixGraph
- type ZabbixGraphItem
- type ZabbixHistoryItem
- type ZabbixHost
- type ZabbixHostGroup
- type ZabbixHostInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
func (*API) Graph ¶
func (api *API) Graph(method string, data interface{}) ([]ZabbixGraph, error)
* Interface to the graph.* calls
func (*API) History ¶
func (api *API) History(method string, data interface{}) ([]ZabbixHistoryItem, error)
* Interface to the history.* calls
func (*API) Host ¶
func (api *API) Host(method string, data interface{}) ([]ZabbixHost, error)
* Interface to the host.* calls
func (*API) Hostgroup ¶
func (api *API) Hostgroup(method string, data interface{}) ([]ZabbixHostInterface, error)
func (*API) Interface ¶
func (api *API) Interface(method string, data interface{}) ([]ZabbixHostInterface, error)
func (*API) ZabbixRequest ¶
func (api *API) ZabbixRequest(method string, data interface{}) (JsonRPCResponse, error)
type JsonRPCRequest ¶
type JsonRPCResponse ¶
type JsonRPCResponse struct {
Jsonrpc string `json:"jsonrpc"`
Error ZabbixError `json:"error"`
Result interface{} `json:"result"`
Id int `json:"id"`
}
* Zabbix and Go's RPC implementations don't play with each other.. at all. So I've re-created the wheel at bit.
type ZabbixError ¶
type ZabbixError struct {
Code int `json:"code"`
Message string `json:"message"`
Data string `json:"data"`
}
func (*ZabbixError) Error ¶
func (z *ZabbixError) Error() string
type ZabbixGraph ¶
type ZabbixGraph map[string]interface{}
type ZabbixGraphItem ¶
type ZabbixGraphItem map[string]interface{}
type ZabbixHistoryItem ¶
type ZabbixHost ¶
type ZabbixHost map[string]interface{}
type ZabbixHostGroup ¶
type ZabbixHostGroup map[string]interface{}
type ZabbixHostInterface ¶
type ZabbixHostInterface map[string]interface{}