context

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2017 License: MIT Imports: 7 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 the data-driven template.
	TemplateFilePath string

	// Values map contains data from YAML files.
	Values map[string]interface{}

	// EnvFiles map contains pairs from .env files.
	EnvFiles map[string]map[string]string

	// RawData contains data past directly in the CLI.
	RawData map[string]string

	// Os is the OS name at runtime.
	Os string
}

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

func NewOrbitContext

func NewOrbitContext(templateFilePath string, valuesFiles string, envFiles string, rawData string) (*OrbitContext, error)

NewOrbitContext instantiates a new OrbitContext.

type OrbitFileMap

type OrbitFileMap struct {
	// Name is the given name of the file.
	Name string

	// Path is the path of the file.
	Path string
}

OrbitFileMap represents a value given to some flags of generate and run commands. Flags: -v --values, -e --env Value format: name,path;name,path;...

Jump to

Keyboard shortcuts

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