Documentation
¶
Index ¶
- Constants
- func ExampleMessage(cfg config.Configuration, data util.ExampleData, eventSlug string) (cc.Message, error)
- func Normalize(cfg config.Configuration, bytes []byte) (cc.Message, error)
- type ApteligentOutMessage
- type Handler
- func (h Handler) HandleCanonical(hookData models.HookData) []models.ErrorInfo
- func (h Handler) HandleEawsyLambda(event *apigatewayproxyevt.Event, ctx *runtime.Context) (models.AwsAPIGatewayProxyOutput, error)
- func (h Handler) HandleFastHTTP(ctx *fasthttp.RequestCtx)
- func (h Handler) HandlerKey() string
- func (h Handler) MessageDirection() string
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)
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 ¶
FastHttp request handler for Travis CI outbound webhook
func NewHandler ¶
func NewHandler(cfg config.Configuration, adapterSet adapters.AdapterSet) Handler
FastHttp request handler constructor for outbound webhook
func (Handler) HandleCanonical ¶ added in v0.2.0
HandleCanonical is the method to handle a processed request.
func (Handler) HandleEawsyLambda ¶ added in v0.2.0
func (h Handler) HandleEawsyLambda(event *apigatewayproxyevt.Event, ctx *runtime.Context) (models.AwsAPIGatewayProxyOutput, error)
func (Handler) HandleFastHTTP ¶
func (h Handler) HandleFastHTTP(ctx *fasthttp.RequestCtx)
HandleFastHTTP is the method to respond to a fasthttp request.
func (Handler) HandlerKey ¶
func (Handler) MessageDirection ¶
Click to show internal directories.
Click to hide internal directories.