send

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 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 Email

type Email struct {
	Subject     string
	Body        *template.Template
	SenderName  string
	SenderEmail string
}

func (Email) Render

func (e Email) Render(gifter, giftee Participant) (string, error)

type Emailer

type Emailer interface {
	SendEmail(gifter, giftee Participant, emailTemplate *Email) error
}

type Participant

type Participant struct {
	Name      string
	Email     string
	Interests []string
	Partner   string
}

type ParticipantLoader

type ParticipantLoader interface {
	LoadParticipants(path string) (Participants, error)
}

type Participants

type Participants map[string]Participant

type Sender

type Sender struct {
	Emailer           Emailer
	ParticipantLoader ParticipantLoader
	EmailTemplate     *Email
}

func (*Sender) Send

func (s *Sender) Send(path string) error

Jump to

Keyboard shortcuts

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