aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/migrate_storage.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/migrate_storage.go')
-rw-r--r--cmd/migrate_storage.go28
1 files changed, 15 insertions, 13 deletions
diff --git a/cmd/migrate_storage.go b/cmd/migrate_storage.go
index 291e7695b5..511db6cbf7 100644
--- a/cmd/migrate_storage.go
+++ b/cmd/migrate_storage.go
@@ -179,7 +179,7 @@ func runMigrateStorage(ctx *cli.Context) error {
switch strings.ToLower(ctx.String("storage")) {
case "":
fallthrough
- case string(storage.LocalStorageType):
+ case string(setting.LocalStorageType):
p := ctx.String("path")
if p == "" {
log.Fatal("Path must be given when storage is loal")
@@ -187,22 +187,24 @@ func runMigrateStorage(ctx *cli.Context) error {
}
dstStorage, err = storage.NewLocalStorage(
stdCtx,
- storage.LocalStorageConfig{
+ &setting.Storage{
Path: p,
})
- case string(storage.MinioStorageType):
+ case string(setting.MinioStorageType):
dstStorage, err = storage.NewMinioStorage(
stdCtx,
- storage.MinioStorageConfig{
- Endpoint: ctx.String("minio-endpoint"),
- AccessKeyID: ctx.String("minio-access-key-id"),
- SecretAccessKey: ctx.String("minio-secret-access-key"),
- Bucket: ctx.String("minio-bucket"),
- Location: ctx.String("minio-location"),
- BasePath: ctx.String("minio-base-path"),
- UseSSL: ctx.Bool("minio-use-ssl"),
- InsecureSkipVerify: ctx.Bool("minio-insecure-skip-verify"),
- ChecksumAlgorithm: ctx.String("minio-checksum-algorithm"),
+ &setting.Storage{
+ MinioConfig: setting.MinioStorageConfig{
+ Endpoint: ctx.String("minio-endpoint"),
+ AccessKeyID: ctx.String("minio-access-key-id"),
+ SecretAccessKey: ctx.String("minio-secret-access-key"),
+ Bucket: ctx.String("minio-bucket"),
+ Location: ctx.String("minio-location"),
+ BasePath: ctx.String("minio-base-path"),
+ UseSSL: ctx.Bool("minio-use-ssl"),
+ InsecureSkipVerify: ctx.Bool("minio-insecure-skip-verify"),
+ ChecksumAlgorithm: ctx.String("minio-checksum-algorithm"),
+ },
})
default:
return fmt.Errorf("unsupported storage type: %s", ctx.String("storage"))