add support for rest server backends

Backend configuration would be;

```
rest_repo:
  type: rest
  path: http://backup:8001/repo_name
```

Would result in the following env var;
```
RESTIC_REPOSITORY=rest:http://backup:8001/repo_name
```
This commit is contained in:
Ben Jones 2020-07-23 15:21:55 +12:00 committed by GitHub
parent ebb934d1c5
commit 1243721a7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -17,9 +17,8 @@ export const getPathFromBackend = (backend: Backend): string => {
case 'gs':
case 's3':
case 'sftp':
return `${backend.type}:${backend.path}`
case 'rest':
throw new Error(`Unsupported backend type: "${backend.type}"`)
return `${backend.type}:${backend.path}`
default:
throw new Error(`Unknown backend type.`)
}