notify

package
v0.0.0-...-d9fb991 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailNotifier

type EmailNotifier struct {
	Settings *EmailSettings
	// contains filtered or unexported fields
}

func (*EmailNotifier) Initialize

func (e *EmailNotifier) Initialize()

func (*EmailNotifier) Notify

func (e *EmailNotifier) Notify(text string) error

func (*EmailNotifier) String

func (e *EmailNotifier) String() string

type EmailSettings

type EmailSettings struct {
	SMTP     string
	Port     int
	Username string
	Password string
	From     string
	To       []string
}

func (*EmailSettings) Validate

func (es *EmailSettings) Validate() error

type Initializer

type Initializer interface {
	Initialize()
}

Initializer is used to initialize something

type Notifier

type Notifier interface {
	// Notify sends text over notifier, returns error message if failed
	Notify(text string) error
}

Notifier is used to send messages

type Notifiers

type Notifiers []Notifier

func (Notifiers) NotifyAll

func (notifiers Notifiers) NotifyAll(text string)

type SmsNotifier

type SmsNotifier struct {
	Settings *SmsSettings
}

func (*SmsNotifier) Notify

func (s *SmsNotifier) Notify(text string) error

func (*SmsNotifier) String

func (s *SmsNotifier) String() string

type SmsSettings

type SmsSettings struct {
	Sms string `json:"sms"`
}

func (*SmsSettings) Validate

func (ss *SmsSettings) Validate() error

Jump to

Keyboard shortcuts

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