Versions in this module Expand all Collapse all v3 v3.2.1 Feb 16, 2023 v3.2.0 Feb 15, 2023 v3.1.0 Feb 10, 2023 v3.0.0 Jan 24, 2023 Changes in this version + var DefaultInputTypes = InputTypeIDs[Auto] + var InputTypeIDs = map[InputType][]string + func ValidateInputType(name string) error + func ValidateInputTypes(names []string) error + type ArmDetector struct + func (c *ArmDetector) DetectDirectory(i InputDirectory, opts DetectOptions) (IACConfiguration, error) + func (c *ArmDetector) DetectFile(i InputFile, opts DetectOptions) (IACConfiguration, error) + type AutoDetector struct + func NewAutoDetector(detectors ...ConfigurationDetector) *AutoDetector + func (a *AutoDetector) DetectDirectory(i InputDirectory, opts DetectOptions) (IACConfiguration, error) + func (a *AutoDetector) DetectFile(i InputFile, opts DetectOptions) (IACConfiguration, error) + type CfnDetector struct + func (c *CfnDetector) DetectDirectory(i InputDirectory, opts DetectOptions) (IACConfiguration, error) + func (c *CfnDetector) DetectFile(i InputFile, opts DetectOptions) (IACConfiguration, error) + type ConfigurationDetector interface + DetectDirectory func(i InputDirectory, opts DetectOptions) (IACConfiguration, error) + DetectFile func(i InputFile, opts DetectOptions) (IACConfiguration, error) + func DetectorByInputTypes(inputTypes []InputType) (ConfigurationDetector, error) + type ConfigurationLoader func() (LoadedConfigurations, error) + func LocalConfigurationLoader(options LoadPathsOptions) ConfigurationLoader + type DetectOptions struct + IgnoreDirs bool + IgnoreExt bool + VarFiles []string + type HclConfiguration struct + func (c *HclConfiguration) LoadedFiles() []string + func (c *HclConfiguration) Location(path []string) (LocationStack, error) + func (c *HclConfiguration) RegulaInput() RegulaInput + type IACConfiguration interface + LoadedFiles func() []string + Location func(attributePath []string) (LocationStack, error) + RegulaInput func() RegulaInput + type InputDirectory interface + Children func() []InputPath + Walk func(w WalkFunc) error + type InputFile interface + Contents func() ([]byte, error) + Ext func() string + type InputPath interface + DetectType func(d ConfigurationDetector, opts DetectOptions) (IACConfiguration, error) + IsDir func() bool + Name func() string + Path func() string + type InputType int + const Arm + const Auto + const Cfn + const K8s + const Tf + const TfPlan + func InputTypeFromString(name string) (InputType, error) + func InputTypesFromStrings(names []string) ([]InputType, error) + type KubernetesDetector struct + func (c *KubernetesDetector) DetectDirectory(i InputDirectory, opts DetectOptions) (IACConfiguration, error) + func (c *KubernetesDetector) DetectFile(i InputFile, opts DetectOptions) (IACConfiguration, error) + type LoadPathsOptions struct + IgnoreDirs bool + InputTypes []InputType + NoGitIgnore bool + Paths []string + VarFiles []string + type LoadedConfigurations interface + AddConfiguration func(path string, config IACConfiguration) + AlreadyLoaded func(path string) bool + ConfigurationPath func(path string) *string + Count func() int + Location func(path string, attributePath []string) (LocationStack, error) + RegulaInput func() []RegulaInput + type Location struct + Col int + Line int + Path string + func (l Location) String() string + type LocationStack = []Location + type NoLoadableConfigsError struct + func (e *NoLoadableConfigsError) Error() string + type RegulaInput map[string]interface + type SourceInfoNode struct + func LoadMultiSourceInfoNode(contents []byte) ([]SourceInfoNode, error) + func LoadSourceInfoNode(contents []byte) (*SourceInfoNode, error) + func (node *SourceInfoNode) GetIndex(index int) (*SourceInfoNode, error) + func (node *SourceInfoNode) GetKey(key string) (*SourceInfoNode, error) + func (node *SourceInfoNode) GetPath(path []string) (*SourceInfoNode, error) + func (node *SourceInfoNode) Location() (int, int) + type TfDetector struct + func (t *TfDetector) DetectDirectory(i InputDirectory, opts DetectOptions) (IACConfiguration, error) + func (t *TfDetector) DetectFile(i InputFile, opts DetectOptions) (IACConfiguration, error) + type TfPlanDetector struct + func (t *TfPlanDetector) DetectDirectory(i InputDirectory, opts DetectOptions) (IACConfiguration, error) + func (t *TfPlanDetector) DetectFile(i InputFile, opts DetectOptions) (IACConfiguration, error) + type WalkFunc func(i InputPath) (skip bool, err error) Other modules containing this package github.com/fugue/regula github.com/fugue/regula/v2