Documentation
¶
Index ¶
- Variables
- func GetPacks() (keys []string)
- func Init(configPath string) error
- func LineBreakReplacer(s string) string
- func LogConfigState()
- func SetLogFilter(minLevel string, writer io.Writer)
- func ValidateConfigPath(path string) error
- type Azure
- type CloudProviders
- type ConfigVars
- type Excludable
- type Kubernetes
- type Meta
- type Probe
- type Scenario
- type ServicePacks
- type Storage
Constants ¶
This section is empty.
Variables ¶
var Requirements = map[string][]string{ "Storage": []string{"Provider"}, "Kubernetes": []string{"AuthorisedContainerRegistry", "UnauthorisedContainerRegistry"}, }
var Spinner *spinner.Spinner
Functions ¶
func GetPacks ¶
func GetPacks() (keys []string)
Returns a list of pack names (as specified by internal/config/requirements.go)
func LineBreakReplacer ¶
LineBreakReplacer replaces carriage return (\r), linefeed (\n), formfeed (\f) and other similar characters with a space.
func LogConfigState ¶
func LogConfigState()
func SetLogFilter ¶
Override the minimum log level.
func ValidateConfigPath ¶
ValidateConfigPath simply ensures the file exists
Types ¶
type Azure ¶
type Azure struct { Excluded string `yaml:"Excluded"` TenantID string `yaml:"TenantID"` SubscriptionID string `yaml:"SubscriptionID"` ClientID string `yaml:"ClientID"` ClientSecret string `yaml:"ClientSecret"` ResourceGroup string `yaml:"ResourceGroup"` ResourceLocation string `yaml:"ResourceLocation"` ManagementGroup string `yaml:"ManagementGroup"` Identity struct { DefaultNamespaceAI string `yaml:"DefaultNamespaceAI"` DefaultNamespaceAIB string `yaml:"DefaultNamespaceAIB"` } }
type CloudProviders ¶
type CloudProviders struct {
Azure Azure `yaml:"Azure"`
}
type ConfigVars ¶
type ConfigVars struct { // NOTE: Env and Defaults are ONLY available if corresponding logic is added to defaults.go and getters.go ServicePacks ServicePacks `yaml:"ServicePacks"` CloudProviders CloudProviders `yaml:"CloudProviders"` OutputType string `yaml:"OutputType"` WriteDirectory string `yaml:"WriteDirectory"` AuditEnabled string `yaml:"AuditEnabled"` LogLevel string `yaml:"LogLevel"` OverwriteHistoricalAudits string `yaml:"OverwriteHistoricalAudits"` TagExclusions []string `yaml:"TagExclusions"` Tags string // set by flags VarsFile string // set by flags only NoSummary bool // set by flags only Silent bool // set by flags only Meta Meta // set by CLI options only }
ConfigVars contains all possible config vars
var Vars ConfigVars
Vars is a singleton instance of ConfigVars
func NewConfig ¶
func NewConfig(c string) (ConfigVars, error)
NewConfig overrides the current config.Vars values
func (*ConfigVars) AuditDir ¶
func (ctx *ConfigVars) AuditDir() string
AuditDir creates and returns -audit- directory within WriteDirectory
func (*ConfigVars) CucumberDir ¶
func (ctx *ConfigVars) CucumberDir() string
CucumberDir creates and returns -cucumber- directory within WriteDirectory
func (*ConfigVars) GetTags ¶
func (ctx *ConfigVars) GetTags() string
GetTags returns Tags, prioritising command line parameter over vars file
func (*ConfigVars) GetWriteDirectory ¶
func (ctx *ConfigVars) GetWriteDirectory() string
GetWriteDirectory creates and returns the output folder specified in settings
func (*ConfigVars) SetTags ¶
func (ctx *ConfigVars) SetTags(tags map[string][]string)
func (*ConfigVars) TmpDir ¶
func (ctx *ConfigVars) TmpDir() string
TmpDir creates and returns -tmp- directory within WriteDirectory
type Kubernetes ¶
type Kubernetes struct { Probes []Probe `yaml:"Probes"` KubeConfigPath string `yaml:"KubeConfig"` KubeContext string `yaml:"KubeContext"` SystemClusterRoles []string `yaml:"SystemClusterRoles"` AuthorisedContainerRegistry string `yaml:"AuthorisedContainerRegistry"` ProbeImage string `yaml:"ProbeImage"` // contains filtered or unexported fields }
func (Kubernetes) IsExcluded ¶
func (k Kubernetes) IsExcluded() bool
Log and return exclusion configuration
type Probe ¶
type Scenario ¶
func (Scenario) IsExcluded ¶
Log and return exclusion configuration
type ServicePacks ¶
type ServicePacks struct { Kubernetes Kubernetes `yaml:"Kubernetes"` Storage Storage `yaml:"Storage"` }