logic

package
v0.0.0-...-35ec728 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseElement

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

func (*BaseElement) Exec

func (e *BaseElement) Exec(d *model.LogicData)

func (*BaseElement) SetNext

func (e *BaseElement) SetNext(next Elementer)

type Elementer

type Elementer interface {
	SetNext(Elementer)
	Exec(*model.LogicData)
}

func BuildLogic

func BuildLogic(l *model.Logic) (Elementer, error)

func GetElementer

func GetElementer(elem string) Elementer

func UnmarshalElement

func UnmarshalElement(e *model.Element) (Elementer, error)

type EmailElement

type EmailElement struct {
	BaseElement
	Email    string `json:"text"`
	Interval map[string]bool
}

func (*EmailElement) Exec

func (ee *EmailElement) Exec(d *model.LogicData)

type TimeElement

type TimeElement struct {
	BaseElement
	Range []struct {
		Start string `json:"start"`
		End   string `json:"end"`
	} `json:"range"`
}

func (*TimeElement) Exec

func (te *TimeElement) Exec(d *model.LogicData)

type ValueElement

type ValueElement struct {
	BaseElement
	Value string `json:"value"`
	Range []struct {
		Min float64 `json:"min"`
		Max float64 `json:"max"`
	} `json:"range"`
}

func (*ValueElement) Exec

func (ve *ValueElement) Exec(d *model.LogicData)

Jump to

Keyboard shortcuts

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