notify

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Direction

type Direction string
const (
	Upload   Direction = "upload"
	Download Direction = "download"
)

type Email

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

func NewEmail

func NewEmail(cfg *config.Email) (*Email, error)

func (*Email) Critical

func (mailer *Email) Critical(msg *Message) error

func (*Email) Info

func (mailer *Email) Info(msg *Message) error

type EmailTemplateData

type EmailTemplateData struct {
	CompanyName string // e.g. Moov
	Verb        string // e.g. upload, download
	Filename    string // e.g. 20200529-131400.ach
	Hostname    string

	DebitTotal  float64
	CreditTotal float64

	BatchCount int
	EntryCount int
}

type Message

type Message struct {
	Direction Direction
	Filename  string
	File      *ach.File
	Hostname  string
}

type MockSender added in v0.9.0

type MockSender struct {
	Err error
	// contains filtered or unexported fields
}

func (*MockSender) CapturedMessage added in v0.9.0

func (s *MockSender) CapturedMessage() *Message

func (*MockSender) Critical added in v0.9.0

func (s *MockSender) Critical(msg *Message) error

func (*MockSender) CriticalWasCalled added in v0.9.0

func (s *MockSender) CriticalWasCalled() bool

func (*MockSender) Info added in v0.9.0

func (s *MockSender) Info(msg *Message) error

func (*MockSender) InfoWasCalled added in v0.9.0

func (s *MockSender) InfoWasCalled() bool

type MultiSender

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

MultiSender is a Sender which will attempt to send each Message to every included Sender and returns the first error encountered.

func NewMultiSender

func NewMultiSender(logger log.Logger, cfg *config.PipelineNotifications) (*MultiSender, error)

func (*MultiSender) Critical

func (ms *MultiSender) Critical(msg *Message) error

func (*MultiSender) Info

func (ms *MultiSender) Info(msg *Message) error

type PagerDuty

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

func NewPagerDuty

func NewPagerDuty(cfg *config.PagerDuty) (*PagerDuty, error)

func (*PagerDuty) Critical

func (pd *PagerDuty) Critical(msg *Message) error

func (*PagerDuty) Info

func (pd *PagerDuty) Info(msg *Message) error

func (*PagerDuty) Ping added in v0.9.0

func (pd *PagerDuty) Ping() error

type Sender

type Sender interface {
	Info(msg *Message) error
	Critical(msg *Message) error
}

type Slack

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

func NewSlack

func NewSlack(cfg *config.Slack) (*Slack, error)

func (*Slack) Critical

func (s *Slack) Critical(msg *Message) error

func (*Slack) Info

func (s *Slack) Info(msg *Message) error

Jump to

Keyboard shortcuts

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