filter

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildExpression

func BuildExpression(expressionStr string) (*jmespath.JMESPath, error)

Types

type DriftIgnore

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

func NewDriftIgnore

func NewDriftIgnore(path string, ignorePatterns ...string) *DriftIgnore

func (*DriftIgnore) IsFieldIgnored

func (r *DriftIgnore) IsFieldIgnored(res *resource.Resource, path []string) bool

func (*DriftIgnore) IsResourceIgnored

func (r *DriftIgnore) IsResourceIgnored(res *resource.Resource) bool

func (*DriftIgnore) IsTypeIgnored

func (r *DriftIgnore) IsTypeIgnored(ty resource.ResourceType) bool

type Filter

type Filter interface {
	IsTypeIgnored(ty resource.ResourceType) bool
	IsResourceIgnored(res *resource.Resource) bool
	IsFieldIgnored(res *resource.Resource, path []string) bool
}

type FilterEngine

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

func NewFilterEngine

func NewFilterEngine(expr *jmespath.JMESPath) *FilterEngine

func (*FilterEngine) Run

func (e *FilterEngine) Run(resources []*resource.Resource) ([]*resource.Resource, error)

type MockFilter

type MockFilter struct {
	mock.Mock
}

MockFilter is an autogenerated mock type for the Filter type

func (*MockFilter) IsFieldIgnored

func (_m *MockFilter) IsFieldIgnored(res *resource.Resource, path []string) bool

IsFieldIgnored provides a mock function with given fields: res, path

func (*MockFilter) IsResourceIgnored

func (_m *MockFilter) IsResourceIgnored(res *resource.Resource) bool

IsResourceIgnored provides a mock function with given fields: res

func (*MockFilter) IsTypeIgnored

func (_m *MockFilter) IsTypeIgnored(ty resource.ResourceType) bool

IsTypeIgnored provides a mock function with given fields: ty

Jump to

Keyboard shortcuts

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