publicparams

package
v0.0.0-...-7544f7c Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

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