func OpenAPIServer(ctx context.Context, si *APIServerInfo, cliOpts ClientOptions, cachingOptions *content.CachingOptions, password string) (Repository, error) {
	contentCache, err := getContentCacheOrNil(ctx, cachingOptions, password)
	if err != nil {
		return nil, errors.Wrap(err, "error opening content cache")
	}

	if si.DisableGRPC {
		return openRestAPIRepository(ctx, si, cliOpts, contentCache, password)
	}

	return OpenGRPCAPIRepository(ctx, si, cliOpts, contentCache, password)
}
// OpenAPIServer connects remote repository over Kopia API.
OpenAPIServer connects remote repository over Kopia API.
// OpenAPIServer connects remote repository over Kopia API .
func OpenAPIServer(ctx context.Context, si *APIServerInfo, cliOpts ClientOptions, cachingOptions *content.CachingOptions, password string) (Repository, error) {
	contentCache, err := getContentCacheOrNil(ctx, cachingOptions, password)
	if err != nil {
		return nil, errors.Wrap(err, "error opening content cache")
	}
	if si.DisableGRPC {
		return openRestAPIRepository(ctx, si, cliOpts, contentCache, password)
	}
	return OpenGRPCAPIRepository(ctx, si, cliOpts, contentCache, password)
}
func OpenAPIServer ( ctx context . Context , si * APIServerInfo , cliOpts ClientOptions , cachingOptions * content . CachingOptions , password string ) ( Repository , error ) { contentCache , err := getContentCacheOrNil ( ctx , cachingOptions , password ) if err != nil { return nil , errors . Wrap ( err , " " ) } if si . DisableGRPC { return openRestAPIRepository ( ctx , si , cliOpts , contentCache , password ) } return OpenGRPCAPIRepository ( ctx , si , cliOpts , contentCache , password ) }
OpenAPIServer connects remote repository over Kopia API.
OpenAPIServer connects remote repository over Kopia API .