secrets

package
v1.41.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainsIgnoreCaseMatcher

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

ContainsIgnoreCaseMatcher is the case-insensitive version of ContainsMatcher. This is the matcher for the 'contains-ignore-case' match type

func NewContainsIgnoreCaseMatcher

func NewContainsIgnoreCaseMatcher(terms ...string) ContainsIgnoreCaseMatcher

NewContainsIgnoreCaseMatcher returns a ContainsIgnoreCaseMatcher for a list of terms

func (ContainsIgnoreCaseMatcher) Match

Match returns true if a string contains any of matcher's terms regardless of the case

type ContainsMatcher

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

ContainsMatcher matches a string if it contains at any of the terms in the matcher's list. This is the matcher for the 'contains' match type

func NewContainsMatcher

func NewContainsMatcher(terms ...string) ContainsMatcher

NewContainsMatcher returns a ContainsMatcher for a list of terms

func (ContainsMatcher) Match

func (m ContainsMatcher) Match(s string) bool

Match returns true if a string contains any of matcher's terms

type EqualsIgnoreCaseMatcher

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

EqualsIgnoreCaseMatcher is the case-insensitive version of EqualsMatcher. This is the matcher for the 'equals-ignore-case' match type

func NewEqualsIgnoreCaseMatcher

func NewEqualsIgnoreCaseMatcher(terms ...string) EqualsIgnoreCaseMatcher

NewEqualsIgnoreCaseMatcher returns an EqualsIgnoreCaseMatcher for a list of terms

func (EqualsIgnoreCaseMatcher) Match

func (m EqualsIgnoreCaseMatcher) Match(s string) bool

Match returns true if provided value present in matcher's terms list regardless of the case

type EqualsMatcher

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

EqualsMatcher matches a string that is contained in the terms list. This is the matcher for the 'equals' match type

func NewEqualsMatcher

func NewEqualsMatcher(terms ...string) EqualsMatcher

NewEqualsMatcher returns an EqualsMatcher for a list of terms

func (EqualsMatcher) Match

func (m EqualsMatcher) Match(s string) bool

Match returns true if provided value present in matcher's terms list

type NoneMatcher

type NoneMatcher struct{}

NoneMatcher does not match any string. It's used as a default value for (instana.Options).Secrets

func (NoneMatcher) Match

func (m NoneMatcher) Match(s string) bool

Match returns false for any string

type RegexpMatcher

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

RegexpMatcher matches a string using a set of regular expressions. This is the matcher for the 'regex' match type

func NewRegexpMatcher

func NewRegexpMatcher(terms ...*regexp.Regexp) (RegexpMatcher, error)

NewRegexpMatcher returns a RegexpMatcher for a list of regular expressions

func (RegexpMatcher) Match

func (m RegexpMatcher) Match(s string) bool

Match returns true if a string fully matches any of matcher's regular expessions. If an expression matches only a part of string, this method returns false:

m := NewRegexpMatcher(regexp.MustCompile(`aaa`), regexp.MustCompile(`bbb`))
m.Match("aaa") // returns true
m.Match("bbb") // returns true
m.Match("aaabbb") // returns false, as both regular expressions match only a part of the string

Jump to

Keyboard shortcuts

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