template

package
v0.4.0-beta1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2014 License: MIT Imports: 17 Imported by: 156

Documentation

Overview

Copyright (c) 2013 Kelsey Hightower. All rights reserved. Use of this source code is governed by the Apache License, Version 2.0 that can be found in the LICENSE file.

Copyright (c) 2013 Kelsey Hightower. All rights reserved. Use of this source code is governed by the Apache License, Version 2.0 that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessTemplateResources

func ProcessTemplateResources(s StoreClient) []error

ProcessTemplateResources is a convenience function that loads all the template resources and processes them serially. Called from main. It returns a list of errors if any.

Types

type StoreClient added in v0.4.0

type StoreClient interface {
	GetValues(keys []string) (map[string]interface{}, error)
}

StoreClient is used to swap out the

type TemplateResource

type TemplateResource struct {
	Dest      string
	FileMode  os.FileMode
	Gid       int
	Keys      []string
	Mode      string
	Uid       int
	ReloadCmd string `toml:"reload_cmd"`
	CheckCmd  string `toml:"check_cmd"`
	StageFile *os.File
	Src       string
	Vars      map[string]interface{}
	// contains filtered or unexported fields
}

TemplateResource is the representation of a parsed template resource.

func NewTemplateResourceFromPath

func NewTemplateResourceFromPath(path string, s StoreClient) (*TemplateResource, error)

NewTemplateResourceFromPath creates a TemplateResource using a decoded file path and the supplied StoreClient as input. It returns a TemplateResource and an error if any.

type TemplateResourceConfig

type TemplateResourceConfig struct {
	TemplateResource TemplateResource `toml:"template"`
}

TemplateResourceConfig holds the parsed template resource.

Jump to

Keyboard shortcuts

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