mirror of
https://github.com/pgsty/minio.git
synced 2026-10-09 11:15:57 +03:00
fix: change policies API to return and take struct (#9181)
This allows for order guarantees in returned values can be consumed safely by the caller to avoid any additional parsing and validation. Fixes #9171
This commit is contained in:
@@ -35,7 +35,7 @@ func (adm *AdminClient) DelConfigKV(ctx context.Context, k string) (err error) {
|
||||
content: econfigBytes,
|
||||
}
|
||||
|
||||
// Execute DELETE on /minio/admin/v2/del-config-kv to delete config key.
|
||||
// Execute DELETE on /minio/admin/v3/del-config-kv to delete config key.
|
||||
resp, err := adm.executeMethod(ctx, http.MethodDelete, reqData)
|
||||
|
||||
defer closeResponse(resp)
|
||||
@@ -62,7 +62,7 @@ func (adm *AdminClient) SetConfigKV(ctx context.Context, kv string) (err error)
|
||||
content: econfigBytes,
|
||||
}
|
||||
|
||||
// Execute PUT on /minio/admin/v2/set-config-kv to set config key/value.
|
||||
// Execute PUT on /minio/admin/v3/set-config-kv to set config key/value.
|
||||
resp, err := adm.executeMethod(ctx, http.MethodPut, reqData)
|
||||
|
||||
defer closeResponse(resp)
|
||||
@@ -82,7 +82,7 @@ func (adm *AdminClient) GetConfigKV(ctx context.Context, key string) (Targets, e
|
||||
v := url.Values{}
|
||||
v.Set("key", key)
|
||||
|
||||
// Execute GET on /minio/admin/v2/get-config-kv?key={key} to get value of key.
|
||||
// Execute GET on /minio/admin/v3/get-config-kv?key={key} to get value of key.
|
||||
resp, err := adm.executeMethod(ctx,
|
||||
http.MethodGet,
|
||||
requestData{
|
||||
|
||||
Reference in New Issue
Block a user