cmd

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultHost is the default hostname of the Fugue API
	DefaultHost = "api.riskmanager.fugue.co"

	// DefaultBase is the base path of the Fugue API
	DefaultBase = "v0"
)
View Source
const (
	// DefaultErrorExitCode is the exit code value when an error occurs
	DefaultErrorExitCode = 1
)

Variables

This section is empty.

Functions

func CheckErr

func CheckErr(err error)

CheckErr prints a user friendly error to STDERR and exits with a non-zero exit code. Unrecognized errors will be printed with an "error: " prefix.

func Execute

func Execute(version, commit string)

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func Fatal

func Fatal(msg string, code int)

Fatal prints the message (if provided) and then exits.

func NewCreateAwsEnvironmentCommand added in v0.2.0

func NewCreateAwsEnvironmentCommand() *cobra.Command

NewCreateAwsEnvironmentCommand returns a command that creates an environment

func NewCreateAzureEnvironmentCommand added in v0.2.0

func NewCreateAzureEnvironmentCommand() *cobra.Command

NewCreateAzureEnvironmentCommand returns a command that creates an environment

func NewCreatePolicyCommand

func NewCreatePolicyCommand() *cobra.Command

NewCreatePolicyCommand returns a command that creates an IAM policy that can be used to allow Fugue to scan an environment

func NewCreateRuleCommand added in v0.4.0

func NewCreateRuleCommand() *cobra.Command

NewCreateRuleCommand returns a command that creates a custom rule

func NewDeleteEnvironmentCommand

func NewDeleteEnvironmentCommand() *cobra.Command

NewDeleteEnvironmentCommand returns a command that deletes an environment

func NewDeleteRuleCommand added in v0.4.0

func NewDeleteRuleCommand() *cobra.Command

NewDeleteRuleCommand returns a command that deletes a custom rule

func NewGetEnvironmentCommand

func NewGetEnvironmentCommand() *cobra.Command

NewGetEnvironmentCommand returns a command that retrieves environment details

func NewGetResourceTypesCommand

func NewGetResourceTypesCommand() *cobra.Command

NewGetResourceTypesCommand returns a command that retrives available resource types for the given provider and region

func NewGetRuleCommand added in v0.4.0

func NewGetRuleCommand() *cobra.Command

NewGetRuleCommand returns a command that retrieves custom rule details

func NewGetScanCommand

func NewGetScanCommand() *cobra.Command

NewGetScanCommand returns a command that retrives details of a single scan

func NewGetScanComplianceByResourceTypesCommand

func NewGetScanComplianceByResourceTypesCommand() *cobra.Command

NewGetScanComplianceByResourceTypesCommand returns a command that retrives compliance by resource types

func NewGetScanComplianceByRulesCommand

func NewGetScanComplianceByRulesCommand() *cobra.Command

NewGetScanComplianceByRulesCommand returns a command that retrives compliance by rule

func NewListEnvironmentsCommand

func NewListEnvironmentsCommand() *cobra.Command

NewListEnvironmentsCommand returns a command that lists environments in Fugue

func NewListEventsCommand

func NewListEventsCommand() *cobra.Command

NewListEventsCommand returns a command that lists events in an environment

func NewListRulesCommand added in v0.4.0

func NewListRulesCommand() *cobra.Command

NewListRulesCommand returns a command that lists custom rules in Fugue

func NewListScansCommand

func NewListScansCommand() *cobra.Command

NewListScansCommand returns a command that lists scans in Fugue

func NewSyncRulesCommand added in v0.4.0

func NewSyncRulesCommand() *cobra.Command

NewSyncRulesCommand returns a command that watches a directory for changes to rego files

func NewTriggerScanCommand

func NewTriggerScanCommand() *cobra.Command

NewTriggerScanCommand returns a command that scans a specified environment

func NewUpdateEnvironmentCommand

func NewUpdateEnvironmentCommand() *cobra.Command

NewUpdateEnvironmentCommand returns a command that updates an environment

func NewUpdateRuleCommand added in v0.4.0

func NewUpdateRuleCommand() *cobra.Command

NewUpdateRuleCommand returns a command that updates a custom rule

Types

type Item

type Item struct {
	Attribute string
	Value     interface{}
}

Item is used to display an attribute and its value to the user

Jump to

Keyboard shortcuts

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