constructor_injection

package
v0.0.0-...-7c18459 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpeakExample

func SpeakExample()

Types

type Dog

type Dog struct{}

func (Dog) Shout

func (d Dog) Shout() string

func (Dog) Speak

func (d Dog) Speak() string

type Mailer

type Mailer struct {
	Host     string
	Port     string
	Username string
	Password string
}

Mailer sends and receives emails

func (*Mailer) Receive

func (m *Mailer) Receive(address string) (string, error)

func (*Mailer) Send

func (m *Mailer) Send(to string, body string) error

type MailerInterface

type MailerInterface interface {
	Send(to string, body string) error
	Receive(address string) (string, error)
}

Mailer sends and receives emails

type Sender

type Sender interface {
	Send(to string, body string) error
}

type Talker

type Talker interface {
	Speak() string
	Shout() string
}

type WelcomeSender

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

WelcomeSender sends a Welcome email to new users

func NewWelcomeSender

func NewWelcomeSender(in *Mailer) (*WelcomeSender, error)

func NewWelcomeSenderNoGuard

func NewWelcomeSenderNoGuard(in *Mailer) *WelcomeSender

func (*WelcomeSender) Send

func (w *WelcomeSender) Send(to string) error

type WelcomeSenderV2

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

WelcomeSenderV2 sends a Welcome email to new users

func NewWelcomeSenderV2

func NewWelcomeSenderV2(in Sender) *WelcomeSenderV2

func (*WelcomeSenderV2) Send

func (w *WelcomeSenderV2) Send(to string) error

Jump to

Keyboard shortcuts

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