evaluator

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(messages *[]Message) error

func Evaluate

func Evaluate(data *owm.WeatherData, messages *[]Message) []string

Types

type Choice

type Choice struct {
	Expression string `yaml:"expression"`
	Value      string `yaml:"value"`
	// contains filtered or unexported fields
}

type Message

type Message struct {
	Message         string `yaml:"message"`
	NegativeMessage string `yaml:"negative_message"`
	Condition       string `yaml:"condition"`

	Variables []Variable `yaml:"variables"`
	// contains filtered or unexported fields
}

type Variable

type Variable struct {
	Name    string   `yaml:"name"`
	Choices []Choice `yaml:"choices"`
}

Jump to

Keyboard shortcuts

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