api

package
v1.9.0-RC2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup()

Setup - initialize global state

Types

type API

type API struct{}

API has all of the handlers as receiver methods.

func (API) DeliverAlert

DeliverAlert sends a specific alert to the specified destinations.

func (API) DispatchAlerts

func (API) DispatchAlerts(input []*deliveryModels.DispatchAlertsInput) (interface{}, error)

DispatchAlerts - Sends an alert to sends a specific alert to the specified destinations.

func (API) SendTestAlert

SendTestAlert sends a dummy alert to the specified destinations.

type AlertOutputMap

type AlertOutputMap map[*deliveryModels.Alert][]*outputModels.AlertOutput

AlertOutputMap is a type alias for containing the outputIds that an alert should be delivered to

type DispatchStatus

type DispatchStatus struct {
	Alert        deliveryModels.Alert
	OutputID     string
	Message      string
	StatusCode   int
	Success      bool
	NeedsRetry   bool
	DispatchedAt time.Time
}

DispatchStatus holds info about which alert was sent to a given destination with its response status

Jump to

Keyboard shortcuts

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