Documentation ¶
Index ¶
- Variables
- type Checkable
- type Client
- type Host
- type HostCreate
- type HostGroup
- type HostGroupCreate
- type HostGroupResults
- type HostResults
- type MockClient
- func (s *MockClient) CreateHost(host Host) error
- func (s *MockClient) CreateHostGroup(hostGroup HostGroup) error
- func (s *MockClient) CreateService(service Service) error
- func (s *MockClient) DeleteHost(name string) error
- func (s *MockClient) DeleteHostGroup(name string) error
- func (s *MockClient) DeleteService(name string) error
- func (s *MockClient) GetHost(name string) (Host, error)
- func (s *MockClient) GetHostGroup(name string) (HostGroup, error)
- func (s *MockClient) GetService(name string) (Service, error)
- func (s *MockClient) ListHostGroups() ([]HostGroup, error)
- func (s *MockClient) ListHosts() ([]Host, error)
- func (s *MockClient) ListServices() ([]Service, error)
- func (s *MockClient) UpdateHost(host Host) error
- func (s *MockClient) UpdateHostGroup(hostGroup HostGroup) error
- func (s *MockClient) UpdateService(service Service) error
- type Object
- type Results
- type Service
- type ServiceCreate
- type ServiceResults
- type Vars
- type WebClient
- func (s *WebClient) CreateHost(host Host) error
- func (s *WebClient) CreateHostGroup(hostGroup HostGroup) error
- func (s *WebClient) CreateObject(path string, create interface{}) error
- func (s *WebClient) CreateService(service Service) error
- func (s *WebClient) DeleteHost(name string) (err error)
- func (s *WebClient) DeleteHostGroup(name string) (err error)
- func (s *WebClient) DeleteService(name string) (err error)
- func (s *WebClient) GetHost(name string) (Host, error)
- func (s *WebClient) GetHostGroup(name string) (HostGroup, error)
- func (s *WebClient) GetService(name string) (Service, error)
- func (s *WebClient) ListHostGroups() (hostGroups []HostGroup, err error)
- func (s *WebClient) ListHosts() (hosts []Host, err error)
- func (s *WebClient) ListServices() (services []Service, err error)
- func (s *WebClient) UpdateHost(host Host) error
- func (s *WebClient) UpdateHostGroup(hostGroup HostGroup) error
- func (s *WebClient) UpdateObject(path string, create interface{}) error
- func (s *WebClient) UpdateService(service Service) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GetHost(string) (Host, error) CreateHost(Host) error ListHosts() ([]Host, error) DeleteHost(string) error UpdateHost(Host) error GetHostGroup(string) (HostGroup, error) CreateHostGroup(HostGroup) error ListHostGroups() ([]HostGroup, error) DeleteHostGroup(string) error UpdateHostGroup(HostGroup) error GetService(string) (Service, error) CreateService(Service) error ListServices() ([]Service, error) DeleteService(string) error UpdateService(Service) error }
type Host ¶
type Host struct { Name string `json:"display_name"` Address string `json:"address,omitempty"` Address6 string `json:"address6,omitempty"` CheckCommand string `json:"check_command,omitempty"` Notes string `json:"notes"` NotesURL string `json:"notes_url"` Vars Vars `json:"vars"` Groups []string `json:"groups,omitempty"` Zone string `json:"zone,omitempty"` }
func (Host) GetCheckCommand ¶
func (Host) GetNotesURL ¶
type HostCreate ¶
type HostGroup ¶
type HostGroupCreate ¶
type HostGroupResults ¶
type HostGroupResults struct { Results []struct { HostGroup HostGroup `json:"attrs"` } `json:"results"` }
type HostResults ¶
type HostResults struct { Results []struct { Host Host `json:"attrs"` } `json:"results"` }
type MockClient ¶
type MockClient struct { Hostgroups map[string]HostGroup Hosts map[string]Host Services map[string]Service // contains filtered or unexported fields }
func NewMockClient ¶
func NewMockClient() (c *MockClient)
func (*MockClient) CreateHost ¶
func (s *MockClient) CreateHost(host Host) error
func (*MockClient) CreateHostGroup ¶
func (s *MockClient) CreateHostGroup(hostGroup HostGroup) error
func (*MockClient) CreateService ¶
func (s *MockClient) CreateService(service Service) error
func (*MockClient) DeleteHost ¶
func (s *MockClient) DeleteHost(name string) error
func (*MockClient) DeleteHostGroup ¶
func (s *MockClient) DeleteHostGroup(name string) error
func (*MockClient) DeleteService ¶
func (s *MockClient) DeleteService(name string) error
func (*MockClient) GetHostGroup ¶
func (s *MockClient) GetHostGroup(name string) (HostGroup, error)
func (*MockClient) GetService ¶
func (s *MockClient) GetService(name string) (Service, error)
func (*MockClient) ListHostGroups ¶
func (s *MockClient) ListHostGroups() ([]HostGroup, error)
func (*MockClient) ListHosts ¶
func (s *MockClient) ListHosts() ([]Host, error)
func (*MockClient) ListServices ¶
func (s *MockClient) ListServices() ([]Service, error)
func (*MockClient) UpdateHost ¶
func (s *MockClient) UpdateHost(host Host) error
func (*MockClient) UpdateHostGroup ¶
func (s *MockClient) UpdateHostGroup(hostGroup HostGroup) error
func (*MockClient) UpdateService ¶
func (s *MockClient) UpdateService(service Service) error
type Service ¶
type Service struct { Name string `json:"display_name"` HostName string `json:"host_name"` CheckCommand string `json:"check_command"` Notes string `json:"notes"` NotesURL string `json:"notes_url"` Vars Vars `json:"vars"` Zone string `json:"zone,omitempty"` }
func (Service) GetCheckCommand ¶
func (Service) GetNotesURL ¶
type ServiceCreate ¶
type ServiceCreate struct {
Attrs Service `json:"attrs"`
}
type ServiceResults ¶
type ServiceResults struct { Results []struct { Service Service `json:"attrs"` } `json:"results"` }
type WebClient ¶
type WebClient struct { URL string Username string Password string Debug bool InsecureTLS bool Zone string // contains filtered or unexported fields }
func (*WebClient) CreateHost ¶
func (*WebClient) CreateHostGroup ¶
func (*WebClient) CreateObject ¶
func (*WebClient) CreateService ¶
func (*WebClient) DeleteHost ¶
func (*WebClient) DeleteHostGroup ¶
func (*WebClient) DeleteService ¶
func (*WebClient) ListHostGroups ¶
func (*WebClient) ListServices ¶
func (*WebClient) UpdateHost ¶
func (*WebClient) UpdateHostGroup ¶
func (*WebClient) UpdateObject ¶
func (*WebClient) UpdateService ¶
Click to show internal directories.
Click to hide internal directories.