Support for remote repository (#427)

Support for remote content repository where all contents and
manifests are fetched over HTTP(S) instead of locally
manipulating blob storage

* server: implement content and manifest access APIs
* apiclient: moved Kopia API client to separate package
* content: exposed content.ValidatePrefix()
* manifest: added JSON serialization attributes to EntryMetadata
* repo: changed repo.Open() to return Repository instead of *DirectRepository
* repo: added apiServerRepository
* cli: added 'kopia repository connect server'
  This sets up repository connection via the API server instead of
  directly-manipulated storage.
* server: add support for specifying a list of usernames/password via --htpasswd-file
* tests: added API server repository E2E test
* server: only return manifests (policies and snapshots) belonging to authenticated user
This commit is contained in:
Jarek Kowalski
2020-05-02 21:41:49 -07:00
committed by GitHub
parent 1377d057e4
commit be4b897579
38 changed files with 1048 additions and 327 deletions

View File

@@ -3,6 +3,7 @@
import (
"context"
"github.com/kopia/kopia/internal/apiclient"
"github.com/kopia/kopia/internal/serverapi"
)
@@ -14,6 +15,6 @@ func init() {
serverPauseCommand.Action(serverAction(runServerPause))
}
func runServerPause(ctx context.Context, cli *serverapi.Client) error {
func runServerPause(ctx context.Context, cli *apiclient.KopiaAPIClient) error {
return cli.Post(ctx, "sources/pause", &serverapi.Empty{}, &serverapi.Empty{})
}