package
0.0.0-20190825012407-d8a292982254
Repository: https://github.com/bestrobotics/registry.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

Initialize invokes the factory specified by the viper token "mailer" and returns the result of this call.
NewLetter creates a new letter with the from address filled in automatically.
Register is called by external implementations of the mailer interface to be made available in the registry.
RenderLetter loads a file containing the text of letters and templates it into the provided letter template.
UserToAddress composes the address for a user and returns filled in struct.

# Variables

ErrInternal is a catch all for things that are unforseen.
ErrNoSuchLetter is returned if a templated letter is requested but isn't known to the system.
ErrUnknownMailer is returned if a mailer is requested but isn't known to the system.

# Structs

A Letter here means the same thing it does in the real world.
A LetterContext is everything that's needed to pass into RenderLetter in order to generate a letter ready to send.

# Interfaces

A Mailer implements the components needed to send email to a various persons.

# Type aliases

A Factory returns a configured mailer that is ready to use.