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 ¶
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 ¶
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 ¶
IsCategoryExcluded returns true if the given user-facing category is excluded.
func (*Filter) IsTypeExcluded ¶
IsTypeExcluded returns true if the given type value belongs to an excluded category.