engine

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Eval

func Eval(in *Fact) (map[string]interface{}, error)

Eval evaluates the fact executing all the queries.

Types

type Fact

type Fact struct {
	Source  map[string]interface{} `json:"source"`
	Queries []struct {
		ID   string `json:"id"`
		Term string `json:"term"`
	} `json:"queries"`
}

Fact is a collection of queries about the info.

func FromFile

func FromFile(name string) (*Fact, error)

FromFile decodes a JSON representation of the inquest from a file.

func FromReader

func FromReader(r io.Reader) (*Fact, error)

FromReader decodes a JSON representation of the inquest from a io.Reader.

Jump to

Keyboard shortcuts

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