Documentation
¶
Index ¶
- Constants
- Variables
- func Render(basedir string, options *RenderOptions) error
- func RenderString(data map[string]interface{}, template string) (string, error)
- func Report(paths ...string) (map[string]interface{}, error)
- type InfluxdbPayload
- type RenderOptions
- type Reporter
- type ReporterKeyFormat
- type Trigger
- type Tuple
- type TupleSet
Constants ¶
View Source
const Version = `0.8.2`
Variables ¶
View Source
var InfluxdbTagValueCharCompress = regexp.MustCompile(`[\s,]+`)
View Source
var InfluxdbTagValueCharFilter = regexp.MustCompile(`\s{2,}`)
View Source
var OptionsFile = `sysfact.yaml`
View Source
var RenderAsTemplatePrefix = `@`
View Source
var RenderPatterns = []string{
`any/any`,
`any/${arch}`,
`${os.platform}/any`,
`${os.platform}/${arch}`,
`${os.family}/any`,
`${os.family}/${arch}`,
`${os.distribution}/any`,
`${os.distribution}/${arch}`,
`${os.distribution}-${os.version}/any`,
`${os.distribution}-${os.version}/${arch}`,
`${domain}`,
`${hostname}`,
`${hostname}.${domain}`,
`${fqdn}`,
`${uuid}`,
}
Functions ¶
func Render ¶ added in v0.7.0
func Render(basedir string, options *RenderOptions) error
func RenderString ¶ added in v0.7.2
Render the given template string using the given data.
Types ¶
type InfluxdbPayload ¶
type InfluxdbPayload []string
type RenderOptions ¶ added in v0.7.0
type RenderOptions struct { SourceDir string `yaml:"srcdir"` DestDir string `yaml:"destdir" default:"~"` DefaultDirMode int `yaml:"dirmode" default:"493"` DefaultFileMode int `yaml:"filemode" default:"420"` Owner string `yaml:"owner"` Group string `yaml:"group"` DryRun bool `yaml:"dryrun"` FollowSymlinks bool `yaml:"follow_symlinks"` AdditionalPatterns []string `yaml:"patterns"` Triggers []Trigger `yaml:"triggers"` // contains filtered or unexported fields }
func (*RenderOptions) Enforce ¶ added in v0.7.0
func (self *RenderOptions) Enforce(path string) error
type Reporter ¶
type Reporter struct { Plugins []plugins.Plugin FieldPrefix string KeyFormat ReporterKeyFormat }
func NewReporter ¶
Create a new Reporter instance that can be configured.
type ReporterKeyFormat ¶ added in v0.6.2
type ReporterKeyFormat int
const ( FormatUnderscore ReporterKeyFormat = iota FormatPascalize FormatCamelize )
Click to show internal directories.
Click to hide internal directories.