notifiers

package
v0.0.0-...-99409e2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2018 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mailer

type Mailer interface {
	SendHTML(from string, recipients, cc, bcc []string, subject string, body string) error
}

func NewMailerFromConfig

func NewMailerFromConfig(config *MailerConfig) Mailer

type MailerConfig

type MailerConfig struct {
	SMTP *SMTPConfig `yaml:"smtp"`
}

type Notifier

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

func NewNotifier

func NewNotifier(appBaseURL, fromEmail string, mailer Mailer) *Notifier

func (*Notifier) SharePlaylist

func (n *Notifier) SharePlaylist(spotifyClient *spotify.SpotifyClient, inviteeEmail string, playlist *spotify.Playlist) error

func (*Notifier) SubscriptionUpdate

func (n *Notifier) SubscriptionUpdate(spotifyClient *spotify.SpotifyClient, activities []*model.Activity) error

type SESMailer

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

func NewSESMailer

func NewSESMailer() *SESMailer

func (*SESMailer) SendHTML

func (s *SESMailer) SendHTML(from string, recipients, cc, bcc []string, subject string, body string) error

type SMTPConfig

type SMTPConfig struct {
	Host     string `yaml:"host"`
	UserName string `yaml:"user_name"`
	Password string `yaml:"password"`
}

type SMTPMailer

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

func NewSMTPMailer

func NewSMTPMailer(config *SMTPConfig) *SMTPMailer

func (*SMTPMailer) SendHTML

func (s *SMTPMailer) SendHTML(from string, recipients, cc, bcc []string, subject string, body string) error

Jump to

Keyboard shortcuts

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