rpc

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*zabbix.Client
}

func (*Client) CreateMaintenance

func (c *Client) CreateMaintenance(ctx context.Context, m *Maintenance) error

func (*Client) DeleteMaintenancesByIDs

func (c *Client) DeleteMaintenancesByIDs(ctx context.Context, ids []string) (deletedIDs []string, err error)

func (*Client) GetHostGroupsByNamesFullMatch

func (c *Client) GetHostGroupsByNamesFullMatch(ctx context.Context,
	names []string) ([]HostGroup, error)

func (*Client) GetHostsByGroupIDs

func (c *Client) GetHostsByGroupIDs(ctx context.Context,
	groupIDs []string) ([]Host, error)

func (*Client) GetHostsByHostIDs

func (c *Client) GetHostsByHostIDs(ctx context.Context,
	hostIDs []string) ([]Host, error)

func (*Client) GetHostsByNamesFullMatch

func (c *Client) GetHostsByNamesFullMatch(ctx context.Context,
	names []string) ([]Host, error)

func (*Client) GetMaintenanceByID

func (c *Client) GetMaintenanceByID(ctx context.Context, maintenanceID string) (*Maintenance, error)

func (*Client) GetMaintenanceByNameFullMatch

func (c *Client) GetMaintenanceByNameFullMatch(ctx context.Context, name string) (*Maintenance, error)

func (*Client) GetMaintenanceIDsByIDs

func (c *Client) GetMaintenanceIDsByIDs(ctx context.Context, maintenanceIDs []string) ([]string, error)

func (*Client) GetMaintenanceIDsByNamesFullMatch

func (c *Client) GetMaintenanceIDsByNamesFullMatch(ctx context.Context, names []string) ([]string, error)

func (*Client) GetMaintenances

func (c *Client) GetMaintenances(ctx context.Context) ([]Maintenance, error)

func (*Client) UpdateMaintenance

func (c *Client) UpdateMaintenance(ctx context.Context, m *Maintenance) error

type Host

type Host struct {
	HostID            string `json:"hostid"`
	Name              string `json:"name,omitempty"`
	MaintenanceFrom   string `json:"maintenance_from,omitempty"`
	MaintenanceStatus string `json:"maintenance_status,omitempty"`
	MaintenanceType   string `json:"maintenance_type,omitempty"`
	MaintenanceID     string `json:"maintenanceid,omitempty"`
}

type HostGroup

type HostGroup struct {
	GroupID string `json:"groupid"`
	Name    string `json:"name,omitempty"`
}

type Maintenance

type Maintenance struct {
	MaintenaceID   string       `json:"maintenanceid,omitempty"`
	Name           string       `json:"name,omitempty"`
	ActiveSince    string       `json:"active_since,omitempty"`
	ActiveTill     string       `json:"active_till,omitempty"`
	Description    string       `json:"description,omitempty"`
	MaintenaceType string       `json:"maintenance_type,omitempty"`
	TagsEvalType   string       `json:"tags_evaltype,omitempty"`
	Groups         []HostGroup  `json:"groups"`
	Hosts          []Host       `json:"hosts"`
	TimePeriods    []TimePeriod `json:"timeperiods,omitempty"`
}

type TimePeriod

type TimePeriod struct {
	TimeperiodID   string `json:"timeperiodid,omitempty"`
	Period         string `json:"period"`
	TimeperiodType string `json:"timeperiod_type"`
	StartDate      string `json:"start_date"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL