api

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: AGPL-3.0 Imports: 28 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(ctx context.Context, input []*deliverymodel.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[*deliverymodel.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        deliverymodel.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