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:
Harshavardhana
2020-04-07 19:30:59 -07:00
committed by GitHub
parent e7276b7b9b
commit 2642e12d14
16 changed files with 323 additions and 239 deletions

View File

@@ -26,7 +26,7 @@ import (
// GetConfig - returns the config.json of a minio setup, incoming data is encrypted.
func (adm *AdminClient) GetConfig(ctx context.Context) ([]byte, error) {
// Execute GET on /minio/admin/v2/config to get config of a setup.
// Execute GET on /minio/admin/v3/config to get config of a setup.
resp, err := adm.executeMethod(ctx,
http.MethodGet,
requestData{relPath: adminAPIPrefix + "/config"})
@@ -66,7 +66,7 @@ func (adm *AdminClient) SetConfig(ctx context.Context, config io.Reader) (err er
content: econfigBytes,
}
// Execute PUT on /minio/admin/v2/config to set config.
// Execute PUT on /minio/admin/v3/config to set config.
resp, err := adm.executeMethod(ctx, http.MethodPut, reqData)
defer closeResponse(resp)