context

package
v3.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package context helps to populate the application context.

The main goal of the application context is to gather all the data which will be applied to a data-driven template.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrbitContext

type OrbitContext struct {
	// TemplateFilePath is the path of a data-driven template.
	TemplateFilePath string

	// Payload map contains data from various entries.
	Payload map[string]interface{}

	// Templates array contains the list of additional templates to parse.
	Templates []string

	// Optional pair of template delimiters (used to override go defaults "{{" and "}}")
	TemplateDelimiters []string
}

OrbitContext contains the data necessary for executing a data-driven template.

func NewOrbitContext

func NewOrbitContext(templateFilePath string, payload string, templates string, templateDelimiters []string) (*OrbitContext, error)

NewOrbitContext creates an instance of OrbitContext.

Jump to

Keyboard shortcuts

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