pagerduty

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const URL = "https://api.pagerduty.com/incidents"

Variables

This section is empty.

Functions

func CreateIncident

func CreateIncident(incident Incident) (string, error)

func UpdateIncident

func UpdateIncident(id string) error

Types

type Body

type Body struct {
	Type    string `json:"type"`
	Details string `json:"details"`
}

type Error

type Error struct {
	Error PagerDutyError `json:"error"`
}

type Incident

type Incident struct {
	Incident PagerDutyIncident `json:"incident"`
}

type PagerDutyError

type PagerDutyError struct {
	Message string   `json:"message"`
	Code    int      `json:"code"`
	Errors  []string `json:"errors"`
}

type PagerDutyIncident

type PagerDutyIncident struct {
	Id      string  `json:"id"`
	Type    string  `json:"type"`
	Title   string  `json:"title"`
	Urgency string  `json:"urgency"`
	Status  string  `json:"status"`
	Body    Body    `json:"body"`
	Service Service `json:"service"`
}

type Service

type Service struct {
	Id   string `json:"id"`
	Type string `json:"type"`
}

Jump to

Keyboard shortcuts

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