injector

package
v0.0.0-...-545971b Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 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 PluginInjector

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

PluginInjector represents a plugin injector.

func NewPlugininjector

func NewPlugininjector(logger ambient.AppLogger, plugins ambient.PluginSystem, sess ambient.AppSession, debugTemplates bool, escapeTemplates bool) *PluginInjector

NewPlugininjector returns a PluginInjector.

func (*PluginInjector) DebugTemplates

func (c *PluginInjector) DebugTemplates() bool

DebugTemplates returns true if the templates should output debugging information.

func (*PluginInjector) EscapeTemplates

func (c *PluginInjector) EscapeTemplates() bool

EscapeTemplates returns false if template escaping should be disabled.

func (*PluginInjector) Inject

func (c *PluginInjector) Inject(inject ambient.LayoutInjector, t *template.Template,
	r *http.Request, layoutType ambient.LayoutType, vars map[string]interface{}) (*template.Template, error)

Inject will return a template and an error.

Jump to

Keyboard shortcuts

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