js

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

README

Prudence: JavaScript

See the generated API documentation.

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewEnvironment

func NewEnvironment(urlContext *urlpkg.Context, path []urlpkg.URL, arguments map[string]string) *js.Environment

Types

type ConsoleAPI

type ConsoleAPI struct{}

func (ConsoleAPI) Log

func (self ConsoleAPI) Log(message string)

type PrudenceAPI

type PrudenceAPI struct {
	js.UtilAPI
	js.FormatAPI
	js.FileAPI

	Arguments       map[string]string
	Log             logging.Logger
	JsContext       *js.Context
	DefaultNotFound rest.Handler
}

func NewPrudenceAPI

func NewPrudenceAPI(urlContext *urlpkg.Context, jsContext *js.Context, arguments map[string]string) *PrudenceAPI

func (*PrudenceAPI) EscapeHtml added in v1.0.1

func (self *PrudenceAPI) EscapeHtml(text string) string

func (*PrudenceAPI) InvalidateCacheGroup

func (self *PrudenceAPI) InvalidateCacheGroup(group string)

func (*PrudenceAPI) LoadBytes added in v1.0.2

func (self *PrudenceAPI) LoadBytes(id string) ([]byte, error)

func (*PrudenceAPI) LoadString

func (self *PrudenceAPI) LoadString(id string) (string, error)

func (*PrudenceAPI) Render

func (self *PrudenceAPI) Render(content string, renderer string) (string, error)

func (*PrudenceAPI) SetCache

func (self *PrudenceAPI) SetCache(cacheBackend platform.CacheBackend)

func (*PrudenceAPI) Start

func (self *PrudenceAPI) Start(startables interface{}) error

func (*PrudenceAPI) UnescapeHtml added in v1.0.1

func (self *PrudenceAPI) UnescapeHtml(text string) string

Jump to

Keyboard shortcuts

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