3
0
Files
corteza/codegen/v2/events.go.tpl
Denis Arh abf4d106bb Improve eventbus & constraints handling
Constraints are now preparsed into active structs
that can be used for matching
2020-01-18 07:05:35 +01:00

16 lines
598 B
Smarty

package {{ .Package }}
import "github.com/cortezaproject/corteza-server/pkg/eventbus"
// Match returns false if given conditions do not match event & resource internals
func (res {{ camelCase .ResourceIdent "base" }}) Match(c constraint) bool {
// By default we match no mather what kind of constraints we receive
//
// Function will be called multiple times - once for every trigger constraint
// All should match (return true):
// constraint#1 AND constraint#2 AND constraint#3 ...
//
// When there are multiple values, Match() can decide how to treat them (OR, AND...)
return true
}