copy_from_cloud

package
v0.81.0-dev-3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:     "copy-from-cloud <cloud alias> <local target file>",
	Short:   "Copy local file from temporary cloud storage",
	Aliases: []string{"cfc"},
	Args:    cobra.ExactArgs(2),
	Run: func(c *cobra.Command, args []string) {
		sourceAlias := args[0]
		targetFilePath := args[1]

		accessKey, secretKey, region,
			endpoint, bucketName, _ := vault_s3_utils.GetS3Secrets("secret/data/slu/cloud-copy")

		err := s3_utils.DownloadToFile(
			accessKey,
			secretKey,
			region,
			endpoint,
			bucketName,
			sourceAlias,
			targetFilePath,
		)
		if err != nil {
			log.Fatalln(err)
		}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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