working commit
This commit is contained in:
@@ -14,9 +14,9 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"mstore/app/descr"
|
||||
"mstore/app/handler"
|
||||
"mstore/app/operator"
|
||||
"mstore/pkg/descr"
|
||||
)
|
||||
|
||||
func (cli *Client) CreateAccount(ctx context.Context, hosturi, username, password string) (string, error) {
|
||||
|
||||
+10
-6
@@ -21,8 +21,9 @@ import (
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
"mstore/app/descr"
|
||||
"mstore/pkg/auxhttp"
|
||||
"mstore/pkg/descr"
|
||||
"mstore/pkg/terms"
|
||||
)
|
||||
|
||||
func (cli *Client) FileInfo(ctx context.Context, fileuri string) (bool, *descr.File, error) {
|
||||
@@ -324,7 +325,7 @@ func (cli *Client) ListCollections(ctx context.Context, catalogURI string) ([]st
|
||||
return res, err
|
||||
}
|
||||
|
||||
func (cli *Client) DeleteCollection(ctx context.Context, catalogURI string, isPattern bool) ([]descr.File, error) {
|
||||
func (cli *Client) DeleteCollection(ctx context.Context, catalogURI string, usePathAs terms.PathAs) ([]descr.File, error) {
|
||||
var err error
|
||||
res := make([]descr.File, 0)
|
||||
|
||||
@@ -336,10 +337,13 @@ func (cli *Client) DeleteCollection(ctx context.Context, catalogURI string, isPa
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
if isPattern {
|
||||
values := url.Values{}
|
||||
values.Add("isPattern", "true")
|
||||
catalogURI = catalogURI + "?" + values.Encode()
|
||||
values := url.Values{}
|
||||
if usePathAs != "" {
|
||||
values.Add("pathAs", string(usePathAs))
|
||||
}
|
||||
encodedValues := values.Encode()
|
||||
if encodedValues != "" {
|
||||
catalogURI = catalogURI + "?" + encodedValues
|
||||
}
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, http.MethodDelete, catalogURI, nil)
|
||||
|
||||
+1
-1
@@ -14,9 +14,9 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"mstore/app/descr"
|
||||
"mstore/app/handler"
|
||||
"mstore/app/operator"
|
||||
"mstore/pkg/descr"
|
||||
)
|
||||
|
||||
func (cli *Client) CreateGrantByAccountID(ctx context.Context, hosturi, accountID, right, pattern string) (string, error) {
|
||||
|
||||
Reference in New Issue
Block a user