template

package
v0.14.0-pre.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cache, _ = lru.New(16)

Functions

func LoadHTML

func LoadHTML(ctx context.Context, d templateDependencies, filesystem fs.FS, name, pattern string, model interface{}, remoteURL string) (string, error)

func LoadText

func LoadText(ctx context.Context, d templateDependencies, filesystem fs.FS, name, pattern string, model interface{}, remoteURL string) (string, error)

Types

type Config

type Config interface {
	CourierTemplatesRoot() string
	CourierTemplatesVerificationInvalid() *config.CourierEmailTemplate
	CourierTemplatesVerificationValid() *config.CourierEmailTemplate
	CourierTemplatesRecoveryInvalid() *config.CourierEmailTemplate
	CourierTemplatesRecoveryValid() *config.CourierEmailTemplate
}

type Dependencies

type Dependencies interface {
	CourierConfig() config.CourierConfigs
	HTTPClient(ctx context.Context, opts ...httpx.ResilientOptions) *retryablehttp.Client
}

type Template

type Template interface {
	Execute(wr io.Writer, data interface{}) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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