Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatcherFromRules ¶
func MatcherFromRules(rules MatchingRules) (*paramMatcher, error)
MatcherFromRules creates a param matcher from a map of rules. The top level keys in this map are the publicly viewable corpora. The values for those corpora is another map of required keys and their corresponding allowed values. If a trace belonging to a given corpus has all of the required keys and the corresponding values are in the list of allowed values, then it will be publicly visible. Otherwise, it will not be. See publicparams_test.go for a concrete example.
Types ¶
type Matcher ¶
type Matcher interface {
Matches(traceParams paramtools.Params) bool
}
Matcher is the interface for determining if a trace's params fit a certain set of conditions.
type MatchingRules ¶
type MatchingRules map[corpusName]map[keyField][]value
Click to show internal directories.
Click to hide internal directories.