bucketcmd

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetConfigDataCmd = &cobra.Command{
	Use:   "getConfigData",
	Short: "Get S3 bucket configuration",
	Long:  `Get S3 bucket configuration`,
	Run: func(cmd *cobra.Command, args []string) {
		authFlag, clientAuth, err := authenticate.SubCommandAuth(cmd)
		if err != nil {
			cmd.Help()
			return
		}

		if authFlag {
			bucketName, _ := cmd.Flags().GetString("bucketName")
			if bucketName != "" {
				GetBucketDetails(bucketName, *clientAuth)
			} else {
				log.Fatalln("bucket name not provided. program exit")
			}
		}

	},
}

GetConfigDataCmd represents the getConfigData command

Functions

func GetBucketDetails

func GetBucketDetails(bucketName string, auth client.Auth) (*s3.ListObjectsV2Output, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL