templates

package
v4.3.1-rc3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package templates defines ready-to-use templates to send email in a nice formatting.

It is based on the Hermes package, and other services can use some specific templates Ids when sending emails to apply the formatting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTemplateWithId

func BuildTemplateWithId(user *mailer.User, templateId string, templateData map[string]string, languages ...string) (subject string, body hermes.Body)

func GetHermes

func GetHermes(languages ...string) hermes.Hermes

func RegisterTemplateFilter

func RegisterTemplateFilter(filterFunc FilterFunc)

Types

type ApplicationConfigs

type ApplicationConfigs struct {
	Title              string
	Url                string
	LinkUrl            string
	From               string
	FromName           string
	FromCtl            string
	Copyright          string
	TroubleText        string
	Greeting           string
	Signature          string
	Theme              hermes.Theme
	ButtonsColor       string
	DisableCSSInlining bool
}

func GetApplicationConfig

func GetApplicationConfig(languages ...string) ApplicationConfigs

type FilterFunc

type FilterFunc func(configs ApplicationConfigs) ApplicationConfigs

Jump to

Keyboard shortcuts

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