Documentation
¶
Index ¶
- func ApplyRuleWaivers(configs loader.LoadedConfigurations, report *reporter.RegulaReport, ...)
- func ExactMatchOrWildcards(waiverElem string, resourceElem string) bool
- func Match(pattern, name string) (matched bool)
- func MatchList(pattern string, names []string) []bool
- func MatchListAll(pattern string, names []string) bool
- func MatchListAny(pattern string, names []string) bool
- func MatchSimple(pattern, name string) bool
- type RuleWaiver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyRuleWaivers ¶
func ApplyRuleWaivers( configs loader.LoadedConfigurations, report *reporter.RegulaReport, waivers []RuleWaiver, )
func ExactMatchOrWildcards ¶
func Match ¶
Match - finds whether the text matches/satisfies the pattern string. supports '*' and '?' wildcards in the pattern string. unlike path.Match(), considers a path as a flat name space while matching the pattern. The difference is illustrated in the example here https://play.golang.org/p/Ega9qgD4Qz .
func MatchListAll ¶
func MatchListAny ¶
func MatchSimple ¶
MatchSimple - finds whether the text matches/satisfies the pattern string. supports only '*' wildcard in the pattern. considers a file system path as a flat name space.
Types ¶
type RuleWaiver ¶
type RuleWaiver struct { ID string ResourceID string ResourceProvider string ResourceTag string ResourceType string RuleID string }
func (RuleWaiver) Match ¶
func (waiver RuleWaiver) Match( configs loader.LoadedConfigurations, result reporter.RuleResult, ) bool
TODO: Add an interface for results/resources so we can use this both at runtime as in IaC. Move out configs and replace it by a method in this interface.
Click to show internal directories.
Click to hide internal directories.