config

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Targets    []*Target    `yaml:"-"`
	TargetSets []*TargetSet `yaml:"targetSets"`
}

Config ...

func NewConfig

func NewConfig() (*Config, error)

NewConfig ...

func (*Config) FilterTargets added in v0.7.0

func (c *Config) FilterTargets(tagExpr, sourceRe string) ([]*Target, error)

func (*Config) LoadConfigFile

func (c *Config) LoadConfigFile(path string) error

LoadConfigFile ...

func (*Config) Tags added in v0.7.0

func (c *Config) Tags() Tags

type Tags added in v0.7.0

type Tags map[string]int

type Target

type Target struct {
	Source           string `db:"source"`
	Description      string `db:"description"`
	Type             string `db:"type"`
	Regexp           string `db:"regexp"`
	MultiLine        bool   `db:"multi_line"`
	TimeFormat       string `db:"time_format"`
	TimeZone         string `db:"time_zone"`
	Tags             []string
	Scheme           string `db:"scheme"`
	Host             string `db:"host"`
	User             string `db:"user"`
	Port             int    `db:"port"`
	Path             string `db:"path"`
	SSHKeyPassphrase []byte
	Id               int64 `db:"id"`
}

Target ...

func (*Target) GetHostLength added in v0.10.0

func (t *Target) GetHostLength() int

func (*Target) GetPathLength added in v0.10.0

func (t *Target) GetPathLength() (int, error)

type TargetSet added in v0.4.0

type TargetSet struct {
	Sources     []string `yaml:"sources"`
	Description string   `yaml:"description,omitempty"`
	Type        string   `yaml:"type"`
	Regexp      string   `yaml:"regexp,omitempty"`
	MultiLine   bool     `yaml:"multiLine,omitempty"`
	TimeFormat  string   `yaml:"timeFormat,omitempty"`
	TimeZone    string   `yaml:"timeZone,omitempty"`
	Tags        []string `yaml:"tags"`
}

TargetSet ...

Jump to

Keyboard shortcuts

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