variable

package
v0.30.9 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUCores

type CPUCores struct {
}

func (*CPUCores) DistillReader

func (v *CPUCores) DistillReader(r io.Reader, result collecttypes.Result) (interface{}, error)

func (*CPUCores) ExtractValue

func (v *CPUCores) ExtractValue(distilled interface{}) (interface{}, error)

func (*CPUCores) MatchResults

func (v *CPUCores) MatchResults(index []collecttypes.Result) ([]collecttypes.Result, error)

type CollectRef

type CollectRef struct {
	meta.Ref `json:",inline" yaml:",inline" hcl:",inline"`

	Distiller `json:",inline" yaml:",inline" hcl:",inline"`
}

func (*CollectRef) DistillReader

func (v *CollectRef) DistillReader(r io.Reader, result collecttypes.Result) (interface{}, error)

func (*CollectRef) ExtractValue

func (v *CollectRef) ExtractValue(distilled interface{}) (interface{}, error)

func (*CollectRef) MatchResults

func (v *CollectRef) MatchResults(index []collecttypes.Result) (results []collecttypes.Result, err error)

type CoreReadFilePath

type CoreReadFilePath struct {
	Paths []string `json:"paths" yaml:"path" hcl:"paths"`

	Distiller `json:",inline" yaml:",inline" hcl:",inline"`
}

func (*CoreReadFilePath) DistillReader

func (v *CoreReadFilePath) DistillReader(r io.Reader, result collecttypes.Result) (interface{}, error)

func (*CoreReadFilePath) ExtractValue

func (v *CoreReadFilePath) ExtractValue(distilled interface{}) (interface{}, error)

func (*CoreReadFilePath) MatchResults

func (v *CoreReadFilePath) MatchResults(index []collecttypes.Result) ([]collecttypes.Result, error)

type Distiller

type Distiller struct {
	Scannable bool `json:"scannable,omitempty" yaml:"scannable,omitempty" hcl:"scannable,omitempty"`

	Eval             *distiller.Eval             `json:"eval,omitempty" yaml:"eval,omitempty" hcl:"eval,omitempty"`
	Identity         *distiller.Identity         `json:"identity,omitempty" yaml:"identity,omitempty" hcl:"identity,omitempty"`
	RegexpCapture    *distiller.RegexpCapture    `json:"regexpCapture,omitempty" yaml:"regexpCapture,omitempty" hcl:"regexpCapture,omitempty"`
	RegexpCaptureAll *distiller.RegexpCaptureAll `json:"regexpCaptureAll,omitempty" yaml:"regexpCaptureAll,omitempty" hcl:"regexpCaptureAll,omitempty"`
}

func (*Distiller) Distill

func (v *Distiller) Distill(r io.Reader) (interface{}, error)

type Eval

type Eval string

func (*Eval) DistillReader

func (v *Eval) DistillReader(r io.Reader, result collecttypes.Result) (interface{}, error)

func (*Eval) Evaluate

func (v *Eval) Evaluate(data map[string]interface{}) (interface{}, error)

func (*Eval) ExtractValue

func (v *Eval) ExtractValue(distilled interface{}) (interface{}, error)

func (*Eval) MatchResults

func (v *Eval) MatchResults(index []collecttypes.Result) ([]collecttypes.Result, error)

type Evaluator

type Evaluator interface {
	Evaluate(data map[string]interface{}) (interface{}, error)
}

type FileMatch

type FileMatch struct {
	PathRegexps []string `json:"pathRegexps" yaml:"pathRegexps" hcl:"pathRegexps"`

	Distiller `json:",inline" yaml:",inline" hcl:",inline"`
}

func (*FileMatch) DistillReader

func (v *FileMatch) DistillReader(r io.Reader, result collecttypes.Result) (interface{}, error)

func (*FileMatch) ExtractValue

func (v *FileMatch) ExtractValue(distilled interface{}) (interface{}, error)

func (*FileMatch) MatchResults

func (v *FileMatch) MatchResults(index []collecttypes.Result) ([]collecttypes.Result, error)

type Interface

type Interface interface {
	ResultDistiller
}

Interface is the Variable interface FIXME: This interface is really awkward. Variables like eval and whichCloud are only really Evaluators.

type Loadavg

type Loadavg struct {
}

func (*Loadavg) DistillReader

func (v *Loadavg) DistillReader(r io.Reader, result collecttypes.Result) (interface{}, error)

func (*Loadavg) ExtractValue

func (v *Loadavg) ExtractValue(distilled interface{}) (interface{}, error)

func (*Loadavg) MatchResults

func (v *Loadavg) MatchResults(index []collecttypes.Result) ([]collecttypes.Result, error)

type Loadavg1

type Loadavg1 struct {
}

func (*Loadavg1) DistillReader

func (v *Loadavg1) DistillReader(r io.Reader, result collecttypes.Result) (interface{}, error)

func (*Loadavg1) ExtractValue

func (v *Loadavg1) ExtractValue(distilled interface{}) (interface{}, error)

func (*Loadavg1) MatchResults

func (v *Loadavg1) MatchResults(index []collecttypes.Result) ([]collecttypes.Result, error)

type Loadavg15

type Loadavg15 struct {
}

func (*Loadavg15) DistillReader

func (v *Loadavg15) DistillReader(r io.Reader, result collecttypes.Result) (interface{}, error)

func (*Loadavg15) ExtractValue

func (v *Loadavg15) ExtractValue(distilled interface{}) (interface{}, error)

func (*Loadavg15) MatchResults

func (v *Loadavg15) MatchResults(index []collecttypes.Result) ([]collecttypes.Result, error)

type Loadavg5

type Loadavg5 struct {
}

func (*Loadavg5) DistillReader

func (v *Loadavg5) DistillReader(r io.Reader, result collecttypes.Result) (interface{}, error)

func (*Loadavg5) ExtractValue

func (v *Loadavg5) ExtractValue(distilled interface{}) (interface{}, error)

func (*Loadavg5) MatchResults

func (v *Loadavg5) MatchResults(index []collecttypes.Result) ([]collecttypes.Result, error)

type MemoryUsageAvailable

type MemoryUsageAvailable struct {
}

func (*MemoryUsageAvailable) DistillReader

func (v *MemoryUsageAvailable) DistillReader(r io.Reader, result collecttypes.Result) (interface{}, error)

func (*MemoryUsageAvailable) ExtractValue

func (v *MemoryUsageAvailable) ExtractValue(distilled interface{}) (interface{}, error)

func (*MemoryUsageAvailable) MatchResults

func (v *MemoryUsageAvailable) MatchResults(index []collecttypes.Result) ([]collecttypes.Result, error)

type MemoryUsageTotal

type MemoryUsageTotal struct {
}

func (*MemoryUsageTotal) DistillReader

func (v *MemoryUsageTotal) DistillReader(r io.Reader, result collecttypes.Result) (interface{}, error)

func (*MemoryUsageTotal) ExtractValue

func (v *MemoryUsageTotal) ExtractValue(distilled interface{}) (interface{}, error)

func (*MemoryUsageTotal) MatchResults

func (v *MemoryUsageTotal) MatchResults(index []collecttypes.Result) ([]collecttypes.Result, error)

type Os

type Os struct {
}

func (*Os) DistillReader

func (v *Os) DistillReader(r io.Reader, result collecttypes.Result) (interface{}, error)

func (*Os) ExtractValue

func (v *Os) ExtractValue(distilled interface{}) (interface{}, error)

func (*Os) MatchResults

func (v *Os) MatchResults(index []collecttypes.Result) ([]collecttypes.Result, error)

type OsUptime

type OsUptime struct {
}

func (*OsUptime) DistillReader

func (v *OsUptime) DistillReader(r io.Reader, result collecttypes.Result) (interface{}, error)

func (*OsUptime) ExtractValue

func (v *OsUptime) ExtractValue(distilled interface{}) (interface{}, error)

func (*OsUptime) MatchResults

func (v *OsUptime) MatchResults(index []collecttypes.Result) ([]collecttypes.Result, error)

type ResultDistiller

type ResultDistiller interface {
	MatchResults(index []collecttypes.Result) ([]collecttypes.Result, error)
	DistillReader(r io.Reader, result collecttypes.Result) (interface{}, error)
	ExtractValue(distilled interface{}) (interface{}, error)
}

type WhichCloud

type WhichCloud struct {
	VariableRef string `json:"variableRef" yaml:"variableRef" hcl:"variableRef"`
}

func (*WhichCloud) DistillReader

func (v *WhichCloud) DistillReader(r io.Reader, result collecttypes.Result) (interface{}, error)

func (*WhichCloud) Evaluate

func (v *WhichCloud) Evaluate(data map[string]interface{}) (interface{}, error)

func (*WhichCloud) ExtractValue

func (v *WhichCloud) ExtractValue(distilled interface{}) (interface{}, error)

func (*WhichCloud) MatchResults

func (v *WhichCloud) MatchResults(index []collecttypes.Result) ([]collecttypes.Result, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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