Documentation
¶
Index ¶
- Constants
- func ExampleMessage(cfg config.Configuration, data util.ExampleData, eventSlug string) (cc.Message, error)
- func NewHandler() handlers.Handler
- func Normalize(cfg config.Configuration, hReq handlers.HandlerRequest) (cc.Message, error)
- func SplitTrimSpaceJoin(input string, sep1 string, sep2 string) string
- type OpsgenieOutAlert
- type OpsgenieOutEscalationNotify
- type OpsgenieOutMessage
- type OpsgenieOutSource
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 Normalize ¶
func Normalize(cfg config.Configuration, hReq handlers.HandlerRequest) (cc.Message, error)
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 ¶
Click to show internal directories.
Click to hide internal directories.