working commit

This commit is contained in:
2026-02-19 18:04:34 +02:00
parent bb0f58f46c
commit 7f7e4706d6
5 changed files with 164 additions and 84 deletions
+5 -1
View File
@@ -325,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, usePathAs terms.PathAs) ([]descr.File, error) {
func (cli *Client) DeleteCollection(ctx context.Context, catalogURI string, usePathAs terms.PathAs, dryRun bool) ([]descr.File, error) {
var err error
res := make([]descr.File, 0)
@@ -337,10 +337,14 @@ func (cli *Client) DeleteCollection(ctx context.Context, catalogURI string, useP
if err != nil {
return res, err
}
// Add values
values := url.Values{}
if usePathAs != "" {
values.Add("pathAs", string(usePathAs))
}
if dryRun {
values.Add("dryRun", "true")
}
encodedValues := values.Encode()
if encodedValues != "" {
catalogURI = catalogURI + "?" + encodedValues