template

package
v0.0.0-...-d08e724 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	TemplateDir string
}

func (*Module) NewModuleInstance

func (m *Module) NewModuleInstance(runtime *goja.Runtime) js.Instance

func (*Module) Register

func (m *Module) Register(runtime *goja.Runtime) error

type ModuleInstance

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

func (*ModuleInstance) Exports

func (m *ModuleInstance) Exports() js.Exports

func (*ModuleInstance) NewTemplate

func (m *ModuleInstance) NewTemplate(call goja.ConstructorCall) *goja.Object

type Template

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

func (*Template) Execute

func (t *Template) Execute() string

func (*Template) RegisterFunc

func (t *Template) RegisterFunc(name string, fn goja.Callable)

func (*Template) Set

func (t *Template) Set(name string, val any)

func (*Template) TemplateName

func (t *Template) TemplateName() string

Jump to

Keyboard shortcuts

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