Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AwsxWafConfigCmd = &cobra.Command{ Use: "getWafConfig", Short: "getWafConfig command gets waf configuration", Long: `getWafConfig command gets waf configuration`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("executing getWafConfig command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { instanceId, _ := cmd.Flags().GetString("instanceId") if instanceId == "" { log.Printf("waf id missing") err := cmd.Help() if err != nil { return } return } instances, err := GetWafInstanceById(instanceId, clientAuth, nil) if err != nil { log.Println("error getting getWafConfig by bucket name: ", err) return } fmt.Println(instances) } }, }
View Source
var AwsxWafListCmd = &cobra.Command{ Use: "getWafList", Short: "getWafList command gets list of waf instances of an aws account", Long: `getWafList command gets list of waf instances of an aws account`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("executing getWafList command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { resp, err := ListWafInstances(clientAuth, nil) if err != nil { log.Println("error getting getWafList: ", err) return } fmt.Println(resp) } }, }
Functions ¶
func GetWafInstanceById ¶
func ListWafInstances ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.