metadata

package
v3.61.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IncludeFilterDocs

func IncludeFilterDocs() docs.FieldSpecs

IncludeFilterDocs returns a docs spec for a metadata filter where keys are ignored by default and must be explicitly included.

Types

type Filter

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

Filter provides a way to filter keys based on a Config.

func (*Filter) IsSet

func (f *Filter) IsSet() bool

IsSet returns true if there are any rules configured for matching keys.

func (*Filter) Match

func (f *Filter) Match(str string) bool

Match returns true if the provided string matches the configured filters and false otherwise. It also returns false if no filters are configured.

type IncludeFilterConfig

type IncludeFilterConfig struct {
	IncludePrefixes []string `json:"include_prefixes" yaml:"include_prefixes"`
	IncludePatterns []string `json:"include_patterns" yaml:"include_patterns"`
}

IncludeFilterConfig contains configuration fields for a metadata filter where keys are ignored by default and must be explicitly included.

func NewIncludeFilterConfig

func NewIncludeFilterConfig() IncludeFilterConfig

NewIncludeFilterConfig returns an IncludeFilterConfig struct with default values.

func (IncludeFilterConfig) CreateFilter

func (c IncludeFilterConfig) CreateFilter() (*Filter, error)

CreateFilter attempts to construct a filter object.

Jump to

Keyboard shortcuts

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