Merge pull request 'api-v1 golang' (#1) from v0.9.x into main

Reviewed-on: #1
This commit is contained in:
Quentin 2023-11-28 15:36:12 +00:00
commit 8b81fae65e
63 changed files with 2978 additions and 1011 deletions

View file

@ -12,6 +12,7 @@ docs/AddKeyRequest.md
docs/AddNode200ResponseInner.md docs/AddNode200ResponseInner.md
docs/AllowBucketKeyRequest.md docs/AllowBucketKeyRequest.md
docs/AllowBucketKeyRequestPermissions.md docs/AllowBucketKeyRequestPermissions.md
docs/ApplyLayout200Response.md
docs/BucketApi.md docs/BucketApi.md
docs/BucketInfo.md docs/BucketInfo.md
docs/BucketInfoQuotas.md docs/BucketInfoQuotas.md
@ -21,6 +22,7 @@ docs/ClusterLayout.md
docs/CreateBucketRequest.md docs/CreateBucketRequest.md
docs/CreateBucketRequestLocalAlias.md docs/CreateBucketRequestLocalAlias.md
docs/CreateBucketRequestLocalAliasAllow.md docs/CreateBucketRequestLocalAliasAllow.md
docs/GetHealth200Response.md
docs/GetNodes200Response.md docs/GetNodes200Response.md
docs/ImportKeyRequest.md docs/ImportKeyRequest.md
docs/KeyApi.md docs/KeyApi.md
@ -35,6 +37,9 @@ docs/ListBuckets200ResponseInnerLocalAliasesInner.md
docs/ListKeys200ResponseInner.md docs/ListKeys200ResponseInner.md
docs/NodeClusterInfo.md docs/NodeClusterInfo.md
docs/NodeNetworkInfo.md docs/NodeNetworkInfo.md
docs/NodeRoleChange.md
docs/NodeRoleRemove.md
docs/NodeRoleUpdate.md
docs/NodesApi.md docs/NodesApi.md
docs/UpdateBucketRequest.md docs/UpdateBucketRequest.md
docs/UpdateBucketRequestQuotas.md docs/UpdateBucketRequestQuotas.md
@ -49,6 +54,7 @@ model_add_key_request.go
model_add_node_200_response_inner.go model_add_node_200_response_inner.go
model_allow_bucket_key_request.go model_allow_bucket_key_request.go
model_allow_bucket_key_request_permissions.go model_allow_bucket_key_request_permissions.go
model_apply_layout_200_response.go
model_bucket_info.go model_bucket_info.go
model_bucket_info_quotas.go model_bucket_info_quotas.go
model_bucket_info_website_config.go model_bucket_info_website_config.go
@ -57,6 +63,7 @@ model_cluster_layout.go
model_create_bucket_request.go model_create_bucket_request.go
model_create_bucket_request_local_alias.go model_create_bucket_request_local_alias.go
model_create_bucket_request_local_alias_allow.go model_create_bucket_request_local_alias_allow.go
model_get_health_200_response.go
model_get_nodes_200_response.go model_get_nodes_200_response.go
model_import_key_request.go model_import_key_request.go
model_key_info.go model_key_info.go
@ -69,6 +76,9 @@ model_list_buckets_200_response_inner_local_aliases_inner.go
model_list_keys_200_response_inner.go model_list_keys_200_response_inner.go
model_node_cluster_info.go model_node_cluster_info.go
model_node_network_info.go model_node_network_info.go
model_node_role_change.go
model_node_role_remove.go
model_node_role_update.go
model_update_bucket_request.go model_update_bucket_request.go
model_update_bucket_request_quotas.go model_update_bucket_request_quotas.go
model_update_bucket_request_website_access.go model_update_bucket_request_website_access.go

View file

@ -8,8 +8,8 @@ Administrate your Garage cluster programatically, including status, layout, keys
## Overview ## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
- API version: v0.8.0 - API version: v0.9.0
- Package version: 0.8.0 - Package version: 0.9.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen - Build package: org.openapitools.codegen.languages.GoClientCodegen
## Installation ## Installation
@ -77,35 +77,34 @@ ctx = context.WithValue(context.Background(), garage.ContextOperationServerVaria
## Documentation for API Endpoints ## Documentation for API Endpoints
All URIs are relative to *http://localhost:3903/v0* All URIs are relative to *http://localhost:3903/v1*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*BucketApi* | [**AllowBucketKey**](docs/BucketApi.md#allowbucketkey) | **Post** /bucket/allow | Allow key *BucketApi* | [**AllowBucketKey**](docs/BucketApi.md#allowbucketkey) | **Post** /bucket/allow | Allow key
*BucketApi* | [**CreateBucket**](docs/BucketApi.md#createbucket) | **Post** /bucket | Create a bucket *BucketApi* | [**CreateBucket**](docs/BucketApi.md#createbucket) | **Post** /bucket | Create a bucket
*BucketApi* | [**DeleteBucket**](docs/BucketApi.md#deletebucket) | **Delete** /bucket?id={bucket_id} | Delete a bucket *BucketApi* | [**DeleteBucket**](docs/BucketApi.md#deletebucket) | **Delete** /bucket | Delete a bucket
*BucketApi* | [**DeleteBucketGlobalAlias**](docs/BucketApi.md#deletebucketglobalalias) | **Delete** /bucket/alias/global | Delete a global alias *BucketApi* | [**DeleteBucketGlobalAlias**](docs/BucketApi.md#deletebucketglobalalias) | **Delete** /bucket/alias/global | Delete a global alias
*BucketApi* | [**DeleteBucketLocalAlias**](docs/BucketApi.md#deletebucketlocalalias) | **Delete** /bucket/alias/local | Delete a local alias *BucketApi* | [**DeleteBucketLocalAlias**](docs/BucketApi.md#deletebucketlocalalias) | **Delete** /bucket/alias/local | Delete a local alias
*BucketApi* | [**DenyBucketKey**](docs/BucketApi.md#denybucketkey) | **Post** /bucket/deny | Deny key *BucketApi* | [**DenyBucketKey**](docs/BucketApi.md#denybucketkey) | **Post** /bucket/deny | Deny key
*BucketApi* | [**FindBucketInfo**](docs/BucketApi.md#findbucketinfo) | **Get** /bucket?globalAlias={alias} | Find a bucket *BucketApi* | [**GetBucketInfo**](docs/BucketApi.md#getbucketinfo) | **Get** /bucket | Get a bucket
*BucketApi* | [**GetBucketInfo**](docs/BucketApi.md#getbucketinfo) | **Get** /bucket?id={bucket_id} | Get a bucket *BucketApi* | [**ListBuckets**](docs/BucketApi.md#listbuckets) | **Get** /bucket?list | List all buckets
*BucketApi* | [**ListBuckets**](docs/BucketApi.md#listbuckets) | **Get** /bucket | List all buckets
*BucketApi* | [**PutBucketGlobalAlias**](docs/BucketApi.md#putbucketglobalalias) | **Put** /bucket/alias/global | Add a global alias *BucketApi* | [**PutBucketGlobalAlias**](docs/BucketApi.md#putbucketglobalalias) | **Put** /bucket/alias/global | Add a global alias
*BucketApi* | [**PutBucketLocalAlias**](docs/BucketApi.md#putbucketlocalalias) | **Put** /bucket/alias/local | Add a local alias *BucketApi* | [**PutBucketLocalAlias**](docs/BucketApi.md#putbucketlocalalias) | **Put** /bucket/alias/local | Add a local alias
*BucketApi* | [**UpdateBucket**](docs/BucketApi.md#updatebucket) | **Put** /bucket?id={bucket_id} | Update a bucket *BucketApi* | [**UpdateBucket**](docs/BucketApi.md#updatebucket) | **Put** /bucket | Update a bucket
*KeyApi* | [**AddKey**](docs/KeyApi.md#addkey) | **Post** /key | Create a new API key *KeyApi* | [**AddKey**](docs/KeyApi.md#addkey) | **Post** /key?list | Create a new API key
*KeyApi* | [**DeleteKey**](docs/KeyApi.md#deletekey) | **Delete** /key?id={access_key} | Delete a key *KeyApi* | [**DeleteKey**](docs/KeyApi.md#deletekey) | **Delete** /key | Delete a key
*KeyApi* | [**GetKey**](docs/KeyApi.md#getkey) | **Get** /key?id={access_key} | Get key information *KeyApi* | [**GetKey**](docs/KeyApi.md#getkey) | **Get** /key | Get key information
*KeyApi* | [**ImportKey**](docs/KeyApi.md#importkey) | **Post** /key/import | Import an existing key *KeyApi* | [**ImportKey**](docs/KeyApi.md#importkey) | **Post** /key/import | Import an existing key
*KeyApi* | [**ListKeys**](docs/KeyApi.md#listkeys) | **Get** /key | List all keys *KeyApi* | [**ListKeys**](docs/KeyApi.md#listkeys) | **Get** /key?list | List all keys
*KeyApi* | [**SearchKey**](docs/KeyApi.md#searchkey) | **Get** /key?search={pattern} | Select key by pattern *KeyApi* | [**UpdateKey**](docs/KeyApi.md#updatekey) | **Post** /key | Update a key
*KeyApi* | [**UpdateKey**](docs/KeyApi.md#updatekey) | **Post** /key?id={access_key} | Update a key
*LayoutApi* | [**AddLayout**](docs/LayoutApi.md#addlayout) | **Post** /layout | Send modifications to the cluster layout *LayoutApi* | [**AddLayout**](docs/LayoutApi.md#addlayout) | **Post** /layout | Send modifications to the cluster layout
*LayoutApi* | [**ApplyLayout**](docs/LayoutApi.md#applylayout) | **Post** /layout/apply | Apply staged layout *LayoutApi* | [**ApplyLayout**](docs/LayoutApi.md#applylayout) | **Post** /layout/apply | Apply staged layout
*LayoutApi* | [**GetLayout**](docs/LayoutApi.md#getlayout) | **Get** /layout | Details on the current and staged layout *LayoutApi* | [**GetLayout**](docs/LayoutApi.md#getlayout) | **Get** /layout | Details on the current and staged layout
*LayoutApi* | [**RevertLayout**](docs/LayoutApi.md#revertlayout) | **Post** /layout/revert | Clear staged layout *LayoutApi* | [**RevertLayout**](docs/LayoutApi.md#revertlayout) | **Post** /layout/revert | Clear staged layout
*NodesApi* | [**AddNode**](docs/NodesApi.md#addnode) | **Post** /connect | Connect target node to other Garage nodes *NodesApi* | [**AddNode**](docs/NodesApi.md#addnode) | **Post** /connect | Connect a new node
*NodesApi* | [**GetNodes**](docs/NodesApi.md#getnodes) | **Get** /status | Status of this node and other nodes in the cluster *NodesApi* | [**GetHealth**](docs/NodesApi.md#gethealth) | **Get** /health | Cluster health report
*NodesApi* | [**GetNodes**](docs/NodesApi.md#getnodes) | **Get** /status | Describe cluster
## Documentation For Models ## Documentation For Models
@ -114,6 +113,7 @@ Class | Method | HTTP request | Description
- [AddNode200ResponseInner](docs/AddNode200ResponseInner.md) - [AddNode200ResponseInner](docs/AddNode200ResponseInner.md)
- [AllowBucketKeyRequest](docs/AllowBucketKeyRequest.md) - [AllowBucketKeyRequest](docs/AllowBucketKeyRequest.md)
- [AllowBucketKeyRequestPermissions](docs/AllowBucketKeyRequestPermissions.md) - [AllowBucketKeyRequestPermissions](docs/AllowBucketKeyRequestPermissions.md)
- [ApplyLayout200Response](docs/ApplyLayout200Response.md)
- [BucketInfo](docs/BucketInfo.md) - [BucketInfo](docs/BucketInfo.md)
- [BucketInfoQuotas](docs/BucketInfoQuotas.md) - [BucketInfoQuotas](docs/BucketInfoQuotas.md)
- [BucketInfoWebsiteConfig](docs/BucketInfoWebsiteConfig.md) - [BucketInfoWebsiteConfig](docs/BucketInfoWebsiteConfig.md)
@ -122,6 +122,7 @@ Class | Method | HTTP request | Description
- [CreateBucketRequest](docs/CreateBucketRequest.md) - [CreateBucketRequest](docs/CreateBucketRequest.md)
- [CreateBucketRequestLocalAlias](docs/CreateBucketRequestLocalAlias.md) - [CreateBucketRequestLocalAlias](docs/CreateBucketRequestLocalAlias.md)
- [CreateBucketRequestLocalAliasAllow](docs/CreateBucketRequestLocalAliasAllow.md) - [CreateBucketRequestLocalAliasAllow](docs/CreateBucketRequestLocalAliasAllow.md)
- [GetHealth200Response](docs/GetHealth200Response.md)
- [GetNodes200Response](docs/GetNodes200Response.md) - [GetNodes200Response](docs/GetNodes200Response.md)
- [ImportKeyRequest](docs/ImportKeyRequest.md) - [ImportKeyRequest](docs/ImportKeyRequest.md)
- [KeyInfo](docs/KeyInfo.md) - [KeyInfo](docs/KeyInfo.md)
@ -134,6 +135,9 @@ Class | Method | HTTP request | Description
- [ListKeys200ResponseInner](docs/ListKeys200ResponseInner.md) - [ListKeys200ResponseInner](docs/ListKeys200ResponseInner.md)
- [NodeClusterInfo](docs/NodeClusterInfo.md) - [NodeClusterInfo](docs/NodeClusterInfo.md)
- [NodeNetworkInfo](docs/NodeNetworkInfo.md) - [NodeNetworkInfo](docs/NodeNetworkInfo.md)
- [NodeRoleChange](docs/NodeRoleChange.md)
- [NodeRoleRemove](docs/NodeRoleRemove.md)
- [NodeRoleUpdate](docs/NodeRoleUpdate.md)
- [UpdateBucketRequest](docs/UpdateBucketRequest.md) - [UpdateBucketRequest](docs/UpdateBucketRequest.md)
- [UpdateBucketRequestQuotas](docs/UpdateBucketRequestQuotas.md) - [UpdateBucketRequestQuotas](docs/UpdateBucketRequestQuotas.md)
- [UpdateBucketRequestWebsiteAccess](docs/UpdateBucketRequestWebsiteAccess.md) - [UpdateBucketRequestWebsiteAccess](docs/UpdateBucketRequestWebsiteAccess.md)

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@ -16,7 +16,6 @@ import (
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"net/url" "net/url"
"strings"
) )
@ -259,7 +258,13 @@ func (a *BucketApiService) CreateBucketExecute(r ApiCreateBucketRequest) (*Bucke
type ApiDeleteBucketRequest struct { type ApiDeleteBucketRequest struct {
ctx context.Context ctx context.Context
ApiService *BucketApiService ApiService *BucketApiService
bucketId string id *string
}
// The exact bucket identifier, a 32 bytes hexadecimal string
func (r ApiDeleteBucketRequest) Id(id string) ApiDeleteBucketRequest {
r.id = &id
return r
} }
func (r ApiDeleteBucketRequest) Execute() (*http.Response, error) { func (r ApiDeleteBucketRequest) Execute() (*http.Response, error) {
@ -275,14 +280,12 @@ Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is no
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param bucketId The exact bucket identifier, a 32 bytes hexadecimal string
@return ApiDeleteBucketRequest @return ApiDeleteBucketRequest
*/ */
func (a *BucketApiService) DeleteBucket(ctx context.Context, bucketId string) ApiDeleteBucketRequest { func (a *BucketApiService) DeleteBucket(ctx context.Context) ApiDeleteBucketRequest {
return ApiDeleteBucketRequest{ return ApiDeleteBucketRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
bucketId: bucketId,
} }
} }
@ -299,13 +302,16 @@ func (a *BucketApiService) DeleteBucketExecute(r ApiDeleteBucketRequest) (*http.
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
localVarPath := localBasePath + "/bucket?id={bucket_id}" localVarPath := localBasePath + "/bucket"
localVarPath = strings.Replace(localVarPath, "{"+"bucket_id"+"}", url.PathEscape(parameterToString(r.bucketId, "")), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
localVarFormParams := url.Values{} localVarFormParams := url.Values{}
if r.id == nil {
return nil, reportError("id is required and must be specified")
}
localVarQueryParams.Add("id", parameterToString(*r.id, ""))
// to determine the Content-Type header // to determine the Content-Type header
localVarHTTPContentTypes := []string{} localVarHTTPContentTypes := []string{}
@ -721,114 +727,23 @@ func (a *BucketApiService) DenyBucketKeyExecute(r ApiDenyBucketKeyRequest) (*Buc
return localVarReturnValue, localVarHTTPResponse, nil return localVarReturnValue, localVarHTTPResponse, nil
} }
type ApiFindBucketInfoRequest struct {
ctx context.Context
ApiService *BucketApiService
alias string
}
func (r ApiFindBucketInfoRequest) Execute() (*BucketInfo, *http.Response, error) {
return r.ApiService.FindBucketInfoExecute(r)
}
/*
FindBucketInfo Find a bucket
Find a bucket by its global alias
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param alias The exact global alias of one of the existing buckets
@return ApiFindBucketInfoRequest
*/
func (a *BucketApiService) FindBucketInfo(ctx context.Context, alias string) ApiFindBucketInfoRequest {
return ApiFindBucketInfoRequest{
ApiService: a,
ctx: ctx,
alias: alias,
}
}
// Execute executes the request
// @return BucketInfo
func (a *BucketApiService) FindBucketInfoExecute(r ApiFindBucketInfoRequest) (*BucketInfo, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *BucketInfo
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketApiService.FindBucketInfo")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/bucket?globalAlias={alias}"
localVarPath = strings.Replace(localVarPath, "{"+"alias"+"}", url.PathEscape(parameterToString(r.alias, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}
type ApiGetBucketInfoRequest struct { type ApiGetBucketInfoRequest struct {
ctx context.Context ctx context.Context
ApiService *BucketApiService ApiService *BucketApiService
bucketId string id *string
alias *string
}
// The exact bucket identifier, a 32 bytes hexadecimal string. Incompatible with `alias`.
func (r ApiGetBucketInfoRequest) Id(id string) ApiGetBucketInfoRequest {
r.id = &id
return r
}
// The exact global alias of one of the existing buckets. Incompatible with `id`.
func (r ApiGetBucketInfoRequest) Alias(alias string) ApiGetBucketInfoRequest {
r.alias = &alias
return r
} }
func (r ApiGetBucketInfoRequest) Execute() (*BucketInfo, *http.Response, error) { func (r ApiGetBucketInfoRequest) Execute() (*BucketInfo, *http.Response, error) {
@ -838,21 +753,19 @@ func (r ApiGetBucketInfoRequest) Execute() (*BucketInfo, *http.Response, error)
/* /*
GetBucketInfo Get a bucket GetBucketInfo Get a bucket
Given a bucket identifier, get its information. Given a bucket identifier (`id`) or a global alias (`alias`), get its information.
It includes its aliases, its web configuration, keys that have some permissions It includes its aliases, its web configuration, keys that have some permissions
on it, some statistics (number of objects, size), number of dangling multipart uploads, on it, some statistics (number of objects, size), number of dangling multipart uploads,
and its quotas (if any). and its quotas (if any).
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param bucketId The exact bucket identifier, a 32 bytes hexadecimal string
@return ApiGetBucketInfoRequest @return ApiGetBucketInfoRequest
*/ */
func (a *BucketApiService) GetBucketInfo(ctx context.Context, bucketId string) ApiGetBucketInfoRequest { func (a *BucketApiService) GetBucketInfo(ctx context.Context) ApiGetBucketInfoRequest {
return ApiGetBucketInfoRequest{ return ApiGetBucketInfoRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
bucketId: bucketId,
} }
} }
@ -871,13 +784,18 @@ func (a *BucketApiService) GetBucketInfoExecute(r ApiGetBucketInfoRequest) (*Buc
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
localVarPath := localBasePath + "/bucket?id={bucket_id}" localVarPath := localBasePath + "/bucket"
localVarPath = strings.Replace(localVarPath, "{"+"bucket_id"+"}", url.PathEscape(parameterToString(r.bucketId, "")), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
localVarFormParams := url.Values{} localVarFormParams := url.Values{}
if r.id != nil {
localVarQueryParams.Add("id", parameterToString(*r.id, ""))
}
if r.alias != nil {
localVarQueryParams.Add("alias", parameterToString(*r.alias, ""))
}
// to determine the Content-Type header // to determine the Content-Type header
localVarHTTPContentTypes := []string{} localVarHTTPContentTypes := []string{}
@ -972,7 +890,7 @@ func (a *BucketApiService) ListBucketsExecute(r ApiListBucketsRequest) ([]ListBu
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
localVarPath := localBasePath + "/bucket" localVarPath := localBasePath + "/bucket?list"
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -1285,10 +1203,16 @@ func (a *BucketApiService) PutBucketLocalAliasExecute(r ApiPutBucketLocalAliasRe
type ApiUpdateBucketRequest struct { type ApiUpdateBucketRequest struct {
ctx context.Context ctx context.Context
ApiService *BucketApiService ApiService *BucketApiService
bucketId string id *string
updateBucketRequest *UpdateBucketRequest updateBucketRequest *UpdateBucketRequest
} }
// The exact bucket identifier, a 32 bytes hexadecimal string
func (r ApiUpdateBucketRequest) Id(id string) ApiUpdateBucketRequest {
r.id = &id
return r
}
// Requested changes on the bucket. Both root fields are optionals. // Requested changes on the bucket. Both root fields are optionals.
func (r ApiUpdateBucketRequest) UpdateBucketRequest(updateBucketRequest UpdateBucketRequest) ApiUpdateBucketRequest { func (r ApiUpdateBucketRequest) UpdateBucketRequest(updateBucketRequest UpdateBucketRequest) ApiUpdateBucketRequest {
r.updateBucketRequest = &updateBucketRequest r.updateBucketRequest = &updateBucketRequest
@ -1302,7 +1226,7 @@ func (r ApiUpdateBucketRequest) Execute() (*BucketInfo, *http.Response, error) {
/* /*
UpdateBucket Update a bucket UpdateBucket Update a bucket
All fields (`websiteAccess` and `quotas`) are optionnal. All fields (`websiteAccess` and `quotas`) are optional.
If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed.
In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified.
@ -1316,14 +1240,12 @@ to change only one of the two quotas.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param bucketId The exact bucket identifier, a 32 bytes hexadecimal string
@return ApiUpdateBucketRequest @return ApiUpdateBucketRequest
*/ */
func (a *BucketApiService) UpdateBucket(ctx context.Context, bucketId string) ApiUpdateBucketRequest { func (a *BucketApiService) UpdateBucket(ctx context.Context) ApiUpdateBucketRequest {
return ApiUpdateBucketRequest{ return ApiUpdateBucketRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
bucketId: bucketId,
} }
} }
@ -1342,16 +1264,19 @@ func (a *BucketApiService) UpdateBucketExecute(r ApiUpdateBucketRequest) (*Bucke
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
localVarPath := localBasePath + "/bucket?id={bucket_id}" localVarPath := localBasePath + "/bucket"
localVarPath = strings.Replace(localVarPath, "{"+"bucket_id"+"}", url.PathEscape(parameterToString(r.bucketId, "")), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
localVarFormParams := url.Values{} localVarFormParams := url.Values{}
if r.id == nil {
return localVarReturnValue, nil, reportError("id is required and must be specified")
}
if r.updateBucketRequest == nil { if r.updateBucketRequest == nil {
return localVarReturnValue, nil, reportError("updateBucketRequest is required and must be specified") return localVarReturnValue, nil, reportError("updateBucketRequest is required and must be specified")
} }
localVarQueryParams.Add("id", parameterToString(*r.id, ""))
// to determine the Content-Type header // to determine the Content-Type header
localVarHTTPContentTypes := []string{"application/json"} localVarHTTPContentTypes := []string{"application/json"}

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@ -16,7 +16,6 @@ import (
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"net/url" "net/url"
"strings"
) )
@ -29,7 +28,7 @@ type ApiAddKeyRequest struct {
addKeyRequest *AddKeyRequest addKeyRequest *AddKeyRequest
} }
// \"You can set a friendly name for this key, send an empty string instead\" // You can set a friendly name for this key. If you don't want to, you can set the name to `null`. *Note: the secret key is returned in the response.*
func (r ApiAddKeyRequest) AddKeyRequest(addKeyRequest AddKeyRequest) ApiAddKeyRequest { func (r ApiAddKeyRequest) AddKeyRequest(addKeyRequest AddKeyRequest) ApiAddKeyRequest {
r.addKeyRequest = &addKeyRequest r.addKeyRequest = &addKeyRequest
return r return r
@ -70,7 +69,7 @@ func (a *KeyApiService) AddKeyExecute(r ApiAddKeyRequest) (*KeyInfo, *http.Respo
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
localVarPath := localBasePath + "/key" localVarPath := localBasePath + "/key?list"
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -138,7 +137,13 @@ func (a *KeyApiService) AddKeyExecute(r ApiAddKeyRequest) (*KeyInfo, *http.Respo
type ApiDeleteKeyRequest struct { type ApiDeleteKeyRequest struct {
ctx context.Context ctx context.Context
ApiService *KeyApiService ApiService *KeyApiService
accessKey string id *string
}
// The exact API access key generated by Garage
func (r ApiDeleteKeyRequest) Id(id string) ApiDeleteKeyRequest {
r.id = &id
return r
} }
func (r ApiDeleteKeyRequest) Execute() (*http.Response, error) { func (r ApiDeleteKeyRequest) Execute() (*http.Response, error) {
@ -152,14 +157,12 @@ Delete a key from the cluster. Its access will be removed from all the buckets.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param accessKey The exact API access key generated by Garage
@return ApiDeleteKeyRequest @return ApiDeleteKeyRequest
*/ */
func (a *KeyApiService) DeleteKey(ctx context.Context, accessKey string) ApiDeleteKeyRequest { func (a *KeyApiService) DeleteKey(ctx context.Context) ApiDeleteKeyRequest {
return ApiDeleteKeyRequest{ return ApiDeleteKeyRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
accessKey: accessKey,
} }
} }
@ -176,13 +179,16 @@ func (a *KeyApiService) DeleteKeyExecute(r ApiDeleteKeyRequest) (*http.Response,
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
localVarPath := localBasePath + "/key?id={access_key}" localVarPath := localBasePath + "/key"
localVarPath = strings.Replace(localVarPath, "{"+"access_key"+"}", url.PathEscape(parameterToString(r.accessKey, "")), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
localVarFormParams := url.Values{} localVarFormParams := url.Values{}
if r.id == nil {
return nil, reportError("id is required and must be specified")
}
localVarQueryParams.Add("id", parameterToString(*r.id, ""))
// to determine the Content-Type header // to determine the Content-Type header
localVarHTTPContentTypes := []string{} localVarHTTPContentTypes := []string{}
@ -231,7 +237,27 @@ func (a *KeyApiService) DeleteKeyExecute(r ApiDeleteKeyRequest) (*http.Response,
type ApiGetKeyRequest struct { type ApiGetKeyRequest struct {
ctx context.Context ctx context.Context
ApiService *KeyApiService ApiService *KeyApiService
accessKey string id *string
search *string
showSecretKey *string
}
// The exact API access key generated by Garage. Incompatible with `search`.
func (r ApiGetKeyRequest) Id(id string) ApiGetKeyRequest {
r.id = &id
return r
}
// A pattern (beginning or full string) corresponding to a key identifier or friendly name. Incompatible with `id`.
func (r ApiGetKeyRequest) Search(search string) ApiGetKeyRequest {
r.search = &search
return r
}
// Wether or not the secret key should be returned in the response
func (r ApiGetKeyRequest) ShowSecretKey(showSecretKey string) ApiGetKeyRequest {
r.showSecretKey = &showSecretKey
return r
} }
func (r ApiGetKeyRequest) Execute() (*KeyInfo, *http.Response, error) { func (r ApiGetKeyRequest) Execute() (*KeyInfo, *http.Response, error) {
@ -241,18 +267,19 @@ func (r ApiGetKeyRequest) Execute() (*KeyInfo, *http.Response, error) {
/* /*
GetKey Get key information GetKey Get key information
Return information about a specific key and return its information Return information about a specific key like its identifiers, its permissions and buckets on which it has permissions.
You can search by specifying the exact key identifier (`id`) or by specifying a pattern (`search`).
For confidentiality reasons, the secret key is not returned by default: you must pass the `showSecretKey` query parameter to get it.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param accessKey The exact API access key generated by Garage
@return ApiGetKeyRequest @return ApiGetKeyRequest
*/ */
func (a *KeyApiService) GetKey(ctx context.Context, accessKey string) ApiGetKeyRequest { func (a *KeyApiService) GetKey(ctx context.Context) ApiGetKeyRequest {
return ApiGetKeyRequest{ return ApiGetKeyRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
accessKey: accessKey,
} }
} }
@ -271,13 +298,21 @@ func (a *KeyApiService) GetKeyExecute(r ApiGetKeyRequest) (*KeyInfo, *http.Respo
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
localVarPath := localBasePath + "/key?id={access_key}" localVarPath := localBasePath + "/key"
localVarPath = strings.Replace(localVarPath, "{"+"access_key"+"}", url.PathEscape(parameterToString(r.accessKey, "")), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
localVarFormParams := url.Values{} localVarFormParams := url.Values{}
if r.id != nil {
localVarQueryParams.Add("id", parameterToString(*r.id, ""))
}
if r.search != nil {
localVarQueryParams.Add("search", parameterToString(*r.search, ""))
}
if r.showSecretKey != nil {
localVarQueryParams.Add("showSecretKey", parameterToString(*r.showSecretKey, ""))
}
// to determine the Content-Type header // to determine the Content-Type header
localVarHTTPContentTypes := []string{} localVarHTTPContentTypes := []string{}
@ -486,111 +521,7 @@ func (a *KeyApiService) ListKeysExecute(r ApiListKeysRequest) ([]ListKeys200Resp
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
localVarPath := localBasePath + "/key" localVarPath := localBasePath + "/key?list"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}
type ApiSearchKeyRequest struct {
ctx context.Context
ApiService *KeyApiService
pattern string
}
func (r ApiSearchKeyRequest) Execute() (*KeyInfo, *http.Response, error) {
return r.ApiService.SearchKeyExecute(r)
}
/*
SearchKey Select key by pattern
Find the first key matching the given pattern based on its identifier aor friendly name and return its information.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param pattern A pattern (beginning or full string) corresponding to a key identifier or friendly name
@return ApiSearchKeyRequest
*/
func (a *KeyApiService) SearchKey(ctx context.Context, pattern string) ApiSearchKeyRequest {
return ApiSearchKeyRequest{
ApiService: a,
ctx: ctx,
pattern: pattern,
}
}
// Execute executes the request
// @return KeyInfo
func (a *KeyApiService) SearchKeyExecute(r ApiSearchKeyRequest) (*KeyInfo, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *KeyInfo
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KeyApiService.SearchKey")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/key?search={pattern}"
localVarPath = strings.Replace(localVarPath, "{"+"pattern"+"}", url.PathEscape(parameterToString(r.pattern, "")), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -653,10 +584,16 @@ func (a *KeyApiService) SearchKeyExecute(r ApiSearchKeyRequest) (*KeyInfo, *http
type ApiUpdateKeyRequest struct { type ApiUpdateKeyRequest struct {
ctx context.Context ctx context.Context
ApiService *KeyApiService ApiService *KeyApiService
accessKey string id *string
updateKeyRequest *UpdateKeyRequest updateKeyRequest *UpdateKeyRequest
} }
// The exact API access key generated by Garage
func (r ApiUpdateKeyRequest) Id(id string) ApiUpdateKeyRequest {
r.id = &id
return r
}
// For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove // For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove
func (r ApiUpdateKeyRequest) UpdateKeyRequest(updateKeyRequest UpdateKeyRequest) ApiUpdateKeyRequest { func (r ApiUpdateKeyRequest) UpdateKeyRequest(updateKeyRequest UpdateKeyRequest) ApiUpdateKeyRequest {
r.updateKeyRequest = &updateKeyRequest r.updateKeyRequest = &updateKeyRequest
@ -672,16 +609,16 @@ UpdateKey Update a key
Updates information about the specified API access key. Updates information about the specified API access key.
*Note: the secret key is not returned in the response, `null` is sent instead.*
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param accessKey The exact API access key generated by Garage
@return ApiUpdateKeyRequest @return ApiUpdateKeyRequest
*/ */
func (a *KeyApiService) UpdateKey(ctx context.Context, accessKey string) ApiUpdateKeyRequest { func (a *KeyApiService) UpdateKey(ctx context.Context) ApiUpdateKeyRequest {
return ApiUpdateKeyRequest{ return ApiUpdateKeyRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
accessKey: accessKey,
} }
} }
@ -700,16 +637,19 @@ func (a *KeyApiService) UpdateKeyExecute(r ApiUpdateKeyRequest) (*KeyInfo, *http
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
localVarPath := localBasePath + "/key?id={access_key}" localVarPath := localBasePath + "/key"
localVarPath = strings.Replace(localVarPath, "{"+"access_key"+"}", url.PathEscape(parameterToString(r.accessKey, "")), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
localVarFormParams := url.Values{} localVarFormParams := url.Values{}
if r.id == nil {
return localVarReturnValue, nil, reportError("id is required and must be specified")
}
if r.updateKeyRequest == nil { if r.updateKeyRequest == nil {
return localVarReturnValue, nil, reportError("updateKeyRequest is required and must be specified") return localVarReturnValue, nil, reportError("updateKeyRequest is required and must be specified")
} }
localVarQueryParams.Add("id", parameterToString(*r.id, ""))
// to determine the Content-Type header // to determine the Content-Type header
localVarHTTPContentTypes := []string{"application/json"} localVarHTTPContentTypes := []string{"application/json"}

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@ -25,16 +25,16 @@ type LayoutApiService service
type ApiAddLayoutRequest struct { type ApiAddLayoutRequest struct {
ctx context.Context ctx context.Context
ApiService *LayoutApiService ApiService *LayoutApiService
requestBody *map[string]NodeClusterInfo nodeRoleChange *[]NodeRoleChange
} }
// To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. // To add a new node to the layout or to change the configuration of an existing node, simply set the values you want (`zone`, `capacity`, and `tags`). To remove a node, simply pass the `remove: true` field. This logic is represented in OpenAPI with a \"One Of\" object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified.
func (r ApiAddLayoutRequest) RequestBody(requestBody map[string]NodeClusterInfo) ApiAddLayoutRequest { func (r ApiAddLayoutRequest) NodeRoleChange(nodeRoleChange []NodeRoleChange) ApiAddLayoutRequest {
r.requestBody = &requestBody r.nodeRoleChange = &nodeRoleChange
return r return r
} }
func (r ApiAddLayoutRequest) Execute() (*http.Response, error) { func (r ApiAddLayoutRequest) Execute() (*ClusterLayout, *http.Response, error) {
return r.ApiService.AddLayoutExecute(r) return r.ApiService.AddLayoutExecute(r)
} }
@ -42,7 +42,12 @@ func (r ApiAddLayoutRequest) Execute() (*http.Response, error) {
AddLayout Send modifications to the cluster layout AddLayout Send modifications to the cluster layout
Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout.
Note that setting the capacity to `null` will configure the node as a gateway.
Setting the capacity to `null` will configure the node as a gateway.
Otherwise, capacity must be now set in bytes (before Garage 0.9 it was arbitrary weights).
For example to declare 100GB, you must set `capacity: 100000000000`.
Garage uses internally the International System of Units (SI), it assumes that 1kB = 1000 bytes, and displays storage as kB, MB, GB (and not KiB, MiB, GiB that assume 1KiB = 1024 bytes).
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -56,16 +61,18 @@ func (a *LayoutApiService) AddLayout(ctx context.Context) ApiAddLayoutRequest {
} }
// Execute executes the request // Execute executes the request
func (a *LayoutApiService) AddLayoutExecute(r ApiAddLayoutRequest) (*http.Response, error) { // @return ClusterLayout
func (a *LayoutApiService) AddLayoutExecute(r ApiAddLayoutRequest) (*ClusterLayout, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
localVarReturnValue *ClusterLayout
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LayoutApiService.AddLayout") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LayoutApiService.AddLayout")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
localVarPath := localBasePath + "/layout" localVarPath := localBasePath + "/layout"
@ -73,8 +80,8 @@ func (a *LayoutApiService) AddLayoutExecute(r ApiAddLayoutRequest) (*http.Respon
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
localVarFormParams := url.Values{} localVarFormParams := url.Values{}
if r.requestBody == nil { if r.nodeRoleChange == nil {
return nil, reportError("requestBody is required and must be specified") return localVarReturnValue, nil, reportError("nodeRoleChange is required and must be specified")
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -87,7 +94,7 @@ func (a *LayoutApiService) AddLayoutExecute(r ApiAddLayoutRequest) (*http.Respon
} }
// to determine the Accept header // to determine the Accept header
localVarHTTPHeaderAccepts := []string{} localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header // set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
@ -95,22 +102,22 @@ func (a *LayoutApiService) AddLayoutExecute(r ApiAddLayoutRequest) (*http.Respon
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
} }
// body params // body params
localVarPostBody = r.requestBody localVarPostBody = r.nodeRoleChange
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil { if err != nil {
return nil, err return localVarReturnValue, nil, err
} }
localVarHTTPResponse, err := a.client.callAPI(req) localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil { if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err return localVarReturnValue, localVarHTTPResponse, err
} }
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close() localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil { if err != nil {
return localVarHTTPResponse, err return localVarReturnValue, localVarHTTPResponse, err
} }
if localVarHTTPResponse.StatusCode >= 300 { if localVarHTTPResponse.StatusCode >= 300 {
@ -118,10 +125,19 @@ func (a *LayoutApiService) AddLayoutExecute(r ApiAddLayoutRequest) (*http.Respon
body: localVarBody, body: localVarBody,
error: localVarHTTPResponse.Status, error: localVarHTTPResponse.Status,
} }
return localVarHTTPResponse, newErr return localVarReturnValue, localVarHTTPResponse, newErr
} }
return localVarHTTPResponse, nil err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
} }
type ApiApplyLayoutRequest struct { type ApiApplyLayoutRequest struct {
@ -136,7 +152,7 @@ func (r ApiApplyLayoutRequest) LayoutVersion(layoutVersion LayoutVersion) ApiApp
return r return r
} }
func (r ApiApplyLayoutRequest) Execute() (*http.Response, error) { func (r ApiApplyLayoutRequest) Execute() (*ApplyLayout200Response, *http.Response, error) {
return r.ApiService.ApplyLayoutExecute(r) return r.ApiService.ApplyLayoutExecute(r)
} }
@ -145,6 +161,8 @@ ApplyLayout Apply staged layout
Applies to the cluster the layout changes currently registered as staged layout changes. Applies to the cluster the layout changes currently registered as staged layout changes.
*Note: do not try to parse the `message` field of the response, it is given as an array of string specifically because its format is not stable.*
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiApplyLayoutRequest @return ApiApplyLayoutRequest
@ -157,16 +175,18 @@ func (a *LayoutApiService) ApplyLayout(ctx context.Context) ApiApplyLayoutReques
} }
// Execute executes the request // Execute executes the request
func (a *LayoutApiService) ApplyLayoutExecute(r ApiApplyLayoutRequest) (*http.Response, error) { // @return ApplyLayout200Response
func (a *LayoutApiService) ApplyLayoutExecute(r ApiApplyLayoutRequest) (*ApplyLayout200Response, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
localVarReturnValue *ApplyLayout200Response
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LayoutApiService.ApplyLayout") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LayoutApiService.ApplyLayout")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
localVarPath := localBasePath + "/layout/apply" localVarPath := localBasePath + "/layout/apply"
@ -175,7 +195,7 @@ func (a *LayoutApiService) ApplyLayoutExecute(r ApiApplyLayoutRequest) (*http.Re
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
localVarFormParams := url.Values{} localVarFormParams := url.Values{}
if r.layoutVersion == nil { if r.layoutVersion == nil {
return nil, reportError("layoutVersion is required and must be specified") return localVarReturnValue, nil, reportError("layoutVersion is required and must be specified")
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -188,7 +208,7 @@ func (a *LayoutApiService) ApplyLayoutExecute(r ApiApplyLayoutRequest) (*http.Re
} }
// to determine the Accept header // to determine the Accept header
localVarHTTPHeaderAccepts := []string{} localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header // set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
@ -199,19 +219,19 @@ func (a *LayoutApiService) ApplyLayoutExecute(r ApiApplyLayoutRequest) (*http.Re
localVarPostBody = r.layoutVersion localVarPostBody = r.layoutVersion
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil { if err != nil {
return nil, err return localVarReturnValue, nil, err
} }
localVarHTTPResponse, err := a.client.callAPI(req) localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil { if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err return localVarReturnValue, localVarHTTPResponse, err
} }
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close() localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil { if err != nil {
return localVarHTTPResponse, err return localVarReturnValue, localVarHTTPResponse, err
} }
if localVarHTTPResponse.StatusCode >= 300 { if localVarHTTPResponse.StatusCode >= 300 {
@ -219,10 +239,19 @@ func (a *LayoutApiService) ApplyLayoutExecute(r ApiApplyLayoutRequest) (*http.Re
body: localVarBody, body: localVarBody,
error: localVarHTTPResponse.Status, error: localVarHTTPResponse.Status,
} }
return localVarHTTPResponse, newErr return localVarReturnValue, localVarHTTPResponse, newErr
} }
return localVarHTTPResponse, nil err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
} }
type ApiGetLayoutRequest struct { type ApiGetLayoutRequest struct {
@ -241,6 +270,7 @@ Returns the cluster's current layout, including:
- Currently configured cluster layout - Currently configured cluster layout
- Staged changes to the cluster layout - Staged changes to the cluster layout
*Capacity is given in bytes*
*The info returned by this endpoint is a subset of the info returned by `GET /status`.* *The info returned by this endpoint is a subset of the info returned by `GET /status`.*

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@ -38,7 +38,7 @@ func (r ApiAddNodeRequest) Execute() ([]AddNode200ResponseInner, *http.Response,
} }
/* /*
AddNode Connect target node to other Garage nodes AddNode Connect a new node
Instructs this Garage node to connect to other Garage nodes at specified `<node_id>@<net_address>`. `node_id` is generated automatically on node start. Instructs this Garage node to connect to other Garage nodes at specified `<node_id>@<net_address>`. `node_id` is generated automatically on node start.
@ -133,6 +133,106 @@ func (a *NodesApiService) AddNodeExecute(r ApiAddNodeRequest) ([]AddNode200Respo
return localVarReturnValue, localVarHTTPResponse, nil return localVarReturnValue, localVarHTTPResponse, nil
} }
type ApiGetHealthRequest struct {
ctx context.Context
ApiService *NodesApiService
}
func (r ApiGetHealthRequest) Execute() (*GetHealth200Response, *http.Response, error) {
return r.ApiService.GetHealthExecute(r)
}
/*
GetHealth Cluster health report
Returns the global status of the cluster, the number of connected nodes (over the number of known ones), the number of healthy storage nodes (over the declared ones), and the number of healthy partitions (over the total).
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetHealthRequest
*/
func (a *NodesApiService) GetHealth(ctx context.Context) ApiGetHealthRequest {
return ApiGetHealthRequest{
ApiService: a,
ctx: ctx,
}
}
// Execute executes the request
// @return GetHealth200Response
func (a *NodesApiService) GetHealthExecute(r ApiGetHealthRequest) (*GetHealth200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *GetHealth200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NodesApiService.GetHealth")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/health"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}
type ApiGetNodesRequest struct { type ApiGetNodesRequest struct {
ctx context.Context ctx context.Context
ApiService *NodesApiService ApiService *NodesApiService
@ -143,7 +243,7 @@ func (r ApiGetNodesRequest) Execute() (*GetNodes200Response, *http.Response, err
} }
/* /*
GetNodes Status of this node and other nodes in the cluster GetNodes Describe cluster
Returns the cluster's current status, including: Returns the cluster's current status, including:
- ID of the node being queried and its version of the Garage daemon - ID of the node being queried and its version of the Garage daemon
@ -151,6 +251,8 @@ Returns the cluster's current status, including:
- Currently configured cluster layout - Currently configured cluster layout
- Staged changes to the cluster layout - Staged changes to the cluster layout
*Capacity is given in bytes*
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetNodesRequest @return ApiGetNodesRequest

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@ -41,7 +41,7 @@ var (
xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`)
) )
// APIClient manages communication with the Garage Administration API v0+garage-v0.8.0 API vv0.8.0 // APIClient manages communication with the Garage Administration API v0+garage-v0.9.0 API vv0.9.0
// In most cases there should be only one, shared, APIClient. // In most cases there should be only one, shared, APIClient.
type APIClient struct { type APIClient struct {
cfg *Configuration cfg *Configuration

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@ -101,11 +101,11 @@ type Configuration struct {
func NewConfiguration() *Configuration { func NewConfiguration() *Configuration {
cfg := &Configuration{ cfg := &Configuration{
DefaultHeader: make(map[string]string), DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/0.8.0/go", UserAgent: "OpenAPI-Generator/0.9.0/go",
Debug: false, Debug: false,
Servers: ServerConfigurations{ Servers: ServerConfigurations{
{ {
URL: "http://localhost:3903/v0", URL: "http://localhost:3903/v1",
Description: "A local server", Description: "A local server",
}, },
}, },

View file

@ -4,7 +4,7 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**Name** | Pointer to **string** | | [optional] **Name** | Pointer to **NullableString** | | [optional]
## Methods ## Methods
@ -50,6 +50,16 @@ SetName sets Name field to given value.
HasName returns a boolean if a field has been set. HasName returns a boolean if a field has been set.
### SetNameNil
`func (o *AddKeyRequest) SetNameNil(b bool)`
SetNameNil sets the value for Name to be an explicit nil
### UnsetName
`func (o *AddKeyRequest) UnsetName()`
UnsetName ensures that no value is present for Name, not even an explicit nil
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,72 @@
# ApplyLayout200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Message** | **[]string** | |
**Layout** | [**ClusterLayout**](ClusterLayout.md) | |
## Methods
### NewApplyLayout200Response
`func NewApplyLayout200Response(message []string, layout ClusterLayout, ) *ApplyLayout200Response`
NewApplyLayout200Response instantiates a new ApplyLayout200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewApplyLayout200ResponseWithDefaults
`func NewApplyLayout200ResponseWithDefaults() *ApplyLayout200Response`
NewApplyLayout200ResponseWithDefaults instantiates a new ApplyLayout200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetMessage
`func (o *ApplyLayout200Response) GetMessage() []string`
GetMessage returns the Message field if non-nil, zero value otherwise.
### GetMessageOk
`func (o *ApplyLayout200Response) GetMessageOk() (*[]string, bool)`
GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMessage
`func (o *ApplyLayout200Response) SetMessage(v []string)`
SetMessage sets Message field to given value.
### GetLayout
`func (o *ApplyLayout200Response) GetLayout() ClusterLayout`
GetLayout returns the Layout field if non-nil, zero value otherwise.
### GetLayoutOk
`func (o *ApplyLayout200Response) GetLayoutOk() (*ClusterLayout, bool)`
GetLayoutOk returns a tuple with the Layout field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetLayout
`func (o *ApplyLayout200Response) SetLayout(v ClusterLayout)`
SetLayout sets Layout field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -1,21 +1,20 @@
# \BucketApi # \BucketApi
All URIs are relative to *http://localhost:3903/v0* All URIs are relative to *http://localhost:3903/v1*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**AllowBucketKey**](BucketApi.md#AllowBucketKey) | **Post** /bucket/allow | Allow key [**AllowBucketKey**](BucketApi.md#AllowBucketKey) | **Post** /bucket/allow | Allow key
[**CreateBucket**](BucketApi.md#CreateBucket) | **Post** /bucket | Create a bucket [**CreateBucket**](BucketApi.md#CreateBucket) | **Post** /bucket | Create a bucket
[**DeleteBucket**](BucketApi.md#DeleteBucket) | **Delete** /bucket?id&#x3D;{bucket_id} | Delete a bucket [**DeleteBucket**](BucketApi.md#DeleteBucket) | **Delete** /bucket | Delete a bucket
[**DeleteBucketGlobalAlias**](BucketApi.md#DeleteBucketGlobalAlias) | **Delete** /bucket/alias/global | Delete a global alias [**DeleteBucketGlobalAlias**](BucketApi.md#DeleteBucketGlobalAlias) | **Delete** /bucket/alias/global | Delete a global alias
[**DeleteBucketLocalAlias**](BucketApi.md#DeleteBucketLocalAlias) | **Delete** /bucket/alias/local | Delete a local alias [**DeleteBucketLocalAlias**](BucketApi.md#DeleteBucketLocalAlias) | **Delete** /bucket/alias/local | Delete a local alias
[**DenyBucketKey**](BucketApi.md#DenyBucketKey) | **Post** /bucket/deny | Deny key [**DenyBucketKey**](BucketApi.md#DenyBucketKey) | **Post** /bucket/deny | Deny key
[**FindBucketInfo**](BucketApi.md#FindBucketInfo) | **Get** /bucket?globalAlias&#x3D;{alias} | Find a bucket [**GetBucketInfo**](BucketApi.md#GetBucketInfo) | **Get** /bucket | Get a bucket
[**GetBucketInfo**](BucketApi.md#GetBucketInfo) | **Get** /bucket?id&#x3D;{bucket_id} | Get a bucket [**ListBuckets**](BucketApi.md#ListBuckets) | **Get** /bucket?list | List all buckets
[**ListBuckets**](BucketApi.md#ListBuckets) | **Get** /bucket | List all buckets
[**PutBucketGlobalAlias**](BucketApi.md#PutBucketGlobalAlias) | **Put** /bucket/alias/global | Add a global alias [**PutBucketGlobalAlias**](BucketApi.md#PutBucketGlobalAlias) | **Put** /bucket/alias/global | Add a global alias
[**PutBucketLocalAlias**](BucketApi.md#PutBucketLocalAlias) | **Put** /bucket/alias/local | Add a local alias [**PutBucketLocalAlias**](BucketApi.md#PutBucketLocalAlias) | **Put** /bucket/alias/local | Add a local alias
[**UpdateBucket**](BucketApi.md#UpdateBucket) | **Put** /bucket?id&#x3D;{bucket_id} | Update a bucket [**UpdateBucket**](BucketApi.md#UpdateBucket) | **Put** /bucket | Update a bucket
@ -153,7 +152,7 @@ Name | Type | Description | Notes
## DeleteBucket ## DeleteBucket
> DeleteBucket(ctx, bucketId).Execute() > DeleteBucket(ctx).Id(id).Execute()
Delete a bucket Delete a bucket
@ -172,11 +171,11 @@ import (
) )
func main() { func main() {
bucketId := "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" // string | The exact bucket identifier, a 32 bytes hexadecimal string id := "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" // string | The exact bucket identifier, a 32 bytes hexadecimal string
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BucketApi.DeleteBucket(context.Background(), bucketId).Execute() resp, r, err := apiClient.BucketApi.DeleteBucket(context.Background()).Id(id).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.DeleteBucket``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.DeleteBucket``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -187,10 +186,6 @@ func main() {
### Path Parameters ### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**bucketId** | **string** | The exact bucket identifier, a 32 bytes hexadecimal string |
### Other Parameters ### Other Parameters
@ -199,7 +194,7 @@ Other parameters are passed through a pointer to a apiDeleteBucketRequest struct
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**id** | **string** | The exact bucket identifier, a 32 bytes hexadecimal string |
### Return type ### Return type
@ -423,79 +418,9 @@ Name | Type | Description | Notes
[[Back to README]](../README.md) [[Back to README]](../README.md)
## FindBucketInfo
> BucketInfo FindBucketInfo(ctx, alias).Execute()
Find a bucket
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
alias := "my_documents" // string | The exact global alias of one of the existing buckets
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BucketApi.FindBucketInfo(context.Background(), alias).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.FindBucketInfo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FindBucketInfo`: BucketInfo
fmt.Fprintf(os.Stdout, "Response from `BucketApi.FindBucketInfo`: %v\n", resp)
}
```
### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**alias** | **string** | The exact global alias of one of the existing buckets |
### Other Parameters
Other parameters are passed through a pointer to a apiFindBucketInfoRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
### Return type
[**BucketInfo**](BucketInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## GetBucketInfo ## GetBucketInfo
> BucketInfo GetBucketInfo(ctx, bucketId).Execute() > BucketInfo GetBucketInfo(ctx).Id(id).Alias(alias).Execute()
Get a bucket Get a bucket
@ -514,11 +439,12 @@ import (
) )
func main() { func main() {
bucketId := "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" // string | The exact bucket identifier, a 32 bytes hexadecimal string id := "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" // string | The exact bucket identifier, a 32 bytes hexadecimal string. Incompatible with `alias`. (optional)
alias := "my_documents" // string | The exact global alias of one of the existing buckets. Incompatible with `id`. (optional)
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BucketApi.GetBucketInfo(context.Background(), bucketId).Execute() resp, r, err := apiClient.BucketApi.GetBucketInfo(context.Background()).Id(id).Alias(alias).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.GetBucketInfo``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.GetBucketInfo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -531,10 +457,6 @@ func main() {
### Path Parameters ### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**bucketId** | **string** | The exact bucket identifier, a 32 bytes hexadecimal string |
### Other Parameters ### Other Parameters
@ -543,7 +465,8 @@ Other parameters are passed through a pointer to a apiGetBucketInfoRequest struc
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**id** | **string** | The exact bucket identifier, a 32 bytes hexadecimal string. Incompatible with &#x60;alias&#x60;. |
**alias** | **string** | The exact global alias of one of the existing buckets. Incompatible with &#x60;id&#x60;. |
### Return type ### Return type
@ -764,7 +687,7 @@ Name | Type | Description | Notes
## UpdateBucket ## UpdateBucket
> BucketInfo UpdateBucket(ctx, bucketId).UpdateBucketRequest(updateBucketRequest).Execute() > BucketInfo UpdateBucket(ctx).Id(id).UpdateBucketRequest(updateBucketRequest).Execute()
Update a bucket Update a bucket
@ -783,12 +706,12 @@ import (
) )
func main() { func main() {
bucketId := "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" // string | The exact bucket identifier, a 32 bytes hexadecimal string id := "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" // string | The exact bucket identifier, a 32 bytes hexadecimal string
updateBucketRequest := *openapiclient.NewUpdateBucketRequest() // UpdateBucketRequest | Requested changes on the bucket. Both root fields are optionals. updateBucketRequest := *openapiclient.NewUpdateBucketRequest() // UpdateBucketRequest | Requested changes on the bucket. Both root fields are optionals.
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BucketApi.UpdateBucket(context.Background(), bucketId).UpdateBucketRequest(updateBucketRequest).Execute() resp, r, err := apiClient.BucketApi.UpdateBucket(context.Background()).Id(id).UpdateBucketRequest(updateBucketRequest).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.UpdateBucket``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.UpdateBucket``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -801,10 +724,6 @@ func main() {
### Path Parameters ### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**bucketId** | **string** | The exact bucket identifier, a 32 bytes hexadecimal string |
### Other Parameters ### Other Parameters
@ -813,7 +732,7 @@ Other parameters are passed through a pointer to a apiUpdateBucketRequest struct
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**id** | **string** | The exact bucket identifier, a 32 bytes hexadecimal string |
**updateBucketRequest** | [**UpdateBucketRequest**](UpdateBucketRequest.md) | Requested changes on the bucket. Both root fields are optionals. | **updateBucketRequest** | [**UpdateBucketRequest**](UpdateBucketRequest.md) | Requested changes on the bucket. Both root fields are optionals. |
### Return type ### Return type

View file

@ -5,14 +5,14 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**Version** | **int32** | | **Version** | **int32** | |
**Roles** | [**map[string]NodeClusterInfo**](NodeClusterInfo.md) | | **Roles** | [**[]NodeClusterInfo**](NodeClusterInfo.md) | |
**StagedRoleChanges** | [**map[string]NodeClusterInfo**](NodeClusterInfo.md) | | **StagedRoleChanges** | [**[]NodeRoleChange**](NodeRoleChange.md) | |
## Methods ## Methods
### NewClusterLayout ### NewClusterLayout
`func NewClusterLayout(version int32, roles map[string]NodeClusterInfo, stagedRoleChanges map[string]NodeClusterInfo, ) *ClusterLayout` `func NewClusterLayout(version int32, roles []NodeClusterInfo, stagedRoleChanges []NodeRoleChange, ) *ClusterLayout`
NewClusterLayout instantiates a new ClusterLayout object NewClusterLayout instantiates a new ClusterLayout object
This constructor will assign default values to properties that have it defined, This constructor will assign default values to properties that have it defined,
@ -49,40 +49,40 @@ SetVersion sets Version field to given value.
### GetRoles ### GetRoles
`func (o *ClusterLayout) GetRoles() map[string]NodeClusterInfo` `func (o *ClusterLayout) GetRoles() []NodeClusterInfo`
GetRoles returns the Roles field if non-nil, zero value otherwise. GetRoles returns the Roles field if non-nil, zero value otherwise.
### GetRolesOk ### GetRolesOk
`func (o *ClusterLayout) GetRolesOk() (*map[string]NodeClusterInfo, bool)` `func (o *ClusterLayout) GetRolesOk() (*[]NodeClusterInfo, bool)`
GetRolesOk returns a tuple with the Roles field if it's non-nil, zero value otherwise GetRolesOk returns a tuple with the Roles field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set. and a boolean to check if the value has been set.
### SetRoles ### SetRoles
`func (o *ClusterLayout) SetRoles(v map[string]NodeClusterInfo)` `func (o *ClusterLayout) SetRoles(v []NodeClusterInfo)`
SetRoles sets Roles field to given value. SetRoles sets Roles field to given value.
### GetStagedRoleChanges ### GetStagedRoleChanges
`func (o *ClusterLayout) GetStagedRoleChanges() map[string]NodeClusterInfo` `func (o *ClusterLayout) GetStagedRoleChanges() []NodeRoleChange`
GetStagedRoleChanges returns the StagedRoleChanges field if non-nil, zero value otherwise. GetStagedRoleChanges returns the StagedRoleChanges field if non-nil, zero value otherwise.
### GetStagedRoleChangesOk ### GetStagedRoleChangesOk
`func (o *ClusterLayout) GetStagedRoleChangesOk() (*map[string]NodeClusterInfo, bool)` `func (o *ClusterLayout) GetStagedRoleChangesOk() (*[]NodeRoleChange, bool)`
GetStagedRoleChangesOk returns a tuple with the StagedRoleChanges field if it's non-nil, zero value otherwise GetStagedRoleChangesOk returns a tuple with the StagedRoleChanges field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set. and a boolean to check if the value has been set.
### SetStagedRoleChanges ### SetStagedRoleChanges
`func (o *ClusterLayout) SetStagedRoleChanges(v map[string]NodeClusterInfo)` `func (o *ClusterLayout) SetStagedRoleChanges(v []NodeRoleChange)`
SetStagedRoleChanges sets StagedRoleChanges field to given value. SetStagedRoleChanges sets StagedRoleChanges field to given value.

View file

@ -0,0 +1,198 @@
# GetHealth200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Status** | **string** | |
**KnownNodes** | **int64** | |
**ConnectedNodes** | **int64** | |
**StorageNodes** | **int64** | |
**StorageNodesOk** | **int64** | |
**Partitions** | **int64** | |
**PartitionsQuorum** | **int64** | |
**PartitionsAllOk** | **int64** | |
## Methods
### NewGetHealth200Response
`func NewGetHealth200Response(status string, knownNodes int64, connectedNodes int64, storageNodes int64, storageNodesOk int64, partitions int64, partitionsQuorum int64, partitionsAllOk int64, ) *GetHealth200Response`
NewGetHealth200Response instantiates a new GetHealth200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetHealth200ResponseWithDefaults
`func NewGetHealth200ResponseWithDefaults() *GetHealth200Response`
NewGetHealth200ResponseWithDefaults instantiates a new GetHealth200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetStatus
`func (o *GetHealth200Response) GetStatus() string`
GetStatus returns the Status field if non-nil, zero value otherwise.
### GetStatusOk
`func (o *GetHealth200Response) GetStatusOk() (*string, bool)`
GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetStatus
`func (o *GetHealth200Response) SetStatus(v string)`
SetStatus sets Status field to given value.
### GetKnownNodes
`func (o *GetHealth200Response) GetKnownNodes() int64`
GetKnownNodes returns the KnownNodes field if non-nil, zero value otherwise.
### GetKnownNodesOk
`func (o *GetHealth200Response) GetKnownNodesOk() (*int64, bool)`
GetKnownNodesOk returns a tuple with the KnownNodes field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetKnownNodes
`func (o *GetHealth200Response) SetKnownNodes(v int64)`
SetKnownNodes sets KnownNodes field to given value.
### GetConnectedNodes
`func (o *GetHealth200Response) GetConnectedNodes() int64`
GetConnectedNodes returns the ConnectedNodes field if non-nil, zero value otherwise.
### GetConnectedNodesOk
`func (o *GetHealth200Response) GetConnectedNodesOk() (*int64, bool)`
GetConnectedNodesOk returns a tuple with the ConnectedNodes field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetConnectedNodes
`func (o *GetHealth200Response) SetConnectedNodes(v int64)`
SetConnectedNodes sets ConnectedNodes field to given value.
### GetStorageNodes
`func (o *GetHealth200Response) GetStorageNodes() int64`
GetStorageNodes returns the StorageNodes field if non-nil, zero value otherwise.
### GetStorageNodesOk
`func (o *GetHealth200Response) GetStorageNodesOk() (*int64, bool)`
GetStorageNodesOk returns a tuple with the StorageNodes field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetStorageNodes
`func (o *GetHealth200Response) SetStorageNodes(v int64)`
SetStorageNodes sets StorageNodes field to given value.
### GetStorageNodesOk
`func (o *GetHealth200Response) GetStorageNodesOk() int64`
GetStorageNodesOk returns the StorageNodesOk field if non-nil, zero value otherwise.
### GetStorageNodesOkOk
`func (o *GetHealth200Response) GetStorageNodesOkOk() (*int64, bool)`
GetStorageNodesOkOk returns a tuple with the StorageNodesOk field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetStorageNodesOk
`func (o *GetHealth200Response) SetStorageNodesOk(v int64)`
SetStorageNodesOk sets StorageNodesOk field to given value.
### GetPartitions
`func (o *GetHealth200Response) GetPartitions() int64`
GetPartitions returns the Partitions field if non-nil, zero value otherwise.
### GetPartitionsOk
`func (o *GetHealth200Response) GetPartitionsOk() (*int64, bool)`
GetPartitionsOk returns a tuple with the Partitions field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPartitions
`func (o *GetHealth200Response) SetPartitions(v int64)`
SetPartitions sets Partitions field to given value.
### GetPartitionsQuorum
`func (o *GetHealth200Response) GetPartitionsQuorum() int64`
GetPartitionsQuorum returns the PartitionsQuorum field if non-nil, zero value otherwise.
### GetPartitionsQuorumOk
`func (o *GetHealth200Response) GetPartitionsQuorumOk() (*int64, bool)`
GetPartitionsQuorumOk returns a tuple with the PartitionsQuorum field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPartitionsQuorum
`func (o *GetHealth200Response) SetPartitionsQuorum(v int64)`
SetPartitionsQuorum sets PartitionsQuorum field to given value.
### GetPartitionsAllOk
`func (o *GetHealth200Response) GetPartitionsAllOk() int64`
GetPartitionsAllOk returns the PartitionsAllOk field if non-nil, zero value otherwise.
### GetPartitionsAllOkOk
`func (o *GetHealth200Response) GetPartitionsAllOkOk() (*int64, bool)`
GetPartitionsAllOkOk returns a tuple with the PartitionsAllOk field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPartitionsAllOk
`func (o *GetHealth200Response) SetPartitionsAllOk(v int64)`
SetPartitionsAllOk sets PartitionsAllOk field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -6,14 +6,17 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**Node** | **string** | | **Node** | **string** | |
**GarageVersion** | **string** | | **GarageVersion** | **string** | |
**KnownNodes** | [**map[string]NodeNetworkInfo**](NodeNetworkInfo.md) | | **GarageFeatures** | **[]string** | |
**RustVersion** | **string** | |
**DbEngine** | **string** | |
**KnownNodes** | [**[]NodeNetworkInfo**](NodeNetworkInfo.md) | |
**Layout** | [**ClusterLayout**](ClusterLayout.md) | | **Layout** | [**ClusterLayout**](ClusterLayout.md) | |
## Methods ## Methods
### NewGetNodes200Response ### NewGetNodes200Response
`func NewGetNodes200Response(node string, garageVersion string, knownNodes map[string]NodeNetworkInfo, layout ClusterLayout, ) *GetNodes200Response` `func NewGetNodes200Response(node string, garageVersion string, garageFeatures []string, rustVersion string, dbEngine string, knownNodes []NodeNetworkInfo, layout ClusterLayout, ) *GetNodes200Response`
NewGetNodes200Response instantiates a new GetNodes200Response object NewGetNodes200Response instantiates a new GetNodes200Response object
This constructor will assign default values to properties that have it defined, This constructor will assign default values to properties that have it defined,
@ -68,22 +71,82 @@ and a boolean to check if the value has been set.
SetGarageVersion sets GarageVersion field to given value. SetGarageVersion sets GarageVersion field to given value.
### GetGarageFeatures
`func (o *GetNodes200Response) GetGarageFeatures() []string`
GetGarageFeatures returns the GarageFeatures field if non-nil, zero value otherwise.
### GetGarageFeaturesOk
`func (o *GetNodes200Response) GetGarageFeaturesOk() (*[]string, bool)`
GetGarageFeaturesOk returns a tuple with the GarageFeatures field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetGarageFeatures
`func (o *GetNodes200Response) SetGarageFeatures(v []string)`
SetGarageFeatures sets GarageFeatures field to given value.
### GetRustVersion
`func (o *GetNodes200Response) GetRustVersion() string`
GetRustVersion returns the RustVersion field if non-nil, zero value otherwise.
### GetRustVersionOk
`func (o *GetNodes200Response) GetRustVersionOk() (*string, bool)`
GetRustVersionOk returns a tuple with the RustVersion field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetRustVersion
`func (o *GetNodes200Response) SetRustVersion(v string)`
SetRustVersion sets RustVersion field to given value.
### GetDbEngine
`func (o *GetNodes200Response) GetDbEngine() string`
GetDbEngine returns the DbEngine field if non-nil, zero value otherwise.
### GetDbEngineOk
`func (o *GetNodes200Response) GetDbEngineOk() (*string, bool)`
GetDbEngineOk returns a tuple with the DbEngine field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDbEngine
`func (o *GetNodes200Response) SetDbEngine(v string)`
SetDbEngine sets DbEngine field to given value.
### GetKnownNodes ### GetKnownNodes
`func (o *GetNodes200Response) GetKnownNodes() map[string]NodeNetworkInfo` `func (o *GetNodes200Response) GetKnownNodes() []NodeNetworkInfo`
GetKnownNodes returns the KnownNodes field if non-nil, zero value otherwise. GetKnownNodes returns the KnownNodes field if non-nil, zero value otherwise.
### GetKnownNodesOk ### GetKnownNodesOk
`func (o *GetNodes200Response) GetKnownNodesOk() (*map[string]NodeNetworkInfo, bool)` `func (o *GetNodes200Response) GetKnownNodesOk() (*[]NodeNetworkInfo, bool)`
GetKnownNodesOk returns a tuple with the KnownNodes field if it's non-nil, zero value otherwise GetKnownNodesOk returns a tuple with the KnownNodes field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set. and a boolean to check if the value has been set.
### SetKnownNodes ### SetKnownNodes
`func (o *GetNodes200Response) SetKnownNodes(v map[string]NodeNetworkInfo)` `func (o *GetNodes200Response) SetKnownNodes(v []NodeNetworkInfo)`
SetKnownNodes sets KnownNodes field to given value. SetKnownNodes sets KnownNodes field to given value.

View file

@ -4,7 +4,7 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**Name** | **string** | | **Name** | **NullableString** | |
**AccessKeyId** | **string** | | **AccessKeyId** | **string** | |
**SecretAccessKey** | **string** | | **SecretAccessKey** | **string** | |
@ -12,7 +12,7 @@ Name | Type | Description | Notes
### NewImportKeyRequest ### NewImportKeyRequest
`func NewImportKeyRequest(name string, accessKeyId string, secretAccessKey string, ) *ImportKeyRequest` `func NewImportKeyRequest(name NullableString, accessKeyId string, secretAccessKey string, ) *ImportKeyRequest`
NewImportKeyRequest instantiates a new ImportKeyRequest object NewImportKeyRequest instantiates a new ImportKeyRequest object
This constructor will assign default values to properties that have it defined, This constructor will assign default values to properties that have it defined,
@ -47,6 +47,16 @@ and a boolean to check if the value has been set.
SetName sets Name field to given value. SetName sets Name field to given value.
### SetNameNil
`func (o *ImportKeyRequest) SetNameNil(b bool)`
SetNameNil sets the value for Name to be an explicit nil
### UnsetName
`func (o *ImportKeyRequest) UnsetName()`
UnsetName ensures that no value is present for Name, not even an explicit nil
### GetAccessKeyId ### GetAccessKeyId
`func (o *ImportKeyRequest) GetAccessKeyId() string` `func (o *ImportKeyRequest) GetAccessKeyId() string`

View file

@ -1,16 +1,15 @@
# \KeyApi # \KeyApi
All URIs are relative to *http://localhost:3903/v0* All URIs are relative to *http://localhost:3903/v1*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**AddKey**](KeyApi.md#AddKey) | **Post** /key | Create a new API key [**AddKey**](KeyApi.md#AddKey) | **Post** /key?list | Create a new API key
[**DeleteKey**](KeyApi.md#DeleteKey) | **Delete** /key?id&#x3D;{access_key} | Delete a key [**DeleteKey**](KeyApi.md#DeleteKey) | **Delete** /key | Delete a key
[**GetKey**](KeyApi.md#GetKey) | **Get** /key?id&#x3D;{access_key} | Get key information [**GetKey**](KeyApi.md#GetKey) | **Get** /key | Get key information
[**ImportKey**](KeyApi.md#ImportKey) | **Post** /key/import | Import an existing key [**ImportKey**](KeyApi.md#ImportKey) | **Post** /key/import | Import an existing key
[**ListKeys**](KeyApi.md#ListKeys) | **Get** /key | List all keys [**ListKeys**](KeyApi.md#ListKeys) | **Get** /key?list | List all keys
[**SearchKey**](KeyApi.md#SearchKey) | **Get** /key?search&#x3D;{pattern} | Select key by pattern [**UpdateKey**](KeyApi.md#UpdateKey) | **Post** /key | Update a key
[**UpdateKey**](KeyApi.md#UpdateKey) | **Post** /key?id&#x3D;{access_key} | Update a key
@ -35,7 +34,7 @@ import (
) )
func main() { func main() {
addKeyRequest := *openapiclient.NewAddKeyRequest() // AddKeyRequest | \"You can set a friendly name for this key, send an empty string instead\" addKeyRequest := *openapiclient.NewAddKeyRequest() // AddKeyRequest | You can set a friendly name for this key. If you don't want to, you can set the name to `null`. *Note: the secret key is returned in the response.*
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
@ -60,7 +59,7 @@ Other parameters are passed through a pointer to a apiAddKeyRequest struct via t
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**addKeyRequest** | [**AddKeyRequest**](AddKeyRequest.md) | \&quot;You can set a friendly name for this key, send an empty string instead\&quot; | **addKeyRequest** | [**AddKeyRequest**](AddKeyRequest.md) | You can set a friendly name for this key. If you don&#39;t want to, you can set the name to &#x60;null&#x60;. *Note: the secret key is returned in the response.* |
### Return type ### Return type
@ -82,7 +81,7 @@ Name | Type | Description | Notes
## DeleteKey ## DeleteKey
> DeleteKey(ctx, accessKey).Execute() > DeleteKey(ctx).Id(id).Execute()
Delete a key Delete a key
@ -101,11 +100,11 @@ import (
) )
func main() { func main() {
accessKey := "GK31c2f218a2e44f485b94239e" // string | The exact API access key generated by Garage id := "GK31c2f218a2e44f485b94239e" // string | The exact API access key generated by Garage
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.KeyApi.DeleteKey(context.Background(), accessKey).Execute() resp, r, err := apiClient.KeyApi.DeleteKey(context.Background()).Id(id).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.DeleteKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.DeleteKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -116,10 +115,6 @@ func main() {
### Path Parameters ### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**accessKey** | **string** | The exact API access key generated by Garage |
### Other Parameters ### Other Parameters
@ -128,7 +123,7 @@ Other parameters are passed through a pointer to a apiDeleteKeyRequest struct vi
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**id** | **string** | The exact API access key generated by Garage |
### Return type ### Return type
@ -150,7 +145,7 @@ Name | Type | Description | Notes
## GetKey ## GetKey
> KeyInfo GetKey(ctx, accessKey).Execute() > KeyInfo GetKey(ctx).Id(id).Search(search).ShowSecretKey(showSecretKey).Execute()
Get key information Get key information
@ -169,11 +164,13 @@ import (
) )
func main() { func main() {
accessKey := "GK31c2f218a2e44f485b94239e" // string | The exact API access key generated by Garage id := "GK31c2f218a2e44f485b94239e" // string | The exact API access key generated by Garage. Incompatible with `search`. (optional)
search := "test-k" // string | A pattern (beginning or full string) corresponding to a key identifier or friendly name. Incompatible with `id`. (optional)
showSecretKey := "true" // string | Wether or not the secret key should be returned in the response (optional) (default to "false")
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.KeyApi.GetKey(context.Background(), accessKey).Execute() resp, r, err := apiClient.KeyApi.GetKey(context.Background()).Id(id).Search(search).ShowSecretKey(showSecretKey).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.GetKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.GetKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -186,10 +183,6 @@ func main() {
### Path Parameters ### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**accessKey** | **string** | The exact API access key generated by Garage |
### Other Parameters ### Other Parameters
@ -198,7 +191,9 @@ Other parameters are passed through a pointer to a apiGetKeyRequest struct via t
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**id** | **string** | The exact API access key generated by Garage. Incompatible with &#x60;search&#x60;. |
**search** | **string** | A pattern (beginning or full string) corresponding to a key identifier or friendly name. Incompatible with &#x60;id&#x60;. |
**showSecretKey** | **string** | Wether or not the secret key should be returned in the response | [default to &quot;false&quot;]
### Return type ### Return type
@ -345,79 +340,9 @@ Other parameters are passed through a pointer to a apiListKeysRequest struct via
[[Back to README]](../README.md) [[Back to README]](../README.md)
## SearchKey
> KeyInfo SearchKey(ctx, pattern).Execute()
Select key by pattern
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
pattern := "test-k" // string | A pattern (beginning or full string) corresponding to a key identifier or friendly name
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.KeyApi.SearchKey(context.Background(), pattern).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.SearchKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SearchKey`: KeyInfo
fmt.Fprintf(os.Stdout, "Response from `KeyApi.SearchKey`: %v\n", resp)
}
```
### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**pattern** | **string** | A pattern (beginning or full string) corresponding to a key identifier or friendly name |
### Other Parameters
Other parameters are passed through a pointer to a apiSearchKeyRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
### Return type
[**KeyInfo**](KeyInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## UpdateKey ## UpdateKey
> KeyInfo UpdateKey(ctx, accessKey).UpdateKeyRequest(updateKeyRequest).Execute() > KeyInfo UpdateKey(ctx).Id(id).UpdateKeyRequest(updateKeyRequest).Execute()
Update a key Update a key
@ -436,12 +361,12 @@ import (
) )
func main() { func main() {
accessKey := "GK31c2f218a2e44f485b94239e" // string | The exact API access key generated by Garage id := "GK31c2f218a2e44f485b94239e" // string | The exact API access key generated by Garage
updateKeyRequest := *openapiclient.NewUpdateKeyRequest() // UpdateKeyRequest | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove updateKeyRequest := *openapiclient.NewUpdateKeyRequest() // UpdateKeyRequest | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.KeyApi.UpdateKey(context.Background(), accessKey).UpdateKeyRequest(updateKeyRequest).Execute() resp, r, err := apiClient.KeyApi.UpdateKey(context.Background()).Id(id).UpdateKeyRequest(updateKeyRequest).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.UpdateKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.UpdateKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -454,10 +379,6 @@ func main() {
### Path Parameters ### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**accessKey** | **string** | The exact API access key generated by Garage |
### Other Parameters ### Other Parameters
@ -466,7 +387,7 @@ Other parameters are passed through a pointer to a apiUpdateKeyRequest struct vi
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**id** | **string** | The exact API access key generated by Garage |
**updateKeyRequest** | [**UpdateKeyRequest**](UpdateKeyRequest.md) | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove | **updateKeyRequest** | [**UpdateKeyRequest**](UpdateKeyRequest.md) | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove |
### Return type ### Return type

View file

@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**Name** | Pointer to **string** | | [optional] **Name** | Pointer to **string** | | [optional]
**AccessKeyId** | Pointer to **string** | | [optional] **AccessKeyId** | Pointer to **string** | | [optional]
**SecretAccessKey** | Pointer to **string** | | [optional] **SecretAccessKey** | Pointer to **NullableString** | | [optional]
**Permissions** | Pointer to [**KeyInfoPermissions**](KeyInfoPermissions.md) | | [optional] **Permissions** | Pointer to [**KeyInfoPermissions**](KeyInfoPermissions.md) | | [optional]
**Buckets** | Pointer to [**[]KeyInfoBucketsInner**](KeyInfoBucketsInner.md) | | [optional] **Buckets** | Pointer to [**[]KeyInfoBucketsInner**](KeyInfoBucketsInner.md) | | [optional]
@ -104,6 +104,16 @@ SetSecretAccessKey sets SecretAccessKey field to given value.
HasSecretAccessKey returns a boolean if a field has been set. HasSecretAccessKey returns a boolean if a field has been set.
### SetSecretAccessKeyNil
`func (o *KeyInfo) SetSecretAccessKeyNil(b bool)`
SetSecretAccessKeyNil sets the value for SecretAccessKey to be an explicit nil
### UnsetSecretAccessKey
`func (o *KeyInfo) UnsetSecretAccessKey()`
UnsetSecretAccessKey ensures that no value is present for SecretAccessKey, not even an explicit nil
### GetPermissions ### GetPermissions
`func (o *KeyInfo) GetPermissions() KeyInfoPermissions` `func (o *KeyInfo) GetPermissions() KeyInfoPermissions`

View file

@ -1,6 +1,6 @@
# \LayoutApi # \LayoutApi
All URIs are relative to *http://localhost:3903/v0* All URIs are relative to *http://localhost:3903/v1*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
@ -13,7 +13,7 @@ Method | HTTP request | Description
## AddLayout ## AddLayout
> AddLayout(ctx).RequestBody(requestBody).Execute() > ClusterLayout AddLayout(ctx).NodeRoleChange(nodeRoleChange).Execute()
Send modifications to the cluster layout Send modifications to the cluster layout
@ -32,15 +32,17 @@ import (
) )
func main() { func main() {
requestBody := map[string]NodeClusterInfo{"key": *openapiclient.NewNodeClusterInfo("dc1", NullableInt32(4), []string{"Tags_example"})} // map[string]NodeClusterInfo | To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. nodeRoleChange := []openapiclient.NodeRoleChange{openapiclient.NodeRoleChange{NodeRoleRemove: openapiclient.NewNodeRoleRemove("6a8e08af2aab1083ebab9b22165ea8b5b9d333b60a39ecd504e85cc1f432c36f", true)}} // []NodeRoleChange | To add a new node to the layout or to change the configuration of an existing node, simply set the values you want (`zone`, `capacity`, and `tags`). To remove a node, simply pass the `remove: true` field. This logic is represented in OpenAPI with a \"One Of\" object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified.
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.LayoutApi.AddLayout(context.Background()).RequestBody(requestBody).Execute() resp, r, err := apiClient.LayoutApi.AddLayout(context.Background()).NodeRoleChange(nodeRoleChange).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LayoutApi.AddLayout``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `LayoutApi.AddLayout``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `AddLayout`: ClusterLayout
fmt.Fprintf(os.Stdout, "Response from `LayoutApi.AddLayout`: %v\n", resp)
} }
``` ```
@ -55,11 +57,11 @@ Other parameters are passed through a pointer to a apiAddLayoutRequest struct vi
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**requestBody** | [**map[string]NodeClusterInfo**](NodeClusterInfo.md) | To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to &#x60;null&#x60; instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. | **nodeRoleChange** | [**[]NodeRoleChange**](NodeRoleChange.md) | To add a new node to the layout or to change the configuration of an existing node, simply set the values you want (&#x60;zone&#x60;, &#x60;capacity&#x60;, and &#x60;tags&#x60;). To remove a node, simply pass the &#x60;remove: true&#x60; field. This logic is represented in OpenAPI with a \&quot;One Of\&quot; object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. |
### Return type ### Return type
(empty response body) [**ClusterLayout**](ClusterLayout.md)
### Authorization ### Authorization
@ -68,7 +70,7 @@ Name | Type | Description | Notes
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: application/json
- **Accept**: Not defined - **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to Model list]](../README.md#documentation-for-models)
@ -77,7 +79,7 @@ Name | Type | Description | Notes
## ApplyLayout ## ApplyLayout
> ApplyLayout(ctx).LayoutVersion(layoutVersion).Execute() > ApplyLayout200Response ApplyLayout(ctx).LayoutVersion(layoutVersion).Execute()
Apply staged layout Apply staged layout
@ -96,7 +98,7 @@ import (
) )
func main() { func main() {
layoutVersion := *openapiclient.NewLayoutVersion() // LayoutVersion | Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. layoutVersion := *openapiclient.NewLayoutVersion(int32(13)) // LayoutVersion | Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster.
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
@ -105,6 +107,8 @@ func main() {
fmt.Fprintf(os.Stderr, "Error when calling `LayoutApi.ApplyLayout``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `LayoutApi.ApplyLayout``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `ApplyLayout`: ApplyLayout200Response
fmt.Fprintf(os.Stdout, "Response from `LayoutApi.ApplyLayout`: %v\n", resp)
} }
``` ```
@ -123,7 +127,7 @@ Name | Type | Description | Notes
### Return type ### Return type
(empty response body) [**ApplyLayout200Response**](ApplyLayout200Response.md)
### Authorization ### Authorization
@ -132,7 +136,7 @@ Name | Type | Description | Notes
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: application/json
- **Accept**: Not defined - **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to Model list]](../README.md#documentation-for-models)
@ -221,7 +225,7 @@ import (
) )
func main() { func main() {
layoutVersion := *openapiclient.NewLayoutVersion() // LayoutVersion | Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster. layoutVersion := *openapiclient.NewLayoutVersion(int32(13)) // LayoutVersion | Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster.
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)

View file

@ -4,13 +4,13 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**Version** | Pointer to **int32** | | [optional] **Version** | **int32** | |
## Methods ## Methods
### NewLayoutVersion ### NewLayoutVersion
`func NewLayoutVersion() *LayoutVersion` `func NewLayoutVersion(version int32, ) *LayoutVersion`
NewLayoutVersion instantiates a new LayoutVersion object NewLayoutVersion instantiates a new LayoutVersion object
This constructor will assign default values to properties that have it defined, This constructor will assign default values to properties that have it defined,
@ -44,11 +44,6 @@ and a boolean to check if the value has been set.
SetVersion sets Version field to given value. SetVersion sets Version field to given value.
### HasVersion
`func (o *LayoutVersion) HasVersion() bool`
HasVersion returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -5,14 +5,14 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**Zone** | **string** | | **Zone** | **string** | |
**Capacity** | **NullableInt32** | | **Capacity** | Pointer to **NullableInt64** | | [optional]
**Tags** | **[]string** | User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage | **Tags** | **[]string** | User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage |
## Methods ## Methods
### NewNodeClusterInfo ### NewNodeClusterInfo
`func NewNodeClusterInfo(zone string, capacity NullableInt32, tags []string, ) *NodeClusterInfo` `func NewNodeClusterInfo(zone string, tags []string, ) *NodeClusterInfo`
NewNodeClusterInfo instantiates a new NodeClusterInfo object NewNodeClusterInfo instantiates a new NodeClusterInfo object
This constructor will assign default values to properties that have it defined, This constructor will assign default values to properties that have it defined,
@ -49,23 +49,28 @@ SetZone sets Zone field to given value.
### GetCapacity ### GetCapacity
`func (o *NodeClusterInfo) GetCapacity() int32` `func (o *NodeClusterInfo) GetCapacity() int64`
GetCapacity returns the Capacity field if non-nil, zero value otherwise. GetCapacity returns the Capacity field if non-nil, zero value otherwise.
### GetCapacityOk ### GetCapacityOk
`func (o *NodeClusterInfo) GetCapacityOk() (*int32, bool)` `func (o *NodeClusterInfo) GetCapacityOk() (*int64, bool)`
GetCapacityOk returns a tuple with the Capacity field if it's non-nil, zero value otherwise GetCapacityOk returns a tuple with the Capacity field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set. and a boolean to check if the value has been set.
### SetCapacity ### SetCapacity
`func (o *NodeClusterInfo) SetCapacity(v int32)` `func (o *NodeClusterInfo) SetCapacity(v int64)`
SetCapacity sets Capacity field to given value. SetCapacity sets Capacity field to given value.
### HasCapacity
`func (o *NodeClusterInfo) HasCapacity() bool`
HasCapacity returns a boolean if a field has been set.
### SetCapacityNil ### SetCapacityNil

View file

@ -4,6 +4,7 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**Id** | Pointer to **string** | | [optional]
**Addr** | **string** | | **Addr** | **string** | |
**IsUp** | **bool** | | **IsUp** | **bool** | |
**LastSeenSecsAgo** | **NullableInt32** | | **LastSeenSecsAgo** | **NullableInt32** | |
@ -28,6 +29,31 @@ NewNodeNetworkInfoWithDefaults instantiates a new NodeNetworkInfo object
This constructor will only assign default values to properties that have it defined, This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set but it doesn't guarantee that properties required by API are set
### GetId
`func (o *NodeNetworkInfo) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *NodeNetworkInfo) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *NodeNetworkInfo) SetId(v string)`
SetId sets Id field to given value.
### HasId
`func (o *NodeNetworkInfo) HasId() bool`
HasId returns a boolean if a field has been set.
### GetAddr ### GetAddr
`func (o *NodeNetworkInfo) GetAddr() string` `func (o *NodeNetworkInfo) GetAddr() string`

145
docs/NodeRoleChange.md Normal file
View file

@ -0,0 +1,145 @@
# NodeRoleChange
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | |
**Remove** | **bool** | |
**Zone** | **string** | |
**Capacity** | **NullableInt64** | |
**Tags** | **[]string** | |
## Methods
### NewNodeRoleChange
`func NewNodeRoleChange(id string, remove bool, zone string, capacity NullableInt64, tags []string, ) *NodeRoleChange`
NewNodeRoleChange instantiates a new NodeRoleChange object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewNodeRoleChangeWithDefaults
`func NewNodeRoleChangeWithDefaults() *NodeRoleChange`
NewNodeRoleChangeWithDefaults instantiates a new NodeRoleChange object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetId
`func (o *NodeRoleChange) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *NodeRoleChange) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *NodeRoleChange) SetId(v string)`
SetId sets Id field to given value.
### GetRemove
`func (o *NodeRoleChange) GetRemove() bool`
GetRemove returns the Remove field if non-nil, zero value otherwise.
### GetRemoveOk
`func (o *NodeRoleChange) GetRemoveOk() (*bool, bool)`
GetRemoveOk returns a tuple with the Remove field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetRemove
`func (o *NodeRoleChange) SetRemove(v bool)`
SetRemove sets Remove field to given value.
### GetZone
`func (o *NodeRoleChange) GetZone() string`
GetZone returns the Zone field if non-nil, zero value otherwise.
### GetZoneOk
`func (o *NodeRoleChange) GetZoneOk() (*string, bool)`
GetZoneOk returns a tuple with the Zone field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetZone
`func (o *NodeRoleChange) SetZone(v string)`
SetZone sets Zone field to given value.
### GetCapacity
`func (o *NodeRoleChange) GetCapacity() int64`
GetCapacity returns the Capacity field if non-nil, zero value otherwise.
### GetCapacityOk
`func (o *NodeRoleChange) GetCapacityOk() (*int64, bool)`
GetCapacityOk returns a tuple with the Capacity field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCapacity
`func (o *NodeRoleChange) SetCapacity(v int64)`
SetCapacity sets Capacity field to given value.
### SetCapacityNil
`func (o *NodeRoleChange) SetCapacityNil(b bool)`
SetCapacityNil sets the value for Capacity to be an explicit nil
### UnsetCapacity
`func (o *NodeRoleChange) UnsetCapacity()`
UnsetCapacity ensures that no value is present for Capacity, not even an explicit nil
### GetTags
`func (o *NodeRoleChange) GetTags() []string`
GetTags returns the Tags field if non-nil, zero value otherwise.
### GetTagsOk
`func (o *NodeRoleChange) GetTagsOk() (*[]string, bool)`
GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTags
`func (o *NodeRoleChange) SetTags(v []string)`
SetTags sets Tags field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

72
docs/NodeRoleRemove.md Normal file
View file

@ -0,0 +1,72 @@
# NodeRoleRemove
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | |
**Remove** | **bool** | |
## Methods
### NewNodeRoleRemove
`func NewNodeRoleRemove(id string, remove bool, ) *NodeRoleRemove`
NewNodeRoleRemove instantiates a new NodeRoleRemove object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewNodeRoleRemoveWithDefaults
`func NewNodeRoleRemoveWithDefaults() *NodeRoleRemove`
NewNodeRoleRemoveWithDefaults instantiates a new NodeRoleRemove object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetId
`func (o *NodeRoleRemove) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *NodeRoleRemove) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *NodeRoleRemove) SetId(v string)`
SetId sets Id field to given value.
### GetRemove
`func (o *NodeRoleRemove) GetRemove() bool`
GetRemove returns the Remove field if non-nil, zero value otherwise.
### GetRemoveOk
`func (o *NodeRoleRemove) GetRemoveOk() (*bool, bool)`
GetRemoveOk returns a tuple with the Remove field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetRemove
`func (o *NodeRoleRemove) SetRemove(v bool)`
SetRemove sets Remove field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

124
docs/NodeRoleUpdate.md Normal file
View file

@ -0,0 +1,124 @@
# NodeRoleUpdate
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | |
**Zone** | **string** | |
**Capacity** | **NullableInt64** | |
**Tags** | **[]string** | |
## Methods
### NewNodeRoleUpdate
`func NewNodeRoleUpdate(id string, zone string, capacity NullableInt64, tags []string, ) *NodeRoleUpdate`
NewNodeRoleUpdate instantiates a new NodeRoleUpdate object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewNodeRoleUpdateWithDefaults
`func NewNodeRoleUpdateWithDefaults() *NodeRoleUpdate`
NewNodeRoleUpdateWithDefaults instantiates a new NodeRoleUpdate object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetId
`func (o *NodeRoleUpdate) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *NodeRoleUpdate) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *NodeRoleUpdate) SetId(v string)`
SetId sets Id field to given value.
### GetZone
`func (o *NodeRoleUpdate) GetZone() string`
GetZone returns the Zone field if non-nil, zero value otherwise.
### GetZoneOk
`func (o *NodeRoleUpdate) GetZoneOk() (*string, bool)`
GetZoneOk returns a tuple with the Zone field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetZone
`func (o *NodeRoleUpdate) SetZone(v string)`
SetZone sets Zone field to given value.
### GetCapacity
`func (o *NodeRoleUpdate) GetCapacity() int64`
GetCapacity returns the Capacity field if non-nil, zero value otherwise.
### GetCapacityOk
`func (o *NodeRoleUpdate) GetCapacityOk() (*int64, bool)`
GetCapacityOk returns a tuple with the Capacity field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCapacity
`func (o *NodeRoleUpdate) SetCapacity(v int64)`
SetCapacity sets Capacity field to given value.
### SetCapacityNil
`func (o *NodeRoleUpdate) SetCapacityNil(b bool)`
SetCapacityNil sets the value for Capacity to be an explicit nil
### UnsetCapacity
`func (o *NodeRoleUpdate) UnsetCapacity()`
UnsetCapacity ensures that no value is present for Capacity, not even an explicit nil
### GetTags
`func (o *NodeRoleUpdate) GetTags() []string`
GetTags returns the Tags field if non-nil, zero value otherwise.
### GetTagsOk
`func (o *NodeRoleUpdate) GetTagsOk() (*[]string, bool)`
GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTags
`func (o *NodeRoleUpdate) SetTags(v []string)`
SetTags sets Tags field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -1,11 +1,12 @@
# \NodesApi # \NodesApi
All URIs are relative to *http://localhost:3903/v0* All URIs are relative to *http://localhost:3903/v1*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**AddNode**](NodesApi.md#AddNode) | **Post** /connect | Connect target node to other Garage nodes [**AddNode**](NodesApi.md#AddNode) | **Post** /connect | Connect a new node
[**GetNodes**](NodesApi.md#GetNodes) | **Get** /status | Status of this node and other nodes in the cluster [**GetHealth**](NodesApi.md#GetHealth) | **Get** /health | Cluster health report
[**GetNodes**](NodesApi.md#GetNodes) | **Get** /status | Describe cluster
@ -13,7 +14,7 @@ Method | HTTP request | Description
> []AddNode200ResponseInner AddNode(ctx).RequestBody(requestBody).Execute() > []AddNode200ResponseInner AddNode(ctx).RequestBody(requestBody).Execute()
Connect target node to other Garage nodes Connect a new node
@ -75,11 +76,72 @@ Name | Type | Description | Notes
[[Back to README]](../README.md) [[Back to README]](../README.md)
## GetHealth
> GetHealth200Response GetHealth(ctx).Execute()
Cluster health report
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodesApi.GetHealth(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodesApi.GetHealth``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetHealth`: GetHealth200Response
fmt.Fprintf(os.Stdout, "Response from `NodesApi.GetHealth`: %v\n", resp)
}
```
### Path Parameters
This endpoint does not need any parameter.
### Other Parameters
Other parameters are passed through a pointer to a apiGetHealthRequest struct via the builder pattern
### Return type
[**GetHealth200Response**](GetHealth200Response.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## GetNodes ## GetNodes
> GetNodes200Response GetNodes(ctx).Execute() > GetNodes200Response GetNodes(ctx).Execute()
Status of this node and other nodes in the cluster Describe cluster

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@ -16,7 +16,7 @@ import (
// AddKeyRequest struct for AddKeyRequest // AddKeyRequest struct for AddKeyRequest
type AddKeyRequest struct { type AddKeyRequest struct {
Name *string `json:"name,omitempty"` Name NullableString `json:"name,omitempty"`
} }
// NewAddKeyRequest instantiates a new AddKeyRequest object // NewAddKeyRequest instantiates a new AddKeyRequest object
@ -36,42 +36,52 @@ func NewAddKeyRequestWithDefaults() *AddKeyRequest {
return &this return &this
} }
// GetName returns the Name field value if set, zero value otherwise. // GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AddKeyRequest) GetName() string { func (o *AddKeyRequest) GetName() string {
if o == nil || o.Name == nil { if o == nil || o.Name.Get() == nil {
var ret string var ret string
return ret return ret
} }
return *o.Name return *o.Name.Get()
} }
// GetNameOk returns a tuple with the Name field value if set, nil otherwise // GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AddKeyRequest) GetNameOk() (*string, bool) { func (o *AddKeyRequest) GetNameOk() (*string, bool) {
if o == nil || o.Name == nil { if o == nil {
return nil, false return nil, false
} }
return o.Name, true return o.Name.Get(), o.Name.IsSet()
} }
// HasName returns a boolean if a field has been set. // HasName returns a boolean if a field has been set.
func (o *AddKeyRequest) HasName() bool { func (o *AddKeyRequest) HasName() bool {
if o != nil && o.Name != nil { if o != nil && o.Name.IsSet() {
return true return true
} }
return false return false
} }
// SetName gets a reference to the given string and assigns it to the Name field. // SetName gets a reference to the given NullableString and assigns it to the Name field.
func (o *AddKeyRequest) SetName(v string) { func (o *AddKeyRequest) SetName(v string) {
o.Name = &v o.Name.Set(&v)
}
// SetNameNil sets the value for Name to be an explicit nil
func (o *AddKeyRequest) SetNameNil() {
o.Name.Set(nil)
}
// UnsetName ensures that no value is present for Name, not even an explicit nil
func (o *AddKeyRequest) UnsetName() {
o.Name.Unset()
} }
func (o AddKeyRequest) MarshalJSON() ([]byte, error) { func (o AddKeyRequest) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{} toSerialize := map[string]interface{}{}
if o.Name != nil { if o.Name.IsSet() {
toSerialize["name"] = o.Name toSerialize["name"] = o.Name.Get()
} }
return json.Marshal(toSerialize) return json.Marshal(toSerialize)
} }

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -0,0 +1,137 @@
/*
Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.9.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package garage
import (
"encoding/json"
)
// ApplyLayout200Response struct for ApplyLayout200Response
type ApplyLayout200Response struct {
Message []string `json:"message"`
Layout ClusterLayout `json:"layout"`
}
// NewApplyLayout200Response instantiates a new ApplyLayout200Response object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewApplyLayout200Response(message []string, layout ClusterLayout) *ApplyLayout200Response {
this := ApplyLayout200Response{}
this.Message = message
this.Layout = layout
return &this
}
// NewApplyLayout200ResponseWithDefaults instantiates a new ApplyLayout200Response object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewApplyLayout200ResponseWithDefaults() *ApplyLayout200Response {
this := ApplyLayout200Response{}
return &this
}
// GetMessage returns the Message field value
func (o *ApplyLayout200Response) GetMessage() []string {
if o == nil {
var ret []string
return ret
}
return o.Message
}
// GetMessageOk returns a tuple with the Message field value
// and a boolean to check if the value has been set.
func (o *ApplyLayout200Response) GetMessageOk() ([]string, bool) {
if o == nil {
return nil, false
}
return o.Message, true
}
// SetMessage sets field value
func (o *ApplyLayout200Response) SetMessage(v []string) {
o.Message = v
}
// GetLayout returns the Layout field value
func (o *ApplyLayout200Response) GetLayout() ClusterLayout {
if o == nil {
var ret ClusterLayout
return ret
}
return o.Layout
}
// GetLayoutOk returns a tuple with the Layout field value
// and a boolean to check if the value has been set.
func (o *ApplyLayout200Response) GetLayoutOk() (*ClusterLayout, bool) {
if o == nil {
return nil, false
}
return &o.Layout, true
}
// SetLayout sets field value
func (o *ApplyLayout200Response) SetLayout(v ClusterLayout) {
o.Layout = v
}
func (o ApplyLayout200Response) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["message"] = o.Message
}
if true {
toSerialize["layout"] = o.Layout
}
return json.Marshal(toSerialize)
}
type NullableApplyLayout200Response struct {
value *ApplyLayout200Response
isSet bool
}
func (v NullableApplyLayout200Response) Get() *ApplyLayout200Response {
return v.value
}
func (v *NullableApplyLayout200Response) Set(val *ApplyLayout200Response) {
v.value = val
v.isSet = true
}
func (v NullableApplyLayout200Response) IsSet() bool {
return v.isSet
}
func (v *NullableApplyLayout200Response) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableApplyLayout200Response(val *ApplyLayout200Response) *NullableApplyLayout200Response {
return &NullableApplyLayout200Response{value: val, isSet: true}
}
func (v NullableApplyLayout200Response) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableApplyLayout200Response) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@ -17,15 +17,15 @@ import (
// ClusterLayout struct for ClusterLayout // ClusterLayout struct for ClusterLayout
type ClusterLayout struct { type ClusterLayout struct {
Version int32 `json:"version"` Version int32 `json:"version"`
Roles map[string]NodeClusterInfo `json:"roles"` Roles []NodeClusterInfo `json:"roles"`
StagedRoleChanges map[string]NodeClusterInfo `json:"stagedRoleChanges"` StagedRoleChanges []NodeRoleChange `json:"stagedRoleChanges"`
} }
// NewClusterLayout instantiates a new ClusterLayout object // NewClusterLayout instantiates a new ClusterLayout object
// This constructor will assign default values to properties that have it defined, // This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments // and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed // will change when the set of required properties is changed
func NewClusterLayout(version int32, roles map[string]NodeClusterInfo, stagedRoleChanges map[string]NodeClusterInfo) *ClusterLayout { func NewClusterLayout(version int32, roles []NodeClusterInfo, stagedRoleChanges []NodeRoleChange) *ClusterLayout {
this := ClusterLayout{} this := ClusterLayout{}
this.Version = version this.Version = version
this.Roles = roles this.Roles = roles
@ -66,9 +66,9 @@ func (o *ClusterLayout) SetVersion(v int32) {
} }
// GetRoles returns the Roles field value // GetRoles returns the Roles field value
func (o *ClusterLayout) GetRoles() map[string]NodeClusterInfo { func (o *ClusterLayout) GetRoles() []NodeClusterInfo {
if o == nil { if o == nil {
var ret map[string]NodeClusterInfo var ret []NodeClusterInfo
return ret return ret
} }
@ -77,22 +77,22 @@ func (o *ClusterLayout) GetRoles() map[string]NodeClusterInfo {
// GetRolesOk returns a tuple with the Roles field value // GetRolesOk returns a tuple with the Roles field value
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *ClusterLayout) GetRolesOk() (*map[string]NodeClusterInfo, bool) { func (o *ClusterLayout) GetRolesOk() ([]NodeClusterInfo, bool) {
if o == nil { if o == nil {
return nil, false return nil, false
} }
return &o.Roles, true return o.Roles, true
} }
// SetRoles sets field value // SetRoles sets field value
func (o *ClusterLayout) SetRoles(v map[string]NodeClusterInfo) { func (o *ClusterLayout) SetRoles(v []NodeClusterInfo) {
o.Roles = v o.Roles = v
} }
// GetStagedRoleChanges returns the StagedRoleChanges field value // GetStagedRoleChanges returns the StagedRoleChanges field value
func (o *ClusterLayout) GetStagedRoleChanges() map[string]NodeClusterInfo { func (o *ClusterLayout) GetStagedRoleChanges() []NodeRoleChange {
if o == nil { if o == nil {
var ret map[string]NodeClusterInfo var ret []NodeRoleChange
return ret return ret
} }
@ -101,15 +101,15 @@ func (o *ClusterLayout) GetStagedRoleChanges() map[string]NodeClusterInfo {
// GetStagedRoleChangesOk returns a tuple with the StagedRoleChanges field value // GetStagedRoleChangesOk returns a tuple with the StagedRoleChanges field value
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *ClusterLayout) GetStagedRoleChangesOk() (*map[string]NodeClusterInfo, bool) { func (o *ClusterLayout) GetStagedRoleChangesOk() ([]NodeRoleChange, bool) {
if o == nil { if o == nil {
return nil, false return nil, false
} }
return &o.StagedRoleChanges, true return o.StagedRoleChanges, true
} }
// SetStagedRoleChanges sets field value // SetStagedRoleChanges sets field value
func (o *ClusterLayout) SetStagedRoleChanges(v map[string]NodeClusterInfo) { func (o *ClusterLayout) SetStagedRoleChanges(v []NodeRoleChange) {
o.StagedRoleChanges = v o.StagedRoleChanges = v
} }

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -0,0 +1,311 @@
/*
Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.9.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package garage
import (
"encoding/json"
)
// GetHealth200Response struct for GetHealth200Response
type GetHealth200Response struct {
Status string `json:"status"`
KnownNodes int64 `json:"knownNodes"`
ConnectedNodes int64 `json:"connectedNodes"`
StorageNodes int64 `json:"storageNodes"`
StorageNodesOk int64 `json:"storageNodesOk"`
Partitions int64 `json:"partitions"`
PartitionsQuorum int64 `json:"partitionsQuorum"`
PartitionsAllOk int64 `json:"partitionsAllOk"`
}
// NewGetHealth200Response instantiates a new GetHealth200Response object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewGetHealth200Response(status string, knownNodes int64, connectedNodes int64, storageNodes int64, storageNodesOk int64, partitions int64, partitionsQuorum int64, partitionsAllOk int64) *GetHealth200Response {
this := GetHealth200Response{}
this.Status = status
this.KnownNodes = knownNodes
this.ConnectedNodes = connectedNodes
this.StorageNodes = storageNodes
this.StorageNodesOk = storageNodesOk
this.Partitions = partitions
this.PartitionsQuorum = partitionsQuorum
this.PartitionsAllOk = partitionsAllOk
return &this
}
// NewGetHealth200ResponseWithDefaults instantiates a new GetHealth200Response object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewGetHealth200ResponseWithDefaults() *GetHealth200Response {
this := GetHealth200Response{}
return &this
}
// GetStatus returns the Status field value
func (o *GetHealth200Response) GetStatus() string {
if o == nil {
var ret string
return ret
}
return o.Status
}
// GetStatusOk returns a tuple with the Status field value
// and a boolean to check if the value has been set.
func (o *GetHealth200Response) GetStatusOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Status, true
}
// SetStatus sets field value
func (o *GetHealth200Response) SetStatus(v string) {
o.Status = v
}
// GetKnownNodes returns the KnownNodes field value
func (o *GetHealth200Response) GetKnownNodes() int64 {
if o == nil {
var ret int64
return ret
}
return o.KnownNodes
}
// GetKnownNodesOk returns a tuple with the KnownNodes field value
// and a boolean to check if the value has been set.
func (o *GetHealth200Response) GetKnownNodesOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.KnownNodes, true
}
// SetKnownNodes sets field value
func (o *GetHealth200Response) SetKnownNodes(v int64) {
o.KnownNodes = v
}
// GetConnectedNodes returns the ConnectedNodes field value
func (o *GetHealth200Response) GetConnectedNodes() int64 {
if o == nil {
var ret int64
return ret
}
return o.ConnectedNodes
}
// GetConnectedNodesOk returns a tuple with the ConnectedNodes field value
// and a boolean to check if the value has been set.
func (o *GetHealth200Response) GetConnectedNodesOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.ConnectedNodes, true
}
// SetConnectedNodes sets field value
func (o *GetHealth200Response) SetConnectedNodes(v int64) {
o.ConnectedNodes = v
}
// GetStorageNodes returns the StorageNodes field value
func (o *GetHealth200Response) GetStorageNodesAll() int64 {
if o == nil {
var ret int64
return ret
}
return o.StorageNodes
}
// GetStorageNodesOk returns a tuple with the StorageNodes field value
// and a boolean to check if the value has been set.
func (o *GetHealth200Response) GetStorageNodesAllOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.StorageNodes, true
}
// SetStorageNodes sets field value
func (o *GetHealth200Response) SetStorageNodes(v int64) {
o.StorageNodes = v
}
// GetStorageNodesOk returns the StorageNodesOk field value
func (o *GetHealth200Response) GetStorageNodesOk() int64 {
if o == nil {
var ret int64
return ret
}
return o.StorageNodesOk
}
// GetStorageNodesOkOk returns a tuple with the StorageNodesOk field value
// and a boolean to check if the value has been set.
func (o *GetHealth200Response) GetStorageNodesOkOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.StorageNodesOk, true
}
// SetStorageNodesOk sets field value
func (o *GetHealth200Response) SetStorageNodesOk(v int64) {
o.StorageNodesOk = v
}
// GetPartitions returns the Partitions field value
func (o *GetHealth200Response) GetPartitions() int64 {
if o == nil {
var ret int64
return ret
}
return o.Partitions
}
// GetPartitionsOk returns a tuple with the Partitions field value
// and a boolean to check if the value has been set.
func (o *GetHealth200Response) GetPartitionsOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.Partitions, true
}
// SetPartitions sets field value
func (o *GetHealth200Response) SetPartitions(v int64) {
o.Partitions = v
}
// GetPartitionsQuorum returns the PartitionsQuorum field value
func (o *GetHealth200Response) GetPartitionsQuorum() int64 {
if o == nil {
var ret int64
return ret
}
return o.PartitionsQuorum
}
// GetPartitionsQuorumOk returns a tuple with the PartitionsQuorum field value
// and a boolean to check if the value has been set.
func (o *GetHealth200Response) GetPartitionsQuorumOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.PartitionsQuorum, true
}
// SetPartitionsQuorum sets field value
func (o *GetHealth200Response) SetPartitionsQuorum(v int64) {
o.PartitionsQuorum = v
}
// GetPartitionsAllOk returns the PartitionsAllOk field value
func (o *GetHealth200Response) GetPartitionsAllOk() int64 {
if o == nil {
var ret int64
return ret
}
return o.PartitionsAllOk
}
// GetPartitionsAllOkOk returns a tuple with the PartitionsAllOk field value
// and a boolean to check if the value has been set.
func (o *GetHealth200Response) GetPartitionsAllOkOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.PartitionsAllOk, true
}
// SetPartitionsAllOk sets field value
func (o *GetHealth200Response) SetPartitionsAllOk(v int64) {
o.PartitionsAllOk = v
}
func (o GetHealth200Response) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["status"] = o.Status
}
if true {
toSerialize["knownNodes"] = o.KnownNodes
}
if true {
toSerialize["connectedNodes"] = o.ConnectedNodes
}
if true {
toSerialize["storageNodes"] = o.StorageNodes
}
if true {
toSerialize["storageNodesOk"] = o.StorageNodesOk
}
if true {
toSerialize["partitions"] = o.Partitions
}
if true {
toSerialize["partitionsQuorum"] = o.PartitionsQuorum
}
if true {
toSerialize["partitionsAllOk"] = o.PartitionsAllOk
}
return json.Marshal(toSerialize)
}
type NullableGetHealth200Response struct {
value *GetHealth200Response
isSet bool
}
func (v NullableGetHealth200Response) Get() *GetHealth200Response {
return v.value
}
func (v *NullableGetHealth200Response) Set(val *GetHealth200Response) {
v.value = val
v.isSet = true
}
func (v NullableGetHealth200Response) IsSet() bool {
return v.isSet
}
func (v *NullableGetHealth200Response) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetHealth200Response(val *GetHealth200Response) *NullableGetHealth200Response {
return &NullableGetHealth200Response{value: val, isSet: true}
}
func (v NullableGetHealth200Response) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetHealth200Response) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@ -18,7 +18,10 @@ import (
type GetNodes200Response struct { type GetNodes200Response struct {
Node string `json:"node"` Node string `json:"node"`
GarageVersion string `json:"garageVersion"` GarageVersion string `json:"garageVersion"`
KnownNodes map[string]NodeNetworkInfo `json:"knownNodes"` GarageFeatures []string `json:"garageFeatures"`
RustVersion string `json:"rustVersion"`
DbEngine string `json:"dbEngine"`
KnownNodes []NodeNetworkInfo `json:"knownNodes"`
Layout ClusterLayout `json:"layout"` Layout ClusterLayout `json:"layout"`
} }
@ -26,10 +29,13 @@ type GetNodes200Response struct {
// This constructor will assign default values to properties that have it defined, // This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments // and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed // will change when the set of required properties is changed
func NewGetNodes200Response(node string, garageVersion string, knownNodes map[string]NodeNetworkInfo, layout ClusterLayout) *GetNodes200Response { func NewGetNodes200Response(node string, garageVersion string, garageFeatures []string, rustVersion string, dbEngine string, knownNodes []NodeNetworkInfo, layout ClusterLayout) *GetNodes200Response {
this := GetNodes200Response{} this := GetNodes200Response{}
this.Node = node this.Node = node
this.GarageVersion = garageVersion this.GarageVersion = garageVersion
this.GarageFeatures = garageFeatures
this.RustVersion = rustVersion
this.DbEngine = dbEngine
this.KnownNodes = knownNodes this.KnownNodes = knownNodes
this.Layout = layout this.Layout = layout
return &this return &this
@ -91,10 +97,82 @@ func (o *GetNodes200Response) SetGarageVersion(v string) {
o.GarageVersion = v o.GarageVersion = v
} }
// GetKnownNodes returns the KnownNodes field value // GetGarageFeatures returns the GarageFeatures field value
func (o *GetNodes200Response) GetKnownNodes() map[string]NodeNetworkInfo { func (o *GetNodes200Response) GetGarageFeatures() []string {
if o == nil { if o == nil {
var ret map[string]NodeNetworkInfo var ret []string
return ret
}
return o.GarageFeatures
}
// GetGarageFeaturesOk returns a tuple with the GarageFeatures field value
// and a boolean to check if the value has been set.
func (o *GetNodes200Response) GetGarageFeaturesOk() ([]string, bool) {
if o == nil {
return nil, false
}
return o.GarageFeatures, true
}
// SetGarageFeatures sets field value
func (o *GetNodes200Response) SetGarageFeatures(v []string) {
o.GarageFeatures = v
}
// GetRustVersion returns the RustVersion field value
func (o *GetNodes200Response) GetRustVersion() string {
if o == nil {
var ret string
return ret
}
return o.RustVersion
}
// GetRustVersionOk returns a tuple with the RustVersion field value
// and a boolean to check if the value has been set.
func (o *GetNodes200Response) GetRustVersionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.RustVersion, true
}
// SetRustVersion sets field value
func (o *GetNodes200Response) SetRustVersion(v string) {
o.RustVersion = v
}
// GetDbEngine returns the DbEngine field value
func (o *GetNodes200Response) GetDbEngine() string {
if o == nil {
var ret string
return ret
}
return o.DbEngine
}
// GetDbEngineOk returns a tuple with the DbEngine field value
// and a boolean to check if the value has been set.
func (o *GetNodes200Response) GetDbEngineOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DbEngine, true
}
// SetDbEngine sets field value
func (o *GetNodes200Response) SetDbEngine(v string) {
o.DbEngine = v
}
// GetKnownNodes returns the KnownNodes field value
func (o *GetNodes200Response) GetKnownNodes() []NodeNetworkInfo {
if o == nil {
var ret []NodeNetworkInfo
return ret return ret
} }
@ -103,15 +181,15 @@ func (o *GetNodes200Response) GetKnownNodes() map[string]NodeNetworkInfo {
// GetKnownNodesOk returns a tuple with the KnownNodes field value // GetKnownNodesOk returns a tuple with the KnownNodes field value
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *GetNodes200Response) GetKnownNodesOk() (*map[string]NodeNetworkInfo, bool) { func (o *GetNodes200Response) GetKnownNodesOk() ([]NodeNetworkInfo, bool) {
if o == nil { if o == nil {
return nil, false return nil, false
} }
return &o.KnownNodes, true return o.KnownNodes, true
} }
// SetKnownNodes sets field value // SetKnownNodes sets field value
func (o *GetNodes200Response) SetKnownNodes(v map[string]NodeNetworkInfo) { func (o *GetNodes200Response) SetKnownNodes(v []NodeNetworkInfo) {
o.KnownNodes = v o.KnownNodes = v
} }
@ -147,6 +225,15 @@ func (o GetNodes200Response) MarshalJSON() ([]byte, error) {
if true { if true {
toSerialize["garageVersion"] = o.GarageVersion toSerialize["garageVersion"] = o.GarageVersion
} }
if true {
toSerialize["garageFeatures"] = o.GarageFeatures
}
if true {
toSerialize["rustVersion"] = o.RustVersion
}
if true {
toSerialize["dbEngine"] = o.DbEngine
}
if true { if true {
toSerialize["knownNodes"] = o.KnownNodes toSerialize["knownNodes"] = o.KnownNodes
} }

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@ -16,7 +16,7 @@ import (
// ImportKeyRequest struct for ImportKeyRequest // ImportKeyRequest struct for ImportKeyRequest
type ImportKeyRequest struct { type ImportKeyRequest struct {
Name string `json:"name"` Name NullableString `json:"name"`
AccessKeyId string `json:"accessKeyId"` AccessKeyId string `json:"accessKeyId"`
SecretAccessKey string `json:"secretAccessKey"` SecretAccessKey string `json:"secretAccessKey"`
} }
@ -25,7 +25,7 @@ type ImportKeyRequest struct {
// This constructor will assign default values to properties that have it defined, // This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments // and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed // will change when the set of required properties is changed
func NewImportKeyRequest(name string, accessKeyId string, secretAccessKey string) *ImportKeyRequest { func NewImportKeyRequest(name NullableString, accessKeyId string, secretAccessKey string) *ImportKeyRequest {
this := ImportKeyRequest{} this := ImportKeyRequest{}
this.Name = name this.Name = name
this.AccessKeyId = accessKeyId this.AccessKeyId = accessKeyId
@ -42,27 +42,29 @@ func NewImportKeyRequestWithDefaults() *ImportKeyRequest {
} }
// GetName returns the Name field value // GetName returns the Name field value
// If the value is explicit nil, the zero value for string will be returned
func (o *ImportKeyRequest) GetName() string { func (o *ImportKeyRequest) GetName() string {
if o == nil { if o == nil || o.Name.Get() == nil {
var ret string var ret string
return ret return ret
} }
return o.Name return *o.Name.Get()
} }
// GetNameOk returns a tuple with the Name field value // GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ImportKeyRequest) GetNameOk() (*string, bool) { func (o *ImportKeyRequest) GetNameOk() (*string, bool) {
if o == nil { if o == nil {
return nil, false return nil, false
} }
return &o.Name, true return o.Name.Get(), o.Name.IsSet()
} }
// SetName sets field value // SetName sets field value
func (o *ImportKeyRequest) SetName(v string) { func (o *ImportKeyRequest) SetName(v string) {
o.Name = v o.Name.Set(&v)
} }
// GetAccessKeyId returns the AccessKeyId field value // GetAccessKeyId returns the AccessKeyId field value
@ -116,7 +118,7 @@ func (o *ImportKeyRequest) SetSecretAccessKey(v string) {
func (o ImportKeyRequest) MarshalJSON() ([]byte, error) { func (o ImportKeyRequest) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{} toSerialize := map[string]interface{}{}
if true { if true {
toSerialize["name"] = o.Name toSerialize["name"] = o.Name.Get()
} }
if true { if true {
toSerialize["accessKeyId"] = o.AccessKeyId toSerialize["accessKeyId"] = o.AccessKeyId

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@ -18,7 +18,7 @@ import (
type KeyInfo struct { type KeyInfo struct {
Name *string `json:"name,omitempty"` Name *string `json:"name,omitempty"`
AccessKeyId *string `json:"accessKeyId,omitempty"` AccessKeyId *string `json:"accessKeyId,omitempty"`
SecretAccessKey *string `json:"secretAccessKey,omitempty"` SecretAccessKey NullableString `json:"secretAccessKey,omitempty"`
Permissions *KeyInfoPermissions `json:"permissions,omitempty"` Permissions *KeyInfoPermissions `json:"permissions,omitempty"`
Buckets []KeyInfoBucketsInner `json:"buckets,omitempty"` Buckets []KeyInfoBucketsInner `json:"buckets,omitempty"`
} }
@ -104,36 +104,46 @@ func (o *KeyInfo) SetAccessKeyId(v string) {
o.AccessKeyId = &v o.AccessKeyId = &v
} }
// GetSecretAccessKey returns the SecretAccessKey field value if set, zero value otherwise. // GetSecretAccessKey returns the SecretAccessKey field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *KeyInfo) GetSecretAccessKey() string { func (o *KeyInfo) GetSecretAccessKey() string {
if o == nil || o.SecretAccessKey == nil { if o == nil || o.SecretAccessKey.Get() == nil {
var ret string var ret string
return ret return ret
} }
return *o.SecretAccessKey return *o.SecretAccessKey.Get()
} }
// GetSecretAccessKeyOk returns a tuple with the SecretAccessKey field value if set, nil otherwise // GetSecretAccessKeyOk returns a tuple with the SecretAccessKey field value if set, nil otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *KeyInfo) GetSecretAccessKeyOk() (*string, bool) { func (o *KeyInfo) GetSecretAccessKeyOk() (*string, bool) {
if o == nil || o.SecretAccessKey == nil { if o == nil {
return nil, false return nil, false
} }
return o.SecretAccessKey, true return o.SecretAccessKey.Get(), o.SecretAccessKey.IsSet()
} }
// HasSecretAccessKey returns a boolean if a field has been set. // HasSecretAccessKey returns a boolean if a field has been set.
func (o *KeyInfo) HasSecretAccessKey() bool { func (o *KeyInfo) HasSecretAccessKey() bool {
if o != nil && o.SecretAccessKey != nil { if o != nil && o.SecretAccessKey.IsSet() {
return true return true
} }
return false return false
} }
// SetSecretAccessKey gets a reference to the given string and assigns it to the SecretAccessKey field. // SetSecretAccessKey gets a reference to the given NullableString and assigns it to the SecretAccessKey field.
func (o *KeyInfo) SetSecretAccessKey(v string) { func (o *KeyInfo) SetSecretAccessKey(v string) {
o.SecretAccessKey = &v o.SecretAccessKey.Set(&v)
}
// SetSecretAccessKeyNil sets the value for SecretAccessKey to be an explicit nil
func (o *KeyInfo) SetSecretAccessKeyNil() {
o.SecretAccessKey.Set(nil)
}
// UnsetSecretAccessKey ensures that no value is present for SecretAccessKey, not even an explicit nil
func (o *KeyInfo) UnsetSecretAccessKey() {
o.SecretAccessKey.Unset()
} }
// GetPermissions returns the Permissions field value if set, zero value otherwise. // GetPermissions returns the Permissions field value if set, zero value otherwise.
@ -208,8 +218,8 @@ func (o KeyInfo) MarshalJSON() ([]byte, error) {
if o.AccessKeyId != nil { if o.AccessKeyId != nil {
toSerialize["accessKeyId"] = o.AccessKeyId toSerialize["accessKeyId"] = o.AccessKeyId
} }
if o.SecretAccessKey != nil { if o.SecretAccessKey.IsSet() {
toSerialize["secretAccessKey"] = o.SecretAccessKey toSerialize["secretAccessKey"] = o.SecretAccessKey.Get()
} }
if o.Permissions != nil { if o.Permissions != nil {
toSerialize["permissions"] = o.Permissions toSerialize["permissions"] = o.Permissions

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@ -16,15 +16,16 @@ import (
// LayoutVersion struct for LayoutVersion // LayoutVersion struct for LayoutVersion
type LayoutVersion struct { type LayoutVersion struct {
Version *int32 `json:"version,omitempty"` Version int32 `json:"version"`
} }
// NewLayoutVersion instantiates a new LayoutVersion object // NewLayoutVersion instantiates a new LayoutVersion object
// This constructor will assign default values to properties that have it defined, // This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments // and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed // will change when the set of required properties is changed
func NewLayoutVersion() *LayoutVersion { func NewLayoutVersion(version int32) *LayoutVersion {
this := LayoutVersion{} this := LayoutVersion{}
this.Version = version
return &this return &this
} }
@ -36,41 +37,33 @@ func NewLayoutVersionWithDefaults() *LayoutVersion {
return &this return &this
} }
// GetVersion returns the Version field value if set, zero value otherwise. // GetVersion returns the Version field value
func (o *LayoutVersion) GetVersion() int32 { func (o *LayoutVersion) GetVersion() int32 {
if o == nil || o.Version == nil { if o == nil {
var ret int32 var ret int32
return ret return ret
} }
return *o.Version
return o.Version
} }
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise // GetVersionOk returns a tuple with the Version field value
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *LayoutVersion) GetVersionOk() (*int32, bool) { func (o *LayoutVersion) GetVersionOk() (*int32, bool) {
if o == nil || o.Version == nil { if o == nil {
return nil, false return nil, false
} }
return o.Version, true return &o.Version, true
} }
// HasVersion returns a boolean if a field has been set. // SetVersion sets field value
func (o *LayoutVersion) HasVersion() bool {
if o != nil && o.Version != nil {
return true
}
return false
}
// SetVersion gets a reference to the given int32 and assigns it to the Version field.
func (o *LayoutVersion) SetVersion(v int32) { func (o *LayoutVersion) SetVersion(v int32) {
o.Version = &v o.Version = v
} }
func (o LayoutVersion) MarshalJSON() ([]byte, error) { func (o LayoutVersion) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{} toSerialize := map[string]interface{}{}
if o.Version != nil { if true {
toSerialize["version"] = o.Version toSerialize["version"] = o.Version
} }
return json.Marshal(toSerialize) return json.Marshal(toSerialize)

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@ -17,7 +17,7 @@ import (
// NodeClusterInfo struct for NodeClusterInfo // NodeClusterInfo struct for NodeClusterInfo
type NodeClusterInfo struct { type NodeClusterInfo struct {
Zone string `json:"zone"` Zone string `json:"zone"`
Capacity NullableInt32 `json:"capacity"` Capacity NullableInt64 `json:"capacity,omitempty"`
// User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage // User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage
Tags []string `json:"tags"` Tags []string `json:"tags"`
} }
@ -26,10 +26,9 @@ type NodeClusterInfo struct {
// This constructor will assign default values to properties that have it defined, // This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments // and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed // will change when the set of required properties is changed
func NewNodeClusterInfo(zone string, capacity NullableInt32, tags []string) *NodeClusterInfo { func NewNodeClusterInfo(zone string, tags []string) *NodeClusterInfo {
this := NodeClusterInfo{} this := NodeClusterInfo{}
this.Zone = zone this.Zone = zone
this.Capacity = capacity
this.Tags = tags this.Tags = tags
return &this return &this
} }
@ -66,31 +65,47 @@ func (o *NodeClusterInfo) SetZone(v string) {
o.Zone = v o.Zone = v
} }
// GetCapacity returns the Capacity field value // GetCapacity returns the Capacity field value if set, zero value otherwise (both if not set or set to explicit null).
// If the value is explicit nil, the zero value for int32 will be returned func (o *NodeClusterInfo) GetCapacity() int64 {
func (o *NodeClusterInfo) GetCapacity() int32 {
if o == nil || o.Capacity.Get() == nil { if o == nil || o.Capacity.Get() == nil {
var ret int32 var ret int64
return ret return ret
} }
return *o.Capacity.Get() return *o.Capacity.Get()
} }
// GetCapacityOk returns a tuple with the Capacity field value // GetCapacityOk returns a tuple with the Capacity field value if set, nil otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned // NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NodeClusterInfo) GetCapacityOk() (*int32, bool) { func (o *NodeClusterInfo) GetCapacityOk() (*int64, bool) {
if o == nil { if o == nil {
return nil, false return nil, false
} }
return o.Capacity.Get(), o.Capacity.IsSet() return o.Capacity.Get(), o.Capacity.IsSet()
} }
// SetCapacity sets field value // HasCapacity returns a boolean if a field has been set.
func (o *NodeClusterInfo) SetCapacity(v int32) { func (o *NodeClusterInfo) HasCapacity() bool {
if o != nil && o.Capacity.IsSet() {
return true
}
return false
}
// SetCapacity gets a reference to the given NullableInt64 and assigns it to the Capacity field.
func (o *NodeClusterInfo) SetCapacity(v int64) {
o.Capacity.Set(&v) o.Capacity.Set(&v)
} }
// SetCapacityNil sets the value for Capacity to be an explicit nil
func (o *NodeClusterInfo) SetCapacityNil() {
o.Capacity.Set(nil)
}
// UnsetCapacity ensures that no value is present for Capacity, not even an explicit nil
func (o *NodeClusterInfo) UnsetCapacity() {
o.Capacity.Unset()
}
// GetTags returns the Tags field value // GetTags returns the Tags field value
func (o *NodeClusterInfo) GetTags() []string { func (o *NodeClusterInfo) GetTags() []string {
@ -121,7 +136,7 @@ func (o NodeClusterInfo) MarshalJSON() ([]byte, error) {
if true { if true {
toSerialize["zone"] = o.Zone toSerialize["zone"] = o.Zone
} }
if true { if o.Capacity.IsSet() {
toSerialize["capacity"] = o.Capacity.Get() toSerialize["capacity"] = o.Capacity.Get()
} }
if true { if true {

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@ -16,9 +16,10 @@ import (
// NodeNetworkInfo struct for NodeNetworkInfo // NodeNetworkInfo struct for NodeNetworkInfo
type NodeNetworkInfo struct { type NodeNetworkInfo struct {
Id *string `json:"id,omitempty"`
Addr string `json:"addr"` Addr string `json:"addr"`
IsUp bool `json:"is_up"` IsUp bool `json:"isUp"`
LastSeenSecsAgo NullableInt32 `json:"last_seen_secs_ago"` LastSeenSecsAgo NullableInt32 `json:"lastSeenSecsAgo"`
Hostname string `json:"hostname"` Hostname string `json:"hostname"`
} }
@ -43,6 +44,38 @@ func NewNodeNetworkInfoWithDefaults() *NodeNetworkInfo {
return &this return &this
} }
// GetId returns the Id field value if set, zero value otherwise.
func (o *NodeNetworkInfo) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NodeNetworkInfo) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *NodeNetworkInfo) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *NodeNetworkInfo) SetId(v string) {
o.Id = &v
}
// GetAddr returns the Addr field value // GetAddr returns the Addr field value
func (o *NodeNetworkInfo) GetAddr() string { func (o *NodeNetworkInfo) GetAddr() string {
if o == nil { if o == nil {
@ -143,14 +176,17 @@ func (o *NodeNetworkInfo) SetHostname(v string) {
func (o NodeNetworkInfo) MarshalJSON() ([]byte, error) { func (o NodeNetworkInfo) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{} toSerialize := map[string]interface{}{}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if true { if true {
toSerialize["addr"] = o.Addr toSerialize["addr"] = o.Addr
} }
if true { if true {
toSerialize["is_up"] = o.IsUp toSerialize["isUp"] = o.IsUp
} }
if true { if true {
toSerialize["last_seen_secs_ago"] = o.LastSeenSecsAgo.Get() toSerialize["lastSeenSecsAgo"] = o.LastSeenSecsAgo.Get()
} }
if true { if true {
toSerialize["hostname"] = o.Hostname toSerialize["hostname"] = o.Hostname

148
model_node_role_change.go Normal file
View file

@ -0,0 +1,148 @@
/*
Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.9.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package garage
import (
"encoding/json"
"fmt"
)
// NodeRoleChange - struct for NodeRoleChange
type NodeRoleChange struct {
NodeRoleRemove *NodeRoleRemove
NodeRoleUpdate *NodeRoleUpdate
}
// NodeRoleRemoveAsNodeRoleChange is a convenience function that returns NodeRoleRemove wrapped in NodeRoleChange
func NodeRoleRemoveAsNodeRoleChange(v *NodeRoleRemove) NodeRoleChange {
return NodeRoleChange{
NodeRoleRemove: v,
}
}
// NodeRoleUpdateAsNodeRoleChange is a convenience function that returns NodeRoleUpdate wrapped in NodeRoleChange
func NodeRoleUpdateAsNodeRoleChange(v *NodeRoleUpdate) NodeRoleChange {
return NodeRoleChange{
NodeRoleUpdate: v,
}
}
// Unmarshal JSON data into one of the pointers in the struct
func (dst *NodeRoleChange) UnmarshalJSON(data []byte) error {
var err error
match := 0
// try to unmarshal data into NodeRoleRemove
err = newStrictDecoder(data).Decode(&dst.NodeRoleRemove)
if err == nil {
jsonNodeRoleRemove, _ := json.Marshal(dst.NodeRoleRemove)
if string(jsonNodeRoleRemove) == "{}" { // empty struct
dst.NodeRoleRemove = nil
} else {
match++
}
} else {
dst.NodeRoleRemove = nil
}
// try to unmarshal data into NodeRoleUpdate
err = newStrictDecoder(data).Decode(&dst.NodeRoleUpdate)
if err == nil {
jsonNodeRoleUpdate, _ := json.Marshal(dst.NodeRoleUpdate)
if string(jsonNodeRoleUpdate) == "{}" { // empty struct
dst.NodeRoleUpdate = nil
} else {
match++
}
} else {
dst.NodeRoleUpdate = nil
}
if match > 1 { // more than 1 match
// reset to nil
dst.NodeRoleRemove = nil
dst.NodeRoleUpdate = nil
return fmt.Errorf("Data matches more than one schema in oneOf(NodeRoleChange)")
} else if match == 1 {
return nil // exactly one match
} else { // no match
return fmt.Errorf("Data failed to match schemas in oneOf(NodeRoleChange)")
}
}
// Marshal data from the first non-nil pointers in the struct to JSON
func (src NodeRoleChange) MarshalJSON() ([]byte, error) {
if src.NodeRoleRemove != nil {
return json.Marshal(&src.NodeRoleRemove)
}
if src.NodeRoleUpdate != nil {
return json.Marshal(&src.NodeRoleUpdate)
}
return nil, nil // no data in oneOf schemas
}
// Get the actual instance
func (obj *NodeRoleChange) GetActualInstance() (interface{}) {
if obj == nil {
return nil
}
if obj.NodeRoleRemove != nil {
return obj.NodeRoleRemove
}
if obj.NodeRoleUpdate != nil {
return obj.NodeRoleUpdate
}
// all schemas are nil
return nil
}
type NullableNodeRoleChange struct {
value *NodeRoleChange
isSet bool
}
func (v NullableNodeRoleChange) Get() *NodeRoleChange {
return v.value
}
func (v *NullableNodeRoleChange) Set(val *NodeRoleChange) {
v.value = val
v.isSet = true
}
func (v NullableNodeRoleChange) IsSet() bool {
return v.isSet
}
func (v *NullableNodeRoleChange) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNodeRoleChange(val *NodeRoleChange) *NullableNodeRoleChange {
return &NullableNodeRoleChange{value: val, isSet: true}
}
func (v NullableNodeRoleChange) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNodeRoleChange) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

137
model_node_role_remove.go Normal file
View file

@ -0,0 +1,137 @@
/*
Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.9.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package garage
import (
"encoding/json"
)
// NodeRoleRemove struct for NodeRoleRemove
type NodeRoleRemove struct {
Id string `json:"id"`
Remove bool `json:"remove"`
}
// NewNodeRoleRemove instantiates a new NodeRoleRemove object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewNodeRoleRemove(id string, remove bool) *NodeRoleRemove {
this := NodeRoleRemove{}
this.Id = id
this.Remove = remove
return &this
}
// NewNodeRoleRemoveWithDefaults instantiates a new NodeRoleRemove object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewNodeRoleRemoveWithDefaults() *NodeRoleRemove {
this := NodeRoleRemove{}
return &this
}
// GetId returns the Id field value
func (o *NodeRoleRemove) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *NodeRoleRemove) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *NodeRoleRemove) SetId(v string) {
o.Id = v
}
// GetRemove returns the Remove field value
func (o *NodeRoleRemove) GetRemove() bool {
if o == nil {
var ret bool
return ret
}
return o.Remove
}
// GetRemoveOk returns a tuple with the Remove field value
// and a boolean to check if the value has been set.
func (o *NodeRoleRemove) GetRemoveOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Remove, true
}
// SetRemove sets field value
func (o *NodeRoleRemove) SetRemove(v bool) {
o.Remove = v
}
func (o NodeRoleRemove) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["id"] = o.Id
}
if true {
toSerialize["remove"] = o.Remove
}
return json.Marshal(toSerialize)
}
type NullableNodeRoleRemove struct {
value *NodeRoleRemove
isSet bool
}
func (v NullableNodeRoleRemove) Get() *NodeRoleRemove {
return v.value
}
func (v *NullableNodeRoleRemove) Set(val *NodeRoleRemove) {
v.value = val
v.isSet = true
}
func (v NullableNodeRoleRemove) IsSet() bool {
return v.isSet
}
func (v *NullableNodeRoleRemove) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNodeRoleRemove(val *NodeRoleRemove) *NullableNodeRoleRemove {
return &NullableNodeRoleRemove{value: val, isSet: true}
}
func (v NullableNodeRoleRemove) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNodeRoleRemove) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

197
model_node_role_update.go Normal file
View file

@ -0,0 +1,197 @@
/*
Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.9.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package garage
import (
"encoding/json"
)
// NodeRoleUpdate struct for NodeRoleUpdate
type NodeRoleUpdate struct {
Id string `json:"id"`
Zone string `json:"zone"`
Capacity NullableInt64 `json:"capacity"`
Tags []string `json:"tags"`
}
// NewNodeRoleUpdate instantiates a new NodeRoleUpdate object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewNodeRoleUpdate(id string, zone string, capacity NullableInt64, tags []string) *NodeRoleUpdate {
this := NodeRoleUpdate{}
this.Id = id
this.Zone = zone
this.Capacity = capacity
this.Tags = tags
return &this
}
// NewNodeRoleUpdateWithDefaults instantiates a new NodeRoleUpdate object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewNodeRoleUpdateWithDefaults() *NodeRoleUpdate {
this := NodeRoleUpdate{}
return &this
}
// GetId returns the Id field value
func (o *NodeRoleUpdate) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *NodeRoleUpdate) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *NodeRoleUpdate) SetId(v string) {
o.Id = v
}
// GetZone returns the Zone field value
func (o *NodeRoleUpdate) GetZone() string {
if o == nil {
var ret string
return ret
}
return o.Zone
}
// GetZoneOk returns a tuple with the Zone field value
// and a boolean to check if the value has been set.
func (o *NodeRoleUpdate) GetZoneOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Zone, true
}
// SetZone sets field value
func (o *NodeRoleUpdate) SetZone(v string) {
o.Zone = v
}
// GetCapacity returns the Capacity field value
// If the value is explicit nil, the zero value for int64 will be returned
func (o *NodeRoleUpdate) GetCapacity() int64 {
if o == nil || o.Capacity.Get() == nil {
var ret int64
return ret
}
return *o.Capacity.Get()
}
// GetCapacityOk returns a tuple with the Capacity field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NodeRoleUpdate) GetCapacityOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.Capacity.Get(), o.Capacity.IsSet()
}
// SetCapacity sets field value
func (o *NodeRoleUpdate) SetCapacity(v int64) {
o.Capacity.Set(&v)
}
// GetTags returns the Tags field value
func (o *NodeRoleUpdate) GetTags() []string {
if o == nil {
var ret []string
return ret
}
return o.Tags
}
// GetTagsOk returns a tuple with the Tags field value
// and a boolean to check if the value has been set.
func (o *NodeRoleUpdate) GetTagsOk() ([]string, bool) {
if o == nil {
return nil, false
}
return o.Tags, true
}
// SetTags sets field value
func (o *NodeRoleUpdate) SetTags(v []string) {
o.Tags = v
}
func (o NodeRoleUpdate) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["id"] = o.Id
}
if true {
toSerialize["zone"] = o.Zone
}
if true {
toSerialize["capacity"] = o.Capacity.Get()
}
if true {
toSerialize["tags"] = o.Tags
}
return json.Marshal(toSerialize)
}
type NullableNodeRoleUpdate struct {
value *NodeRoleUpdate
isSet bool
}
func (v NullableNodeRoleUpdate) Get() *NodeRoleUpdate {
return v.value
}
func (v *NullableNodeRoleUpdate) Set(val *NodeRoleUpdate) {
v.value = val
v.isSet = true
}
func (v NullableNodeRoleUpdate) IsSet() bool {
return v.isSet
}
func (v *NullableNodeRoleUpdate) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNodeRoleUpdate(val *NodeRoleUpdate) *NullableNodeRoleUpdate {
return &NullableNodeRoleUpdate{value: val, isSet: true}
}
func (v NullableNodeRoleUpdate) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNodeRoleUpdate) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

View file

@ -1,9 +1,9 @@
/* /*
Garage Administration API v0+garage-v0.8.0 Garage Administration API v0+garage-v0.9.0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
API version: v0.8.0 API version: v0.9.0
*/ */
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.