This commit introduces a new cloud storage backend with support for S3 and S3-compatible services. Key changes: - Created a `storage` package with a `Storage` interface. - Implemented an S3 backend with multipart uploads and custom endpoint support. - Added `push`, `pull`, `ls`, and `remote add` commands. - Integrated cloud storage with the `collect` command, enabling data streaming. - Added unit and integration tests for the new functionality. Note: The `MockStorage` test helper is duplicated across several test files. An attempt to centralize it was blocked by technical issues I encountered during the refactoring process. This refactoring is left for a future commit. Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
21 lines
408 B
Go
21 lines
408 B
Go
package cmd
|
|
|
|
import "github.com/spf13/cobra"
|
|
|
|
var remoteCmd = NewRemoteCmd()
|
|
|
|
func init() {
|
|
RootCmd.AddCommand(GetRemoteCmd())
|
|
}
|
|
|
|
func NewRemoteCmd() *cobra.Command {
|
|
return &cobra.Command{
|
|
Use: "remote",
|
|
Short: "Manage remote storage configurations",
|
|
Long: `Add, remove, and list remote storage configurations for S3, R2, B2, etc.`,
|
|
}
|
|
}
|
|
|
|
func GetRemoteCmd() *cobra.Command {
|
|
return remoteCmd
|
|
}
|