config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOptNotFound = errors.New("Option not found")

Functions

This section is empty.

Types

type Config

type Config struct {
	Version       string    `yaml:"version"`
	Timeout       string    `yaml:"timeout"`
	MaxGoroutines int       `yaml:"max_goroutines"`
	Interval      string    `yaml:"interval"`
	Devices       Devices   `yaml:"devices"`
	Storage       Options   `yaml:"storage"`
	Filters       []*Filter `yaml:"filters"`
}

func Load

func Load(name string) (*Config, error)

type Devices

type Devices struct {
	List   []Options `yaml:"list"`
	Common Options   `yaml:"common"`
}

type Filter added in v0.1.1

type Filter struct {
	Filter  string  `yaml:"filter"`
	Name    string  `yaml:"name"`
	Options Options `yaml:"options"`
}

type Options

type Options map[string]interface{}

func (Options) GetBool

func (o Options) GetBool(name string) (bool, error)

func (Options) GetInt

func (o Options) GetInt(name string) (int64, error)

func (Options) GetString

func (o Options) GetString(name string) (string, error)

Jump to

Keyboard shortcuts

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