Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AwsxS3ConfigCmd = &cobra.Command{ Use: "getS3Config", Short: "getS3Config command gets s3 configuration", Long: `getS3Config command gets s3 configuration`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("executing getS3Config 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 { bucketName, _ := cmd.Flags().GetString("bucketName") if bucketName == "" { log.Printf("s3 bucket name missing") err := cmd.Help() if err != nil { return } return } instances, err := GetS3InstanceByBucketName(bucketName, clientAuth, nil) if err != nil { log.Println("error getting getS3Config by bucket name: ", err) return } fmt.Println(instances) } }, }
View Source
var AwsxS3ListCmd = &cobra.Command{ Use: "getS3List", Short: "getS3List command gets list of s3 instances of an aws account", Long: `getS3List command gets list of s3 instances of an aws account`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("executing getS3List 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 := ListS3Instances(clientAuth, nil) if err != nil { log.Println("error getting getS3List: ", err) return } fmt.Println(resp) } }, }
Functions ¶
Types ¶
type S3Bucket ¶
type S3Bucket struct { Bucket interface{} `json:"bucket"` Tags interface{} `json:"tags"` Region interface{} `json:"region"` }
Click to show internal directories.
Click to hide internal directories.