filters

package
v0.0.0-...-7c31ad9 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyPackFilter

func ApplyPackFilter(ff api.FilesetPackFilter, fmeta *fs.Metadata) error

ApplyPackFilter mutates the given fs.Metadata to be filtered.

An error is returned if any of of the metadata is matched by filters set to "reject".

The fmeta.Type will be set to fs.Type_Invalid in the case of a node which is matched by filters set to "ignore" if the filter is for a critical property of the node (e.g. "dev=ignore" will trigger this; whereas "sticky=ignore" will simply strip the sticky bit from the perm bits). This means you should just skip creation of this node entirely.

Note that if the filter has any fields which are set of "unspecified", they will be ignored; you should probably check `IsComplete` on the filter before calling this. (We don't do it inside of here because you're probably using this in a loop of large cardinality.)

func ApplyUnpackFilter

func ApplyUnpackFilter(ff api.FilesetUnpackFilter, fmeta *fs.Metadata) error

ApplyUnpackFilter mutates the given fs.Metadata to be filtered.

An error is returned if any of of the metadata is matched by filters set to "reject".

The fmeta.Type will be set to fs.Type_Invalid in the case of a node which is matched by filters set to "ignore" if the filter is for a critical property of the node (e.g. "dev=ignore" will trigger this; whereas "sticky=ignore" will simply strip the sticky bit from the perm bits). This means you should just skip creation of this node entirely.

Note that if the filter has any fields which are set of "unspecified", they will be ignored; you should probably check `IsComplete` on the filter before calling this. (We don't do it inside of here because you're probably using this in a loop of large cardinality.)

Types

This section is empty.

Jump to

Keyboard shortcuts

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