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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user