readfilepredicate

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

README

readfile

The readfile predicate reads and parse the value of file.

Options

Option Required Description
json Path to a JSON file
yaml Path to a YAML file

One of json or yaml must be present.

Results

Field Type Description
result boolean true if file was read
content according to file content The parsed content of the file

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Name = "readfile"

Name of the predicate

Functions

func New

func New() genapid.Predicate

New returns a new Predicate

Types

type Predicate

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

Predicate is the conf.Plugin interface that describes the predicate

func (*Predicate) Call

func (predicate *Predicate) Call(log zerolog.Logger, c *ctx.Ctx) bool

Call evaluates the predicate

func (*Predicate) Name

func (predicate *Predicate) Name() string

Name returns the name of the predicate

func (*Predicate) Params

func (predicate *Predicate) Params() interface{}

Params returns a reference to the params struct of the predicate

func (*Predicate) Result

func (predicate *Predicate) Result() ctx.Result

Result returns data set by the predicate

Jump to

Keyboard shortcuts

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