templateprocessors

package
v0.0.0-...-d2d06f5 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2018 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

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

Env contains regular expression to look for and function to pull variables from env

func NewEnv

func NewEnv(lookupEnv LookupEnv) Env

NewEnv creates an env parser

func (Env) Process

func (e Env) Process(b []byte) []byte

Process replaces templated variables with variables from the environment TODO not sure about the type conversions, favoring strings for ease of logging but probably an easier way anyhow

type GenUUID

type GenUUID func() uuid.UUID

GenUUID a function to return a new UUID

type LookupEnv

type LookupEnv func(key string) (string, bool)

LookupEnv fetches a key from the environment

type UUID

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

UUID contains the regex to use to find UUID's a function to generate UUIDs

func NewUUID

func NewUUID(genFn GenUUID) UUID

NewUUID creates a new UUID template processor

func (UUID) Process

func (u UUID) Process(b []byte) []byte

Process applies the UUID substitutions

Jump to

Keyboard shortcuts

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