Documentation
¶
Overview ¶
Package victorops provides a Go client for the VictorOps API
Index ¶
- type Client
- func (c *Client) Ack(message string, incidentIDs ...string) ([]IncidentStateResult, error)
- func (c *Client) CreateIncident(summary, details string, targets []Target) (incident CreatedIncident, err error)
- func (c *Client) Incidents() (incidents []Incident, err error)
- func (c *Client) Resolve(message string, incidentIDs ...string) ([]IncidentStateResult, error)
- type CreatedIncident
- type Incident
- type IncidentStateResult
- type Target
- type Transition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client for the VictorOps API
func (*Client) Ack ¶
func (c *Client) Ack(message string, incidentIDs ...string) ([]IncidentStateResult, error)
Ack one or more incidents
func (*Client) CreateIncident ¶
func (c *Client) CreateIncident(summary, details string, targets []Target) (incident CreatedIncident, err error)
CreateIncident Create a new incident.
type CreatedIncident ¶
type CreatedIncident struct { Number string `json:"incidentNumber,ommitempty"` Error string `json:"error,ommitempty"` }
CreatedIncident is an incident that was just created
type Incident ¶
type Incident struct { AlertCount int `json:",omitempty"` CurrentPhase string `json:",omitempty"` EntityDisplayName string `json:",omitempty"` EntityID string `json:",omitempty"` EntityState string `json:",omitempty"` EntityType string `json:",omitempty"` Host string `json:",omitempty"` IncidentNumber string `json:",omitempty"` LastAlertID string `json:",omitempty"` LastAlertTime time.Time `json:",omitempty"` Service string `json:",omitempty"` StartTime time.Time `json:",omitempty"` PagedTeams []string `json:",omitempty"` PagedUsers []string `json:",omitempty"` Transitions []Transition `json:",omitempty"` }
Incident represents an incident on victorops
type IncidentStateResult ¶
type IncidentStateResult struct { Number string `json:"incidentNumber,ommitempty"` ID string `json:"entityId,ommitempty"` Accepted bool `json:"cmdAccepted"` Message string `json:"message,ommitempty"` }
IncidentStateResult represents a ACK or Resolve event on an incident
type Transition ¶
type Transition struct { Name string `json:",omitempty"` At time.Time `json:",omitempty"` Message string `json:",omitempty"` By string `json:",omitempty"` Manually bool AlertID string `json:"alertId,omitempty"` AlertURL string `json:"alertUrl,omitempty"` }
Transition represents a state changes of an incident
Click to show internal directories.
Click to hide internal directories.