Skip to content
View as Markdown

GenericMatch

Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L356-L423

Field Type Description
base_matcher bitdrift.public.unary.workflows.v1.GenericMatch.GenericMatchCondition(Only one of base_matcher, or or_matcher, and_matcher, not_matcher can be set) A single predicate to evaluate.
or_matcher bitdrift.public.unary.workflows.v1.GenericMatch.MatcherList(Only one of or_matcher, or base_matcher, and_matcher, not_matcher can be set) A list of predicates to be OR-ed together.
and_matcher bitdrift.public.unary.workflows.v1.GenericMatch.MatcherList(Only one of and_matcher, or base_matcher, or_matcher, not_matcher can be set) A list of predicates to be AND-ed together.
not_matcher bitdrift.public.unary.workflows.v1.GenericMatch.GenericMatchCondition(Only one of not_matcher, or base_matcher, or_matcher, and_matcher can be set) An inversion of a predicate.

Example

JSON
{
  "base_matcher": {
    "log_field": "field_name",
    "operator": "EQUAL",
    "string_value": "example"
  }
}

GenericMatch.GenericMatchCondition

Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L357-L402

Field Type Description
log_field string
up to 100 chars(Only one of log_field, or log_body, log_field_json_path, state_key can be set)
Match against a log field.
log_body bool(Only one of log_body, or log_field, log_field_json_path, state_key can be set) Match against the log body.
log_field_json_path string
up to 255 chars(Only one of log_field_json_path, or log_field, log_body, state_key can be set)
Match against a JSON path expression inside a log field.
state_key bitdrift.public.unary.workflows.v1.GenericMatch.GenericMatchCondition.StateKey(Only one of state_key, or log_field, log_body, log_field_json_path can be set) A state value specified by the scope and key.
operator bitdrift.public.unary.workflows.v1.Operator
must be a defined enum value
The operator of the conditional.
string_value string
up to 512 chars(Only one of string_value, or semver_value, int_value, double_value, saved_field_id can be set)
A string value to match against.
semver_value string
up to 255 chars(Only one of semver_value, or string_value, int_value, double_value, saved_field_id can be set)
A semantic version value to match against.
int_value int32(Only one of int_value, or string_value, semver_value, double_value, saved_field_id can be set) An integer value to match against.
double_value double(Only one of double_value, or string_value, semver_value, int_value, saved_field_id can be set) A double value to match against.
saved_field_id string
up to 100 chars(Only one of saved_field_id, or string_value, semver_value, int_value, double_value can be set)
A reference to a value saved from a previous match rule.

Example

JSON
{
  "log_field": "field_name",
  "operator": "EQUAL",
  "string_value": "example"
}

GenericMatch.GenericMatchCondition.StateKey

Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L358-L364

Field Type Description
scope bitdrift.public.unary.workflows.v1.StateScope
must be a defined enum value
The scope of the state key to look up.
key string
up to 100 chars
The key within the given scope to read the value from.

Example

JSON
{
  "key": "example-key",
  "scope": "GLOBAL_STATE"
}

GenericMatch.MatcherList

Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L405-L408

A list of two or more matchers. Used to allow using a list within a oneof for and/or matching.

Field Type Description
matchers array of bitdrift.public.unary.workflows.v1.GenericMatch
up to 100 items
The child matchers to evaluate together.

Example

JSON
{
  "matchers": [
    {
      "base_matcher": {
        "log_field": "field_name",
        "operator": "EQUAL",
        "string_value": "example"
      }
    }
  ]
}