notify

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: Apache-2.0 Imports: 24 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 *service.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  string
	CreditTotal string

	BatchCount int
	EntryCount int
}

type Message

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

type MockSender

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

func (*MockSender) CapturedMessage

func (s *MockSender) CapturedMessage() *Message

func (*MockSender) Critical

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

func (*MockSender) CriticalWasCalled

func (s *MockSender) CriticalWasCalled() bool

func (*MockSender) Info

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

func (*MockSender) InfoWasCalled

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 *service.Notifications, notifiers *service.UploadNotifiers) (*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 *service.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

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 *service.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