opsgenie

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DisplayName          = "OpsGenie"
	HandlerKey           = "opsgenie"
	MessageDirection     = "out"
	AlertURLFormat       = "https://app.opsgenie.com/alert/V2#/show/%s"
	UserProfileURLFormat = "https://app.opsgenie.com/user/profile#/user/%s"
	MessageBodyType      = models.JSON
)

Variables

This section is empty.

Functions

func ExampleMessage

func ExampleMessage(cfg config.Configuration, data util.ExampleData, eventSlug string) (cc.Message, error)

func NewHandler

func NewHandler() handlers.Handler

func Normalize

func Normalize(cfg config.Configuration, bytes []byte) (cc.Message, error)

func SplitTrimSpaceJoin

func SplitTrimSpaceJoin(input string, sep1 string, sep2 string) string

Types

type OpsgenieOutAlert

type OpsgenieOutAlert struct {
	UpdatedAt   int64    `json:"updatedAt,omitempty"`
	Tags        []string `json:"tags,omitempty"`
	Teams       []string `json:"teams,omitempty"`
	Recipients  []string `json:"recipients,omitempty"`
	Message     string   `json:"message,omitempty"`
	Username    string   `json:"username,omitempty"`
	AlertId     string   `json:"alertId,omitempty"`
	Source      string   `json:"source,omitempty"`
	Alias       string   `json:"alias,omitempty"`
	TinyId      string   `json:"tinyId,omitempty"`
	CreatedAt   int64    `json:"createdAt,omitempty"`
	UserId      string   `json:"userId,omitempty"`
	Entity      string   `json:"entity,omitempty"`
	Owner       string   `json:"owner,omitempty"`
	AddedTags   string   `json:"addedTags,omitempty"`
	RemovedTags string   `json:"removedTags,omitempty"`
	Note        string   `json:"note,omitempty"`
	Recipient   string   `json:"recipient,omitempty"`
	Team        string   `json:"team,omitempty"`
}

func (*OpsgenieOutAlert) AlertURL

func (alert *OpsgenieOutAlert) AlertURL() string

func (*OpsgenieOutAlert) TagsFormatted

func (alert *OpsgenieOutAlert) TagsFormatted() string

func (*OpsgenieOutAlert) UserURL

func (alert *OpsgenieOutAlert) UserURL() string

type OpsgenieOutEscalationNotify

type OpsgenieOutEscalationNotify struct {
	Name   string `json:"name,omitempty"`
	Id     string `json:"id,omitempty"`
	Type   string `json:"type,omitempty"`
	Entity string `json:"entity,omitempty"`
}

func (*OpsgenieOutEscalationNotify) URL

func (alert *OpsgenieOutEscalationNotify) URL() string

type OpsgenieOutMessage

type OpsgenieOutMessage struct {
	Source           OpsgenieOutSource           `json:"source,omitempty"`
	Alert            OpsgenieOutAlert            `json:"alert,omitempty"`
	Action           string                      `json:"action,omitempty"`
	IntegrationId    string                      `json:"integrationId,omitempty"`
	IntegrationName  string                      `json:"integrationName,omitempty"`
	EscalationNotify OpsgenieOutEscalationNotify `json:"escalationNotify,omitempty"`
}

func OpsgenieOutMessageFromBytes

func OpsgenieOutMessageFromBytes(bytes []byte) (OpsgenieOutMessage, error)

type OpsgenieOutSource

type OpsgenieOutSource struct {
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`
}

Jump to

Keyboard shortcuts

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