1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-16 08:13:20 +00:00

Add a storage backend for Storj

The url format is storj://satellite/bucket/path.  You can get the
satellite along with the api access key when requesting an Access
Grant of type API Access.
This commit is contained in:
Gilbert Chen
2022-09-30 10:30:06 -04:00
parent cde660ee9f
commit 6009f64b66
3 changed files with 208 additions and 0 deletions

View File

@@ -169,6 +169,13 @@ func loadStorage(localStoragePath string, threads int) (Storage, error) {
}
storage.SetDefaultNestingLevels([]int{2, 3}, 2)
return storage, err
} else if *testStorageName == "storj" {
storage, err := CreateStorjStorage(config["satellite"], config["key"], config["passphrase"], config["bucket"], config["storage_path"], threads)
if err != nil {
return nil, err
}
storage.SetDefaultNestingLevels([]int{2, 3}, 2)
return storage, err
}
return nil, fmt.Errorf("Invalid storage named: %s", *testStorageName)