notification

package
v0.0.2-alpha1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReceivedPayload EventType = 1
	Failure         Status    = 0
	Success         Status    = 1
)

Constants defined for notification delivery.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	GetReceiveEventNotificationEndpoint() string
}

Config defines methods required for this package.

type EventType

type EventType int

EventType is the type of the notification.

type Sender

type Sender interface {
	Send(notification *notificationpb.NotificationMessage) (Status, error)
}

Sender defines methods that can handle a notification.

func NewWebhookSender

func NewWebhookSender(config Config) Sender

NewWebhookSender returns an implementation of a Sender that sends notifications through webhooks.

type Status

type Status int

Status defines the status of the notification.

Jump to

Keyboard shortcuts

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