Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HandlerTypes = map[string]HandlerType{ "script": HANDLER_SCRIPT, }
Functions ¶
This section is empty.
Types ¶
type EventManager ¶
type EventManager struct {
// contains filtered or unexported fields
}
func NewEventManager ¶
func NewEventManager() *EventManager
func (*EventManager) AddRule ¶
func (em *EventManager) AddRule(eventName string, rule *Rule)
func (*EventManager) DeleteRule ¶
func (em *EventManager) DeleteRule(eventName string, ruleID string)
func (*EventManager) GetEvents ¶
func (em *EventManager) GetEvents() []string
func (*EventManager) GetRuleSet ¶
func (em *EventManager) GetRuleSet(eventName string) *RuleSet
type Handler ¶
type Handler struct { Type HandlerType Script string Transformer *schemer.Transformer }
func NewHandler ¶
func NewHandler(config *product_sdk.HandlerConfig, sourceSchema *schemer.Schema, targetSchema *schemer.Schema) *Handler
type Rule ¶
type Rule struct { product_sdk.Rule Handler *Handler Schema *schemer.Schema TargetSchema *schemer.Schema }
func NewRule ¶
func NewRule(rule *product_sdk.Rule) *Rule
type RuleManager ¶
type RuleManager struct {
// contains filtered or unexported fields
}
func NewRuleManager ¶
func NewRuleManager() *RuleManager
func (*RuleManager) AddRule ¶
func (rm *RuleManager) AddRule(rule *Rule) error
func (*RuleManager) DeleteRule ¶
func (rm *RuleManager) DeleteRule(id string)
func (*RuleManager) GetEvents ¶
func (rm *RuleManager) GetEvents() []string
func (*RuleManager) GetRule ¶
func (rm *RuleManager) GetRule(id string) *Rule
func (*RuleManager) GetRules ¶
func (rm *RuleManager) GetRules() []*Rule
func (*RuleManager) GetRulesByEvent ¶
func (rm *RuleManager) GetRulesByEvent(eventName string) []*Rule
type RuleSet ¶
type RuleSet struct {
// contains filtered or unexported fields
}
func NewRuleSet ¶
func NewRuleSet() *RuleSet
Click to show internal directories.
Click to hide internal directories.