panylexpr

package module
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 10 Imported by: 0

README

panyl-expr

Author

Rangel Reale ([email protected])

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition struct {
	When *vm.Program
	Do   *vm.Program
}

func NewCondition

func NewCondition(when, do string) (Condition, error)

func (Condition) Process

func (e Condition) Process(p *panyl.Process) error

type ConditionConfig

type ConditionConfig struct {
	Conditions []ConditionItemConfig `yaml:"conditions"`
}

type ConditionItemConfig

type ConditionItemConfig struct {
	When string `yaml:"when"`
	Do   string `yaml:"do"`
}

type Config

type Config struct {
	Conditions []Condition
}

func NewConfig

func NewConfig(options ...ConfigOption) (*Config, error)

func (*Config) Process

func (e *Config) Process(p *panyl.Process) error

type ConfigOption

type ConfigOption func(*Config) error

func WithConfigFile

func WithConfigFile(filename string) ConfigOption

func WithConfigReader

func WithConfigReader(r io.Reader) ConfigOption

type Expr

type Expr struct {
	Config *Config
}

func New

func New(options ...ConfigOption) (*Expr, error)

func (Expr) IsPanylPlugin

func (e Expr) IsPanylPlugin()

func (Expr) PostProcess

func (e Expr) PostProcess(result *panyl.Process) (bool, error)

func (Expr) PostProcessOrder

func (e Expr) PostProcessOrder() int

Jump to

Keyboard shortcuts

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