report

package
v0.0.0-...-90b0448 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package report provides APIs for generating incident reports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(request GenerateRequest) (string, error)

Generate generates an incident report for the specified team and time range. It fetches incidents from Datadog, pages from PagerDuty, and then associates pages with incidents and generates a markdown report.

func Upload

func Upload(request UploadRequest) error

Upload creates a new Confluence page with the given details

Types

type GenerateRequest

type GenerateRequest struct {
	// Name of Datadog team
	Team string
	// Name of PagerDuty team
	PdTeam string
	// Start date of the report, in the format "YYYY-MM-DD" i.e. time.DateOnly
	Since string
	// End date of the report, in the format "YYYY-MM-DD" i.e. time.DateOnly
	Until string
	// Tag filters to use when fetching PagerDuty pages
	TagFilters []string
	// PagerDuty API token to use when fetching pages
	AuthToken string
	// PagerDuty page urgency
	Urgency string
	// Replacement regex to apply to PagerDuty page titles
	Replace []string
	// Datadog API key to use when fetching incidents
	DdApiKey string
	// Datadog application key to use when fetching incidents
	DdAppKey string
}

type UploadRequest

type UploadRequest struct {
	ConfluenceSubdomain string
	ConfluenceUsername  string
	ConfluenceToken     string
	SpaceKey            string
	ParentId            string
	MarkdownContent     string
}

Jump to

Keyboard shortcuts

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