templates

package
v1.84.2 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFontFamily      = "-apple-system, BlinkMacSystemFont, Segoe UI, Lato, Arial, Helvetica, sans-serif"
	DefaultFontColor       = "#22292f"
	DefaultBackgroundColor = "#fafafa"
	DefaultPrimaryColor    = "#5282C1"
)

Variables

This section is empty.

Functions

func GetParsedTemplate

func GetParsedTemplate(mailhtml string, contentData interface{}) (string, error)

func ParseTemplateFile

func ParseTemplateFile(mailhtml string, data interface{}) (string, error)

func ParseTemplateText

func ParseTemplateText(text string, data interface{}) (string, error)

Types

type TemplateData

type TemplateData struct {
	Title           string
	PreHeader       string
	Subject         string
	Greeting        string
	Text            string
	Href            string
	ButtonText      string
	PrimaryColor    string
	BackgroundColor string
	FontColor       string
	LogoURL         string
	FontURL         string
	FontFaceFamily  string
	FontFamily      string

	IncludeFooter bool
	FooterText    string
}

func (*TemplateData) Translate

func (data *TemplateData) Translate(translator *i18n.Translator, msgType string, args map[string]interface{}, langs ...string)

Jump to

Keyboard shortcuts

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