Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "copy-to-cloud <local source file> <cloud alias>", Short: "Copy local file to temporary cloud storage", Aliases: []string{"ctc"}, Args: cobra.ExactArgs(2), Run: func(c *cobra.Command, args []string) { sourceFile := args[0] targetAlias := args[1] f, err := os.Open(sourceFile) if err != nil { log.Fatalln(err) } accessKey, secretKey, region, endpoint, bucketName, err := vault_s3_utils.GetS3Secrets("secret/data/slu/cloud-copy") if err != nil { log.Fatalln(err) } err = s3_utils.Upload( accessKey, secretKey, region, endpoint, bucketName, targetAlias, f, ) if err != nil { log.Fatalln(err) } }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.