notifier

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

type Notifier struct {
	// contains filtered or unexported fields
}

Notifier handles sending of notifications

func New

func New(slackToken string, ui ui.UI, iMap map[string]string) *Notifier

New will construct a new Notifier and return i

func (*Notifier) Recipient

func (n *Notifier) Recipient(notification policy.Notification, v policy.Violation) (string, bool, error)

Recipient is here because it requires querying slack. Second parameter will be true if the recipient is a channel, otherwise a user/IM.

func (*Notifier) Send

func (n *Notifier) Send(v policy.Violation) error

Send will transmit all violations for the given violation

Jump to

Keyboard shortcuts

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