Documentation ¶
Index ¶
- Constants
- func BindFlags(cmd *cobra.Command, v *viper.Viper) error
- func FormatNewError(flag1, flag2 string) error
- func GetAllFlags() map[string]interface{}
- func GetBoolFlag(flagName string) bool
- func GetIntFlag(flagName string) int
- func GetMultiStrFlag(flagName string) []string
- func GetStrFlag(flagName string) string
- func InitJSONFlags(cmd *cobra.Command, flagsListContent string, persistentFlag bool, ...) error
- func SetMultiStrFlag(flagName string, value []string)
- func SetStrFlag(flagName, value string)
- func Validate() error
- func ValidateQuerySelectionFlags() error
- func ValidateTypeSelectionFlags() error
Constants ¶
const ( AnalyzeResults = "analyze-results" AnalyzePath = "analyze-path" )
Flags constants for analyze
const ( CIFlag = "ci" LogFileFlag = "log-file" LogFileShorthand = "l" LogFormatFlag = "log-format" LogFormatShorthand = "f" LogLevelFlag = "log-level" LogPathFlag = "log-path" NoColorFlag = "no-color" ProfilingFlag = "profiling" SilentFlag = "silent" SilentShorthand = "s" VerboseFlag = "verbose" VerboseShorthand = "v" )
Flags constants for kics
const ( Results = "results" IncludeIds = "include-ids" )
Flags constants for remediate
const ( BomFlag = "bom" CloudProviderFlag = "cloud-provider" ConfigFlag = "config" DisableFullDescFlag = "disable-full-descriptions" ExcludeCategoriesFlag = "exclude-categories" ExcludePathsFlag = "exclude-paths" ExcludeQueriesFlag = "exclude-queries" ExcludeResultsFlag = "exclude-results" ExcludeSeveritiesFlag = "exclude-severities" IncludeQueriesFlag = "include-queries" InputDataFlag = "input-data" FailOnFlag = "fail-on" IgnoreOnExitFlag = "ignore-on-exit" MinimalUIFlag = "minimal-ui" NoProgressFlag = "no-progress" OutputNameFlag = "output-name" OutputPathFlag = "output-path" PathFlag = "path" PayloadPathFlag = "payload-path" PreviewLinesFlag = "preview-lines" QueriesPath = "queries-path" LibrariesPath = "libraries-path" ReportFormatsFlag = "report-formats" TypeFlag = "type" ExcludeTypeFlag = "exclude-type" TerraformVarsPathFlag = "terraform-vars-path" QueryExecTimeoutFlag = "timeout" LineInfoPayloadFlag = "payload-lines" DisableSecretsFlag = "disable-secrets" SecretsRegexesPathFlag = "secrets-regexes-path" //nolint:gosec ExcludeGitIgnore = "exclude-gitignore" )
Flags constants for scan
Variables ¶
This section is empty.
Functions ¶
func BindFlags ¶ added in v1.4.6
BindFlags fill flags values with config file or environment variables data
func FormatNewError ¶ added in v1.4.6
FormatNewError reports the impossibility of flag1 and flag2 usage simultaneously
func GetAllFlags ¶ added in v1.4.6
func GetAllFlags() map[string]interface{}
GetAllFlags returns all flags values
func GetBoolFlag ¶
GetBoolFlag get a boolean flag by its name
func GetMultiStrFlag ¶
GetMultiStrFlag get a slice of strings flag by its name
func InitJSONFlags ¶
func InitJSONFlags( cmd *cobra.Command, flagsListContent string, persistentFlag bool, supportedPlatforms, supportedCloudProviders []string) error
InitJSONFlags initialize cobra flags
func SetMultiStrFlag ¶
SetMultiStrFlag set a slice of strings flag using its name
func SetStrFlag ¶
func SetStrFlag(flagName, value string)
SetStrFlag set a string flag using its name
func Validate ¶
func Validate() error
Validate validate if flag values are ok, if not, returns an error
func ValidateQuerySelectionFlags ¶ added in v1.4.6
func ValidateQuerySelectionFlags() error
ValidateQuerySelectionFlags reports the impossibility of include and exclude flags usage simultaneously
func ValidateTypeSelectionFlags ¶ added in v1.6.14
func ValidateTypeSelectionFlags() error
ValidateTypeSelectionFlags reports the impossibility of include and exclude flags usage simultaneously
Types ¶
This section is empty.