Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Body ¶
type Body struct { Name string // The name of the contacted person Intros []string // Intro sentences, first displayed in the email Dictionary []Entry // A list of key+value (useful for displaying parameters/settings/personal info) Table Table // Table is an table where you can put data (pricing grid, a bill, and so on) Actions []Action // Actions are a list of actions that the user will be able to execute via a button click Outros []string // Outro sentences, last displayed in the email Greeting string // Greeting for the contacted person (default to 'Hi') Signature string // Signature for the contacted person (default to 'Yours truly') Title string // Title replaces the greeting+name when set FreeMarkdown Markdown // Free markdown content that replaces all content other than header and footer }
Body is the body of the email, containing all interesting data
type Default ¶
type Default struct{}
Default is the theme by default
func (*Default) HTMLTemplate ¶
HTMLTemplate returns a Golang template that will generate an HTML email.
func (*Default) PlainTextTemplate ¶
PlainTextTemplate returns a Golang template that will generate an plain text email.
type Entry ¶
Entry is a simple entry of a map Allows using a slice of entries instead of a map Because Golang maps are not ordered
type Flat ¶
type Flat struct{}
Flat is a theme
func (*Flat) HTMLTemplate ¶
HTMLTemplate returns a Golang template that will generate an HTML email.
func (*Flat) PlainTextTemplate ¶
PlainTextTemplate returns a Golang template that will generate an plain text email.
type Hermes ¶
type Hermes struct { Theme Theme TextDirection TextDirection Product Product DisableCSSInlining bool }
Hermes is an instance of the hermes email generator
func (*Hermes) GenerateHTML ¶
GenerateHTML generates the email body from data to an HTML Reader This is for modern email clients
type Markdown ¶
Markdown is a HTML template (a string) representing Markdown content https://en.wikipedia.org/wiki/Markdown
type Product ¶
type Product struct { Name string Link string // e.g. https://matcornic.github.io Logo string // e.g. https://matcornic.github.io/img/logo.png Copyright string // Copyright © 2019 Hermes. All rights reserved. TroubleText string // TroubleText is the sentence at the end of the email for users having trouble with the button (default to `If you’re having trouble with the button '{ACTION}', copy and paste the URL below into your web browser.`) }
Product represents your company product (brand) Appears in header & footer of e-mails
type Table ¶
type Table struct { Data [][]Entry // Contains data Columns Columns // Contains meta-data for display purpose (width, alignement) }
Table is an table where you can put data (pricing grid, a bill, and so on)
type Template ¶
Template is the struct given to Golang templating Root object in a template is this struct
type TextDirection ¶
type TextDirection string
TextDirection of the text in HTML email
const TDLeftToRight TextDirection = "ltr"
TDLeftToRight is the text direction from left to right (default)
const TDRightToLeft TextDirection = "rtl"
TDRightToLeft is the text direction from right to left