template

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 14 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 Dependencies

type Dependencies interface {
	CourierConfig() config.CourierConfigs
	x.HTTPClientProvider
}

type Template

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

type TemplateType added in v1.1.0

type TemplateType string

A Template's type

swagger:enum TemplateType

const (
	TypeRecoveryInvalid         TemplateType = "recovery_invalid"
	TypeRecoveryValid           TemplateType = "recovery_valid"
	TypeRecoveryCodeInvalid     TemplateType = "recovery_code_invalid"
	TypeRecoveryCodeValid       TemplateType = "recovery_code_valid"
	TypeVerificationInvalid     TemplateType = "verification_invalid"
	TypeVerificationValid       TemplateType = "verification_valid"
	TypeVerificationCodeInvalid TemplateType = "verification_code_invalid"
	TypeVerificationCodeValid   TemplateType = "verification_code_valid"
	TypeTestStub                TemplateType = "stub"
	TypeLoginCodeValid          TemplateType = "login_code_valid"
	TypeRegistrationCodeValid   TemplateType = "registration_code_valid"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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