template

package
v0.0.0-...-696a884 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2014 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package template contains methods for rendering templates and accompanying i18n definitions via RPC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

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

func New

func New(template string, tables []string, leftDelim, rightDelim string) (*Parser, error)

func (*Parser) Execute

func (t *Parser) Execute(origin, target string) string

type Request

type Request struct {
	Auth     string
	Template struct {
		Checksum string
		Path     string
		Data     string
	}
	Layout struct {
		Checksum string
		Path     string
		Data     string
	}
	Partials []struct {
		Checksum string
		Path     string
		Data     string
	}
	I18n struct {
		Origin string
		Target string
		Tables []struct {
			Checksum string
			Path     string
			Data     string
		}
	}
	Data map[string]interface{}
}

type Template

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

func (*Template) Render

func (t *Template) Render(p Request) (string, error)

func (*Template) Setup

func (t *Template) Setup(config *config.Config) error

Jump to

Keyboard shortcuts

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