template

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2015 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptySrc = errors.New("empty src template")

Functions

func Process

func Process(config Config) error

func UnmarshalJsonArray

func UnmarshalJsonArray(data string) ([]interface{}, error)

func UnmarshalJsonObject

func UnmarshalJsonObject(data string) (map[string]interface{}, error)

Types

type Config

type Config struct {
	ConfDir       string
	ConfigDir     string
	KeepStageFile bool
	Noop          bool
	Prefix        string
	StoreClient   backends.StoreClient
	TemplateDir   string
}

type Processor

type Processor interface {
	Process()
}

func IntervalProcessor

func IntervalProcessor(config Config, stopChan, doneChan chan bool, errChan chan error, interval int) Processor

func WatchProcessor

func WatchProcessor(config Config, stopChan, doneChan chan bool, errChan chan error) Processor

type TemplateResource

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

TemplateResource is the representation of a parsed template resource.

func NewTemplateResource

func NewTemplateResource(path string, config Config) (*TemplateResource, error)

NewTemplateResource creates a TemplateResource.

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