# Transform metadata used by the rpk transform build command.
# This metadata file tells rpk:
# 1) The transform’s display name, which also becomes the base for the .wasm file name.
# 2) A brief description of what it does.
# 3) Defaults for environment variables.
# 4) Input and output topics (if you want to define them here rather than in the deploy command).

# Human-readable name of the transform. rpk transform build uses this for the generated .wasm file.
name: regex

description: |
  Filters the input topic to records that only match a regular expression.

  Regular expressions are implemented using Go's regexp library, which uses the syntax of RE2.
  See the RE2 wiki for allowed syntax: https://github.com/google/re2/wiki/Syntax

  Environment variables:
  - PATTERN: The regular expression that will match against records (required).
  - MATCH_VALUE: By default, the regex matches keys, but if set to "true", the regex matches values.

# By default, no input topic is set here. (You can set it in your deploy command if preferred.)
input-topic: ""

# By default, no output topic is set here. (You can set it in your deploy command if preferred.)
output-topic: ""

# Indicates the specific TinyGo environment used to compile your transform.
language: tinygo-no-goroutines

env:
  # The PATTERN variable must be provided at deploy time.
  # Example: --var=PATTERN=".*@example.com"
  PATTERN: '<required>'
