pagerduty2test

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	Src  string `json:"src"`
	Href string `json:"href"`
	Alt  string `json:"alt"`
}

Image is the struct of elements for an image in the payload

type Link struct {
	Href string `json:"href"`
	Text string `json:"text"`
}

Link is the struct of elements for a link in the payload

type PDCEF

type PDCEF struct {
	Summary       string                 `json:"summary"`
	Source        string                 `json:"source"`
	Severity      string                 `json:"severity"`
	Timestamp     string                 `json:"timestamp"`
	Class         string                 `json:"class"`
	Component     string                 `json:"component"`
	Group         string                 `json:"group"`
	CustomDetails map[string]interface{} `json:"custom_details"`
}

type PostData

type PostData struct {
	RoutingKey  string  `json:"routing_key"`
	EventAction string  `json:"event_action"`
	DedupKey    string  `json:"dedup_key"`
	Payload     *PDCEF  `json:"payload"`
	Images      []Image `json:"images"`
	Links       []Link  `json:"links"`
	Client      string  `json:"client"`
	ClientURL   string  `json:"client_url"`
}

PostData is the default struct to send an element through to PagerDuty

type Request

type Request struct {
	URL      string
	PostData PostData
}

type Server

type Server struct {
	URL string
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

func (*Server) Close

func (s *Server) Close()

func (*Server) Requests

func (s *Server) Requests() []Request

Jump to

Keyboard shortcuts

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