template

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package template handles template parsing and execution.

Index

Constants

This section is empty.

Variables

View Source
var (
	JavascriptBundleChecksums map[string]string
	JavascriptBundles         map[string][]byte
)

Static assets.

Functions

func GenerateJavascriptBundles added in v0.11.0

func GenerateJavascriptBundles() error

GenerateJavascriptBundles creates JS bundles.

func LoadImageFile added in v0.11.0

func LoadImageFile(filename string) ([]byte, error)

LoadImageFile loads an embed image file.

func Path added in v0.11.0

func Path(router *mux.Router, name string, args ...interface{}) string

Path returns the defined route based on given arguments.

Types

type Collect

type Collect struct {
	Slot string `json:"slot"`
	Src  string `json:"src"`
	Dst  string `json:"dst"`
}

Collect archived struct

type Collector

type Collector []Collect

Collector represents a group of Collect.

type Template added in v0.11.0

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

Template handles the templating system.

func New added in v0.11.0

func New(router *mux.Router) *Template

New returns a new template engine.

func (*Template) ParseTemplates added in v0.11.0

func (t *Template) ParseTemplates() error

ParseTemplates parses template files embed into the application.

func (*Template) Render added in v0.11.0

func (t *Template) Render(name string, data interface{}) ([]byte, bool)

Render template with Collector

Directories

Path Synopsis
Package render handles template parsing and execution for services.
Package render handles template parsing and execution for services.

Jump to

Keyboard shortcuts

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