Documentation ¶
Overview ¶
Package filter implements a collections of matchers for accepting or rejecting messages based on some simple structural rules.
- Partial-Literal matching The main mode of operation is to match specified literals, so if we get the filter expression like: {"foo": "bar"} then it will match maps with that shape. e.g. {"foo": "bar", "baz": true} Note that this can only prefix-match arrays, see [anything].
- Exact-Literal matching This would kick in when we are passed a pattern with the shape: {"[exact]": {"foo": "bar"}} The result would be something very similar to #1, however, we would not accept the unspecified "baz" key. This applies to exactly one level of the object.
- One Of matching This would kick in when we are passed a pattern with the shape: {"[oneof]": [{"foo": "bar"}, {"baz": "blah"}]}
- Match Anything This would kick in when we are passed a pattern with the shape: [anything] The idea is to allow folks to blank out values in partial literal matching of arrays, or require a key without specifying the value. e.g. {"foo": ["bar", "[anything]", "baz"]} e.g. {"foo": "[anything]"}
5. TODO(mattmoor): Regexp Match
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.