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) 2014 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 ¶
View Source
var ErrEmptySrc = errors.New("empty src template")
Functions ¶
func ProcessTemplateResources ¶
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 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 New ¶ added in v0.6.0
func New(path string, config Config) (*TemplateResource, error)
New creates a TemplateResource.
func (*TemplateResource) GetSibling ¶ added in v0.6.0
func (*TemplateResource) UnmarshalJsonArray ¶ added in v0.6.0
func (t *TemplateResource) UnmarshalJsonArray(data string) ([]interface{}, error)
func (*TemplateResource) UnmarshalJsonObject ¶ added in v0.6.0
func (t *TemplateResource) UnmarshalJsonObject(data string) (map[string]interface{}, error)
type TemplateResourceConfig ¶
type TemplateResourceConfig struct {
TemplateResource TemplateResource `toml:"template"`
}
TemplateResourceConfig holds the parsed template resource.
Click to show internal directories.
Click to hide internal directories.