go_swiss_rule

package module
v0.0.0-...-5fcc662 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: MIT Imports: 5 Imported by: 0

README

GoDoc

go-swiss-rule

A simple rules engin library for golang.

Warning:

The project still under development, don't use it in production.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvalAndInvoke

func EvalAndInvoke(input map[string]interface{}, rule Rule) (bool, error)

Types

type Condition

type Condition struct {
	Key      string
	Operator string
	Value    interface{}
	Joint    string
}

type IAction

type IAction interface {
	Fire() error
}

type Rule

type Rule struct {
	EventType       string
	Conditions      []Condition
	PositiveActions []IAction
	NegativeActions []IAction
}

Directories

Path Synopsis
utils

Jump to

Keyboard shortcuts

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