cmd

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 40 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 NewCreateFamilyCommand added in v0.15.0

func NewCreateFamilyCommand() *cobra.Command

NewCreateFamilyCommand returns a command that creates a family

func NewCreateGoogleEnvironmentCommand added in v0.13.0

func NewCreateGoogleEnvironmentCommand() *cobra.Command

NewCreateGoogleEnvironmentCommand returns a command that creates an environment

func NewCreateGroupCommand added in v0.9.0

func NewCreateGroupCommand() *cobra.Command

NewCreateGroupCommand returns a command that creates an group

func NewCreateInviteCommand added in v0.9.0

func NewCreateInviteCommand() *cobra.Command

NewCreateInviteCommand returns a command that creates an invite

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 NewCreateRepositoryEnvironmentCommand added in v0.18.0

func NewCreateRepositoryEnvironmentCommand() *cobra.Command

NewCreateRepositoryEnvironmentCommand returns a command that creates a repository environment

func NewCreateRuleCommand added in v0.4.0

func NewCreateRuleCommand() *cobra.Command

NewCreateRuleCommand returns a command that creates a custom rule

func NewCreateRuleWaiverCommand added in v0.11.0

func NewCreateRuleWaiverCommand() *cobra.Command

NewCreateRuleWaiverCommand returns a command that creates a custom rule

func NewDeleteEnvironmentCommand

func NewDeleteEnvironmentCommand() *cobra.Command

NewDeleteEnvironmentCommand returns a command that deletes an environment

func NewDeleteFamilyCommand added in v0.15.0

func NewDeleteFamilyCommand() *cobra.Command

NewDeleteFamilyCommand returns a command that deletes a family

func NewDeleteRuleCommand added in v0.4.0

func NewDeleteRuleCommand() *cobra.Command

NewDeleteRuleCommand returns a command that deletes a custom rule

func NewDeleteRuleWaiverCommand added in v0.11.0

func NewDeleteRuleWaiverCommand() *cobra.Command

NewDeleteRuleWaiverCommand returns a command that deletes a custom rule

func NewGetEnvironmentCommand

func NewGetEnvironmentCommand() *cobra.Command

NewGetEnvironmentCommand returns a command that retrieves environment details

func NewGetFamilyCommand added in v0.15.0

func NewGetFamilyCommand() *cobra.Command

NewGetFamilyCommand returns a command that retrieves custom family details

func NewGetInviteCommand added in v0.9.0

func NewGetInviteCommand() *cobra.Command

NewGetInviteCommand returns a command that retrieves invite 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 NewGetRuleInputCommand added in v0.8.0

func NewGetRuleInputCommand() *cobra.Command

func NewGetRuleWaiverCommand added in v0.11.0

func NewGetRuleWaiverCommand() *cobra.Command

NewGetRuleWaiverCommand returns a command that retrieves rule waiver 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 NewGetUserCommand added in v0.9.0

func NewGetUserCommand() *cobra.Command

NewGetUserCommand returns a command that retrieves user details

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 NewListFamiliesCommand added in v0.15.0

func NewListFamiliesCommand() *cobra.Command

NewListFamiliesCommand returns a command that lists families in Fugue

func NewListGroupsCommand added in v0.9.0

func NewListGroupsCommand() *cobra.Command

NewListGroupsCommand returns a command that lists groups in Fugue

func NewListInvitesCommand added in v0.9.0

func NewListInvitesCommand() *cobra.Command

NewListInvitesCommand returns a command that lists invites in Fugue

func NewListRuleWaiversCommand added in v0.11.0

func NewListRuleWaiversCommand() *cobra.Command

NewListRuleWaiversCommand returns a command that lists rule waivers in Fugue

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 NewListUsersCommand added in v0.9.0

func NewListUsersCommand() *cobra.Command

NewListUsersCommand returns a command that lists users 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 NewTestRuleCommand added in v0.8.0

func NewTestRuleCommand() *cobra.Command

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 NewUpdateFamilyCommand added in v0.15.0

func NewUpdateFamilyCommand() *cobra.Command

NewUpdateFamilyCommand returns a command that updates a custom family

func NewUpdateRuleCommand added in v0.4.0

func NewUpdateRuleCommand() *cobra.Command

NewUpdateRuleCommand returns a command that updates a custom rule

func NewUpdateRuleWaiverCommand added in v0.11.0

func NewUpdateRuleWaiverCommand() *cobra.Command

NewUpdateRuleWaiverCommand returns a command that updates a rule waiver

func NewUpdateUsersGroups added in v0.9.0

func NewUpdateUsersGroups() *cobra.Command

NewUpdateUsersGroups returns a command that allows updating groups for multiple users

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