facter

package
v0.0.0-...-3f25ee8 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2017 License: BSD-3-Clause Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Formatter Formatter
}

Config struct serves to pass Facter configuration

type Facter

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

Facter struct holds Facter-related attributes

func New

func New(userConf *Config) *Facter

New returns new instance of Facter

func (*Facter) Add

func (f *Facter) Add(k string, v interface{})

Add adds a fact

func (*Facter) Delete

func (f *Facter) Delete(k string)

Delete deletes given fact

func (*Facter) Get

func (f *Facter) Get(k string) (interface{}, bool)

Get returns value of given fact, if it exists

func (*Facter) Print

func (f *Facter) Print()

Print prints-out facts by calling formatter

type Formatter

type Formatter interface {
	Print(map[string]interface{}) error
}

Formatter interface

Jump to

Keyboard shortcuts

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