Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AwsxApiGwConfigCmd = &cobra.Command{ Use: "getApiGwConfig", Short: "getApiGwConfig command gets apigw configuration", Long: `getApiGwConfig command gets apigw configuration`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("executing getApiGwRestApiConfig 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 { apiKey, _ := cmd.Flags().GetString("apiKey") if apiKey == "" { log.Printf("api key missing") err := cmd.Help() if err != nil { return } return } instances, err := GetApiGwById(apiKey, clientAuth, nil) if err != nil { log.Println("error getting getApiGwConfig by api key: ", err) return } fmt.Println(instances) } }, }
View Source
var AwsxApiGwListCmd = &cobra.Command{ Use: "getApiGwList", Short: "getApiGwList command gets list of apigw rest api instances of an aws account", Long: `getApiGwList command gets list of apigw rest api instances of an aws account`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("executing getApiGwList 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 { instances, err := ListApiGwInstances(clientAuth, nil) if err != nil { log.Println("error getting getApiGwList: ", err) return } fmt.Println(instances) } }, }
Functions ¶
func GetApiGwById ¶
func GetApiGwById(apiKey string, clientAuth *model.Auth, client *apigateway.APIGateway) (*apigateway.RestApi, error)
func ListApiGwInstances ¶
func ListApiGwInstances(clientAuth *model.Auth, client *apigateway.APIGateway) (*apigateway.GetRestApisOutput, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.