alerts

package
v2.61.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	ID              int           `json:"id"`
	RuleName        string        `json:"rule_name,omitempty"`
	Severity        string        `json:"severity,omitempty"`
	AlertType       string        `json:"alert_type,omitempty"`
	AlertStatus     string        `json:"alert_status,omitempty"`
	NumGeolocations int           `json:"num_geolocations,omitempty"`
	NumDevices      int           `json:"num_devices,omitempty"`
	StartedOn       int           `json:"started_on,omitempty"`
	EndedOn         int           `json:"ended_on,omitempty"`
	Application     Application   `json:"application,omitempty"`
	Departments     []Department  `json:"departments,omitempty"`
	Locations       []Location    `json:"locations,omitempty"`
	Geolocations    []Geolocation `json:"geolocations,omitempty"`
}

func GetAlert

func GetAlert(service *services.Service, alertID string) (*Alert, *http.Response, error)

GetAlert retrieves a specific alert by ID

type AlertsResponse

type AlertsResponse struct {
	Alerts     []Alert `json:"alerts"`
	NextOffset string  `json:"next_offset"`
}

func GetAffectedDevices

func GetAffectedDevices(service *services.Service, alertID string) (*AlertsResponse, *http.Response, error)

GetAffectedDevices retrieves the affected devices for a specific alert by ID

func GetHistoricalAlerts

func GetHistoricalAlerts(service *services.Service) (*AlertsResponse, *http.Response, error)

GetHistoricalAlerts retrieves historical alerts

func GetOngoingAlerts

func GetOngoingAlerts(service *services.Service) (*AlertsResponse, *http.Response, error)

GetOngoingAlerts retrieves ongoing alerts

type Application

type Application struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

type Department

type Department struct {
	ID         int    `json:"id"`
	Name       string `json:"name"`
	NumDevices int    `json:"num_devices"`
}

type Geolocation

type Geolocation struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	NumDevices int    `json:"num_devices"`
}

type Group

type Group struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

type Location

type Location struct {
	ID         int     `json:"id"`
	Name       string  `json:"name"`
	NumDevices int     `json:"num_devices"`
	Groups     []Group `json:"groups"`
}

Jump to

Keyboard shortcuts

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