matchers

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HCLEntry

type HCLEntry struct {
	HCLType       string
	ComponentName string
	InstanceName  string
	Attributes    interface{}
}

type Match

type Match struct {
	HCLEntries      []HCLEntry
	MatchingEntries []HCLEntry
}

func NewMatch

func NewMatch() *Match

func (*Match) AOfType

func (m *Match) AOfType(providerFeature, providerFeatureType string) error

AOfTypeNamed will match a feature type and feature name exactly from the terraform. all instance names will be included

func (*Match) AOfTypeNamed

func (m *Match) AOfTypeNamed(providerFeature, providerFeatureType, instanceName string) error

AOfTypeNamed will match a feature type, feature name and instance name exactly from the terraform

func (*Match) AlwaysAttributeDoesNotEqual added in v0.5.0

func (m *Match) AlwaysAttributeDoesNotEqual(searchKey string, searchValue string) error

AlwaysAttributeDoesNotEqual - all elements' attr of search key must not match the search value

func (*Match) AlwaysAttributeDoesNotEqualInt added in v0.5.0

func (m *Match) AlwaysAttributeDoesNotEqualInt(searchKey string, searchValue int) error

AlwaysAttributeDoesNotEqualInt - all elements' attr of search key must not match the search value

func (*Match) AlwaysAttributeEquals added in v0.5.0

func (m *Match) AlwaysAttributeEquals(searchKey, searchValue string) error

AlwaysAttributeEquals - requires all elements to have an exact match on attributes or it fails

func (*Match) AlwaysAttributeEqualsInt added in v0.5.0

func (m *Match) AlwaysAttributeEqualsInt(searchKey string, searchValue int) error

AlwaysAttributeEqualsInt - requires all elements to have an exact match on attributes or it fails

func (*Match) AlwaysAttributeGreaterThan added in v0.5.0

func (m *Match) AlwaysAttributeGreaterThan(searchKey string, searchValue int) error

func (*Match) AlwaysAttributeLessThan added in v0.5.0

func (m *Match) AlwaysAttributeLessThan(searchKey string, searchValue int) error

func (*Match) AlwaysAttributeRegex added in v0.5.0

func (m *Match) AlwaysAttributeRegex(attributeName, regexString string) error

AlwaysAttributeRegex - Check if all elements match regex

func (*Match) AttributeDoesNotEqual

func (m *Match) AttributeDoesNotEqual(searchKey, searchValue string) error

AttributeEquals will filter on a match of key where value is not a match or it will return an error

func (*Match) AttributeDoesNotEqualInt added in v0.2.0

func (m *Match) AttributeDoesNotEqualInt(searchKey string, searchValue int) error

AttributeDoesNotEqualInt will filter on a full match of key value or it will return an error

func (*Match) AttributeEquals

func (m *Match) AttributeEquals(searchKey, searchValue string) error

AttributeEquals will filter on a full match of key value or it will return an error

func (*Match) AttributeEqualsInt added in v0.2.0

func (m *Match) AttributeEqualsInt(searchKey string, searchValue int) error

AttributeEqualsInt will filter on a full match of key value or it will return an error

func (*Match) AttributeExists

func (m *Match) AttributeExists(searchKey string) error

AttributeExists will filter the set to only matching elements or it will return an error

func (*Match) AttributeGreaterThan

func (m *Match) AttributeGreaterThan(searchKey string, searchValue int) error

AttributeGreaterThan - will match (assuming int) for a greater than evaluation

func (*Match) AttributeLessThan

func (m *Match) AttributeLessThan(searchKey string, searchValue int) error

AttributeLessThan - will match (assuming int) for a less than evaluation

func (*Match) AttributeRegex

func (m *Match) AttributeRegex(attributeName, regexString string) error

AttributeRegex - will use a regex to see if attributes value is a match

func (*Match) HCL2 added in v0.7.0

func (m *Match) HCL2() error

HCL2 a simple matcher to show intent to init from a hcl2 terraform in current directory

func (*Match) ItOccursAtLeastTimes

func (m *Match) ItOccursAtLeastTimes(count int) error

ItOccursAtLeastTimes - will check how many results are in our filter and make sure we have at least that

func (*Match) ItOccursAtMostTimes

func (m *Match) ItOccursAtMostTimes(count int) error

ItOccursAtMostTimes - will check how many results are in our filter and make sure we have at most that

func (*Match) ItOccursExactlyTimes

func (m *Match) ItOccursExactlyTimes(count int) error

ItOccursExactlyTimes - will check how many results are in our filter and make sure we have at exactly that

func (*Match) ReadTerraform

func (m *Match) ReadTerraform(tpath string, unmarshal Unmarshaller) error

ReadTerrraform a simple matcher to init from terraform in a given directory

func (*Match) Terraform

func (m *Match) Terraform() error

Terrraform a simple matcher to show intent to init from terraform in current directory

type Unmarshaller added in v0.7.0

type Unmarshaller func(p []byte, v interface{}) error

func GetUnmarshallerVersion added in v0.7.0

func GetUnmarshallerVersion(version int) Unmarshaller

Jump to

Keyboard shortcuts

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