view

package
v1.0.0-dev.9 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSRenderer

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

func NewFSRenderer

func NewFSRenderer(fs fs.FS) *FSRenderer

func (*FSRenderer) Render

func (r *FSRenderer) Render(w io.Writer, name string, element email.TemplateElement, data any) error

type View

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

View is a template used to render email messages.

func Parse

func Parse(fs fs.FS, name string) (*View, error)

Parse parses the file system and returns a view for the given name. fs is expected to contain *.tmpl files in the root directory.

func (*View) Render

func (v *View) Render(w io.Writer, element email.TemplateElement, data any) error

Jump to

Keyboard shortcuts

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