filter

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 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) 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
}

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 NewMockFilter added in v0.39.0

func NewMockFilter(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockFilter

NewMockFilter creates a new instance of MockFilter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

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