Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BadExtractor = extractors.BadExtractor
BadExtractor is an error occurring when extractor is invalid.
View Source
var BadLabelName = extractors.BadLabelName
BadLabelName is an error occurring when label name is invalid.
View Source
var BadRego = badRego{}
BadRego is an error occurring when rego compilation fails.
View Source
var BadSelector = badSelector{}
BadSelector is an error occurring when selector is invalid.
Functions ¶
This section is empty.
Types ¶
type CompiledRuleset ¶
type CompiledRuleset struct { Selectors []*policylangv1.Selector Labelers []LabelerWithAttributes ReportedRules []ReportedRule }
CompiledRuleset is compiled form of Classifier proto.
func CompileRuleset ¶
func CompileRuleset(ctx context.Context, name string, classifierWrapper *policysyncv1.ClassifierWrapper) (CompiledRuleset, error)
CompileRuleset parses ruleset's selector and compiles its rules.
type LabelProperties ¶
type LabelProperties struct {
Telemetry bool
}
LabelProperties is a set of properties for a label.
type Labeler ¶
type Labeler struct { // rego query that is prepared to take envoy authz request as an input. // Result expression should be a single value (if LabelName is set) or a // map[string]interface{} otherwise. Query rego.PreparedEvalQuery // flags for created flow labels: Labels map[string]LabelProperties }
Labeler is used to create flow labels.
type LabelerWithAttributes ¶
type LabelerWithAttributes struct { Labeler *Labeler ClassifierAttributes *policysyncv1.ClassifierAttributes }
LabelerWithAttributes is a labeler with its attributes.
type ReportedRule ¶
type ReportedRule struct { Rule *policylangv1.Rule RulesetName string LabelName string }
ReportedRule is a rule along with its selector and label name.
Click to show internal directories.
Click to hide internal directories.