objecttype

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package objecttype provides include/exclude filtering over user-facing database object type categories. Callers supply the mapping from category name to the concrete type values used by their source of truth (pg_dump TOC types, DDL event object types, ...), and get back the set of categories and types that must be excluded.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIncludeExcludeConflict = errors.New("include and exclude object type lists cannot both be set")
	ErrUnknownCategory        = errors.New("unknown object type category")
)

Functions

This section is empty.

Types

type Filter

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

Filter reports which object type categories, and which of the type values they map to, should be excluded. A nil Filter excludes nothing.

func NewFilter

func NewFilter(categories map[string][]string, include, exclude []string) (*Filter, error)

NewFilter builds a Filter from the given include/exclude category lists, validated against the categories mapping. Only one of include or exclude can be set. Setting include excludes every category that is not listed. It returns a nil Filter when neither list is set, meaning no filtering.

func (*Filter) IsCategoryExcluded

func (f *Filter) IsCategoryExcluded(category string) bool

IsCategoryExcluded returns true if the given user-facing category is excluded.

func (*Filter) IsTypeExcluded

func (f *Filter) IsTypeExcluded(objectType string) bool

IsTypeExcluded returns true if the given type value belongs to an excluded category.

Jump to

Keyboard shortcuts

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