bucketcmd

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: Apache-2.0 Imports: 8 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 != "" {
				GetBucketDetail(bucketName, *clientAuth)
			} else {
				log.Fatalln("bucket name not provided. program exit")
			}
		}

	},
}

GetConfigDataCmd represents the getConfigData command

Functions

func GetBucketDetail added in v1.0.4

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

func GetBucketDetailWithTags added in v1.0.4

func GetBucketDetailWithTags(bucketName string, auth client.Auth) (string, error)

func GetBucketListWithDetails added in v1.0.4

func GetBucketListWithDetails(auth client.Auth) ([]*s3.ListObjectsV2Output, error)

Types

type S3Bucket added in v1.0.4

type S3Bucket struct {
	Bucket interface{} `json:"bucket"`
	Tags   interface{} `json:"tags"`
}

Jump to

Keyboard shortcuts

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