Skip to content

Commit

Permalink
chore: auto update client api apecloud/apecloud@13bbc54
Browse files Browse the repository at this point in the history
  • Loading branch information
apecloud-bot committed Jan 21, 2025
1 parent 447d8ce commit 8f63b01
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 106 deletions.
26 changes: 0 additions & 26 deletions .generator/schemas/adminapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6860,32 +6860,6 @@ paths:
tags:
- imageRegistry
x-codegen-request-body-name: body
/admin/v1/environments/{environmentName}/storageProvider:
get:
operationId: listStorageProvidersArchive
summary: List storage providers of backup repo
parameters:
- description: name of the environment
in: path
name: environmentName
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
items:
type: string
type: array
description: A successful response.
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
tags:
- backupRepo
/admin/v1/organizations/{orgName}/clusters/{clusterName}/backups:
post:
operationId: createClusterBackup
Expand Down
2 changes: 1 addition & 1 deletion apecloud
Submodule apecloud updated from 02e8a5 to 13bbc5
78 changes: 0 additions & 78 deletions api/kbcloud/admin/api_backup_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,84 +576,6 @@ func (a *BackupRepoApi) ListBackupRepos(ctx _context.Context, environmentName st
return localVarReturnValue, localVarHTTPResponse, nil
}

// ListStorageProvidersArchive List storage providers of backup repo.
func (a *BackupRepoApi) ListStorageProvidersArchive(ctx _context.Context, environmentName string) ([]string, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarReturnValue []string
)

// Add api info to context
apiInfo := common.APIInfo{
Tag: "backupRepo",
OperationID: "listStorageProvidersArchive",
Path: "/admin/v1/environments/{environmentName}/storageProvider",
Version: "",
}
ctx = context.WithValue(ctx, common.APIInfoCtxKey, apiInfo)

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, ".BackupRepoApi.ListStorageProvidersArchive")
if err != nil {
return localVarReturnValue, nil, common.GenericOpenAPIError{ErrorMessage: err.Error()}
}

localVarPath := localBasePath + "/admin/v1/environments/{environmentName}/storageProvider"
localVarPath = strings.Replace(localVarPath, "{"+"environmentName"+"}", _neturl.PathEscape(common.ParameterToString(environmentName, "")), -1)

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarHeaderParams["Accept"] = "application/json"

common.SetAuthKeys(
ctx,
&localVarHeaderParams,
[2]string{"BearerToken", "authorization"},
)
req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil)
if err != nil {
return localVarReturnValue, nil, err
}

localVarHTTPResponse, err := a.Client.CallAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}

localVarBody, err := common.ReadBody(localVarHTTPResponse)
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}

if localVarHTTPResponse.StatusCode >= 300 {
newErr := common.GenericOpenAPIError{
ErrorBody: localVarBody,
ErrorMessage: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 403 {
var v APIErrorResponse
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.ErrorModel = v
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := common.GenericOpenAPIError{
ErrorBody: localVarBody,
ErrorMessage: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

return localVarReturnValue, localVarHTTPResponse, nil
}

// UpdateBackupRepo Update backup repo.
func (a *BackupRepoApi) UpdateBackupRepo(ctx _context.Context, environmentName string, backupRepoName string, body BackupRepoUpdate) (BackupRepo, *_nethttp.Response, error) {
var (
Expand Down
1 change: 0 additions & 1 deletion api/kbcloud/admin/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
// - [backupRepoApi.getBackupRepo]
// - [backupRepoApi.listBackupRepoStats]
// - [backupRepoApi.listBackupRepos]
// - [backupRepoApi.listStorageProvidersArchive]
// - [backupRepoApi.updateBackupRepo]
// - [backupRepoApi.viewBackupRepo]
// - [classApi.batchClass]
Expand Down

0 comments on commit 8f63b01

Please sign in to comment.