command

package
v0.0.0-...-a749b47 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2018 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRule

func CreateRule(json []byte) (string, string, error)

func DeleteRule

func DeleteRule(id string) error

func GetRules

func GetRules(sorts []string, pageSize int, page int) ([]model.Rule, int, int, int, int, int, int, int, error)

func GetRulesAsJSON

func GetRulesAsJSON(sorts []string, pageSize int, page int) ([]byte, int, int, int, int, int, int, int, error)

func GetRulesAsMaps

func GetRulesAsMaps(sorts []string, pageSize int, page int) ([]map[string]interface{}, int, int, int, int, int, int, int, error)

func InitDatabase

func InitDatabase(url string, dbname string)

InitDatabase initialise the db. create it if does not exist and load in memory Rules

func LoadRulesInMem

func LoadRulesInMem() error

func ProcessRules

func ProcessRules(entityType *string, entityJSON *string) ([]interface{}, error)

func UpdateRule

func UpdateRule(id string, rev1 string, json []byte) (string, error)

Types

type Action

type Action interface {
	Execute(rule *model.Rule, entityJSON *string) error
}

type ExecuteActions

type ExecuteActions struct {
}

func (*ExecuteActions) Execute

func (exe *ExecuteActions) Execute(rule *model.Rule, entityJSON *string) error

type ExecuteGatherRules

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

func (*ExecuteGatherRules) Execute

func (exe *ExecuteGatherRules) Execute(rule *model.Rule, entityJSON *string) error

type ExecuteRule

type ExecuteRule func(rule *model.Rule, entityJSON *string) error

Jump to

Keyboard shortcuts

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