Help us shape the future of Go! Take the 2026 Go Developer Survey

filter

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package filter implements include/exclude regex filtering for schema and table names, matching the semantics of the Python openmetadata-ingestion connectors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	// contains filtered or unexported fields
}

Filter is a compiled Pattern ready for matching.

func New

func New(p Pattern) (*Filter, error)

New compiles a Pattern into a Filter. An invalid regular expression is returned as an error so misconfiguration fails fast at startup rather than mid-ingestion.

func (*Filter) Allowed

func (f *Filter) Allowed(name string) bool

Allowed reports whether name passes the filter. Precedence matches the Python connectors: an exclude match rejects immediately; then if there are no includes everything is allowed; otherwise the name must match at least one include. Matching uses unanchored search (regexp.MatchString), mirroring Python's re.search.

type Pattern

type Pattern struct {
	Includes []string
	Excludes []string
}

Pattern holds raw include/exclude regular expression strings as read from the workflow YAML (schemaFilterPattern / tableFilterPattern).

Jump to

Keyboard shortcuts

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