apteligent

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DisplayName      = "Apteligent"
	HandlerKey       = "apteligent"
	MessageDirection = "out"
)

Variables

This section is empty.

Functions

func ExampleMessage

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

func Normalize

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

Types

type ApteligentOutMessage

type ApteligentOutMessage struct {
	ThresholdValue   string `json:"threshold_value,omitempty"`
	TriggeringValue  string `json:"triggering_value,omitempty"`
	IncidentTime     string `json:"incident_time,omitempty"`
	Description      string `json:"description,omitempty"`
	Metric           string `json:"metric,omitempty"`
	CrittercismAppId string `json:"crittercism_app_id,omitempty"`
	TriggerId        string `json:"trigger_id,omitempty"`
	State            string `json:"state,omitempty"`
	AlertURL         string `json:"alert_url,omitempty"`
	Filters          string `json:"filters,omitempty"`
	ApplicationName  string `json:"application_name,omitempty"`
}

func ApteligentOutMessageFromBytes

func ApteligentOutMessageFromBytes(bytes []byte) (ApteligentOutMessage, error)
{
    "threshold_value":"1",
    "description":"The Crashes alert on Crittercism was resolved at 06:40 PM UTC.",
    "metric":"Crashes",
    "crittercism_app_id":"54aab27451de5e9f042ec7ee",
    "trigger_id":"54aabecc1787845ae400000f",
    "state":"RESOLVED",
    "alert_url":"https://app.crittercism.com/developers/alerts/54aab27451de5e9f042ec7ee?alertId=54aabecc1787845ae400000f",
    "filters":"{}",
    "application_name":"Crittercism"
}
{
    "threshold_value":"1",
    "triggering_value":"4",
    "incident_time":"2015-01-05T18:15:56.976000",
    "description":"Alert on Crittercism at 06:15 PM UTC. Crashes threshold 4 exceeds 1.",
    "metric":"Crashes",
    "crittercism_app_id":"54aab27451de5e9f042ec7ee",
    "trigger_id":"54aabecc1787845ae400000f",
    "state":"TRIGGERED",
    "alert_url":"https://app.crittercism.com/developers/alerts/54aab27451de5e9f042ec7ee?incidentId=54aad4dcf39917103e0041b6",
    "filters":"{}",
    "application_name":"Crittercism"
}

type Handler

type Handler struct {
	Config  config.Configuration
	Adapter adapters.Adapter
}

FastHttp request handler for Travis CI outbound webhook

func NewHandler

func NewHandler(cfg config.Configuration, adapter adapters.Adapter) Handler

FastHttp request handler constructor for Travis CI outbound webhook

func (*Handler) HandleFastHTTP

func (h *Handler) HandleFastHTTP(ctx *fasthttp.RequestCtx)

HandleFastHTTP is the method to respond to a fasthttp request.

func (Handler) HandlerKey

func (h Handler) HandlerKey() string

func (Handler) MessageDirection

func (h Handler) MessageDirection() string

Jump to

Keyboard shortcuts

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