templates

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TemplateData

type TemplateData map[string]interface{}

TemplateData represents the data structure for email templates

type TemplateService

type TemplateService struct {
	// contains filtered or unexported fields
}

TemplateService handles email template rendering

func NewTemplateService

func NewTemplateService() (*TemplateService, error)

NewTemplateService creates a new template service

func (*TemplateService) ListTemplates

func (ts *TemplateService) ListTemplates() []string

ListTemplates returns a list of available template names

func (*TemplateService) Use

func (ts *TemplateService) Use(templateName string, data TemplateData) (htmlContent, textContent string, err error)

Use renders a template with the given data and returns both HTML and text versions

func (*TemplateService) UseHTML

func (ts *TemplateService) UseHTML(templateName string, data TemplateData) (string, error)

UseHTML renders only the HTML version of a template

func (*TemplateService) UseText

func (ts *TemplateService) UseText(templateName string, data TemplateData) (string, error)

UseText renders only the text version of a template

Jump to

Keyboard shortcuts

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