Documentation
¶
Overview ¶
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GetConfigDataCmd = &cobra.Command{ Use: "getConfigData", Short: "A brief description of your command", Long: ``, Run: func(cmd *cobra.Command, args []string) { authFlag := authenticater.ChildCommandAuth(cmd) if authFlag { lambdaClient := client.GetClient() function, _ := cmd.Flags().GetString("function") lambdaDetail := controllers.GetLambdaDetail(lambdaClient, function) fmt.Println(lambdaDetail) } }, }
getConfigDataCmd represents the getConfigData command
View Source
var GetCostDataCmd = &cobra.Command{ Use: "getCostData", Short: "A brief description of your command", Long: ``, Run: func(cmd *cobra.Command, args []string) { vaultUrl := cmd.Parent().PersistentFlags().Lookup("vaultUrl").Value.String() accountNo := cmd.Parent().PersistentFlags().Lookup("accountId").Value.String() region := cmd.Parent().PersistentFlags().Lookup("zone").Value.String() acKey := cmd.Parent().PersistentFlags().Lookup("accessKey").Value.String() secKey := cmd.Parent().PersistentFlags().Lookup("secretKey").Value.String() crossAccountRoleArn := cmd.Parent().PersistentFlags().Lookup("crossAccountRoleArn").Value.String() externalId := cmd.Parent().PersistentFlags().Lookup("externalId").Value.String() authFlag := authenticater.AuthenticateData(vaultUrl, accountNo, region, acKey, secKey, crossAccountRoleArn, externalId) if authFlag { table, _ := cmd.Flags().GetString("table") getLambdaCostDetail(region, crossAccountRoleArn, acKey, secKey, table, externalId) } }, }
getConfigDataCmd represents the getConfigData command
View Source
var GetDetailOfErrorCmd = &cobra.Command{ Use: "errorDetail", Short: "to get details of error in lambda", Long: ``, Run: func(cmd *cobra.Command, args []string) { authFlag := authenticater.ChildCommandAuth(cmd) if authFlag { cloudClient := client.GetCloudWatchClient() function, _ := cmd.Flags().GetString("function") controllers.GetFunctionsErrDetail(cloudClient, function) } }, }
getConfigDataCmd represents the getConfigData command
View Source
var GetNumberOfErrorCmd = &cobra.Command{ Use: "errorCount", Short: "to total number of errors", Long: ``, Run: func(cmd *cobra.Command, args []string) { authFlag := authenticater.ChildCommandAuth(cmd) if authFlag { lambdaClient := client.GetClient() cloudClient := client.GetCloudWatchClient() function, _ := cmd.Flags().GetString("function") if function != "" { controllers.GetFunctionErrCount(cloudClient, function) } else { controllers.GetAllFunctionsErrCount(cloudClient, lambdaClient) } } }, }
getConfigDataCmd represents the getConfigData command
View Source
var GetTotalNumberOfLambdaCmd = &cobra.Command{ Use: "totalCount", Short: "gets total number of lambdas present in aws account", Long: ``, Run: func(cmd *cobra.Command, args []string) { authFlag := authenticater.ChildCommandAuth(cmd) if authFlag { lambdaClient := client.GetClient() totalNumber := len(controllers.GetAllLambdaList(lambdaClient)) fmt.Println("total number of lambda present in aws account in", authenticater.Region, "is:", totalNumber) } }, }
GetTotalNumberOfLambdaCmd represents the number command
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.