opsgenie

package
v0.8.15 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 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, hReq handlers.HandlerRequest) (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