Add javascript client

This commit is contained in:
Quentin 2022-11-12 23:48:21 +01:00
parent aef4d8f158
commit 2b7c845342
Signed by: quentin
GPG key ID: E9602264D639FF68
115 changed files with 9824 additions and 0 deletions

View file

@ -27,3 +27,13 @@ task buildGoClient(type: org.openapitools.generator.gradle.plugin.tasks.Generate
packageVersion: "0.8.0",
]
}
task buildJavascriptClient(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask) {
generatorName = "javascript"
inputSpec = "./garage/doc/api/garage-admin-v0.yml"
outputDir = "$rootDir/javascript"
configOptions = [
packageName: "garage",
packageVersion: "0.8.0",
]
}

33
javascript/.babelrc Normal file
View file

@ -0,0 +1,33 @@
{
"presets": [
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-optional-chaining",
[
"@babel/plugin-proposal-pipeline-operator",
{
"proposal": "minimal"
}
],
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions",
"@babel/plugin-proposal-function-bind"
]
}

130
javascript/.gitignore vendored Normal file
View file

@ -0,0 +1,130 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# vuepress v2.x temp and cache directory
.temp
.cache
# Docusaurus cache and generated files
.docusaurus
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

View file

@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

View file

@ -0,0 +1,112 @@
.babelrc
.gitignore
.openapi-generator-ignore
.travis.yml
README.md
docs/AddKeyRequest.md
docs/AddNode200ResponseInner.md
docs/AllowBucketKeyRequest.md
docs/AllowBucketKeyRequestPermissions.md
docs/BucketApi.md
docs/BucketInfo.md
docs/BucketInfoQuotas.md
docs/BucketInfoWebsiteConfig.md
docs/BucketKeyInfo.md
docs/ClusterLayout.md
docs/CreateBucketRequest.md
docs/CreateBucketRequestLocalAlias.md
docs/CreateBucketRequestLocalAliasAllow.md
docs/GetNodes200Response.md
docs/ImportKeyRequest.md
docs/KeyApi.md
docs/KeyInfo.md
docs/KeyInfoBucketsInner.md
docs/KeyInfoBucketsInnerPermissions.md
docs/KeyInfoPermissions.md
docs/LayoutApi.md
docs/LayoutVersion.md
docs/ListBuckets200ResponseInner.md
docs/ListBuckets200ResponseInnerLocalAliasesInner.md
docs/ListKeys200ResponseInner.md
docs/NodeClusterInfo.md
docs/NodeNetworkInfo.md
docs/NodesApi.md
docs/UpdateBucketRequest.md
docs/UpdateBucketRequestQuotas.md
docs/UpdateBucketRequestWebsiteAccess.md
docs/UpdateKeyRequest.md
docs/UpdateKeyRequestAllow.md
docs/UpdateKeyRequestDeny.md
git_push.sh
mocha.opts
package.json
src/ApiClient.js
src/api/BucketApi.js
src/api/KeyApi.js
src/api/LayoutApi.js
src/api/NodesApi.js
src/index.js
src/model/AddKeyRequest.js
src/model/AddNode200ResponseInner.js
src/model/AllowBucketKeyRequest.js
src/model/AllowBucketKeyRequestPermissions.js
src/model/BucketInfo.js
src/model/BucketInfoQuotas.js
src/model/BucketInfoWebsiteConfig.js
src/model/BucketKeyInfo.js
src/model/ClusterLayout.js
src/model/CreateBucketRequest.js
src/model/CreateBucketRequestLocalAlias.js
src/model/CreateBucketRequestLocalAliasAllow.js
src/model/GetNodes200Response.js
src/model/ImportKeyRequest.js
src/model/KeyInfo.js
src/model/KeyInfoBucketsInner.js
src/model/KeyInfoBucketsInnerPermissions.js
src/model/KeyInfoPermissions.js
src/model/LayoutVersion.js
src/model/ListBuckets200ResponseInner.js
src/model/ListBuckets200ResponseInnerLocalAliasesInner.js
src/model/ListKeys200ResponseInner.js
src/model/NodeClusterInfo.js
src/model/NodeNetworkInfo.js
src/model/UpdateBucketRequest.js
src/model/UpdateBucketRequestQuotas.js
src/model/UpdateBucketRequestWebsiteAccess.js
src/model/UpdateKeyRequest.js
src/model/UpdateKeyRequestAllow.js
src/model/UpdateKeyRequestDeny.js
test/api/BucketApi.spec.js
test/api/KeyApi.spec.js
test/api/LayoutApi.spec.js
test/api/NodesApi.spec.js
test/model/AddKeyRequest.spec.js
test/model/AddNode200ResponseInner.spec.js
test/model/AllowBucketKeyRequest.spec.js
test/model/AllowBucketKeyRequestPermissions.spec.js
test/model/BucketInfo.spec.js
test/model/BucketInfoQuotas.spec.js
test/model/BucketInfoWebsiteConfig.spec.js
test/model/BucketKeyInfo.spec.js
test/model/ClusterLayout.spec.js
test/model/CreateBucketRequest.spec.js
test/model/CreateBucketRequestLocalAlias.spec.js
test/model/CreateBucketRequestLocalAliasAllow.spec.js
test/model/GetNodes200Response.spec.js
test/model/ImportKeyRequest.spec.js
test/model/KeyInfo.spec.js
test/model/KeyInfoBucketsInner.spec.js
test/model/KeyInfoBucketsInnerPermissions.spec.js
test/model/KeyInfoPermissions.spec.js
test/model/LayoutVersion.spec.js
test/model/ListBuckets200ResponseInner.spec.js
test/model/ListBuckets200ResponseInnerLocalAliasesInner.spec.js
test/model/ListKeys200ResponseInner.spec.js
test/model/NodeClusterInfo.spec.js
test/model/NodeNetworkInfo.spec.js
test/model/UpdateBucketRequest.spec.js
test/model/UpdateBucketRequestQuotas.spec.js
test/model/UpdateBucketRequestWebsiteAccess.spec.js
test/model/UpdateKeyRequest.spec.js
test/model/UpdateKeyRequestAllow.spec.js
test/model/UpdateKeyRequestDeny.spec.js

View file

@ -0,0 +1 @@
6.1.0

5
javascript/.travis.yml Normal file
View file

@ -0,0 +1,5 @@
language: node_js
cache: npm
node_js:
- "6"
- "6.1"

198
javascript/README.md Normal file
View file

@ -0,0 +1,198 @@
# garage_administration_api_v0garage_v0_8_0
GarageAdministrationApiV0garageV080 - JavaScript client for garage_administration_api_v0garage_v0_8_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!*
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: v0.8.0
- Package version: v0.8.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
## Installation
### For [Node.js](https://nodejs.org/)
#### npm
To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).
Then install it via:
```shell
npm install garage_administration_api_v0garage_v0_8_0 --save
```
Finally, you need to build the module:
```shell
npm run build
```
##### Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:
```shell
npm install
```
Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:
```shell
npm link
```
To use the link you just defined in your project, switch to the directory you want to use your garage_administration_api_v0garage_v0_8_0 from, and run:
```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```
Finally, you need to build the module:
```shell
npm run build
```
#### git
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via:
```shell
npm install GIT_USER_ID/GIT_REPO_ID --save
```
### For browser
The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
the above steps with Node.js and installing browserify with `npm install -g browserify`,
perform the following (assuming *main.js* is your entry file):
```shell
browserify main.js > bundle.js
```
Then include *bundle.js* in the HTML pages.
### Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error:
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
the following section to your webpack config:
```javascript
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
```
## Getting Started
Please follow the [installation](#installation) instruction and execute the following JS code:
```javascript
var GarageAdministrationApiV0garageV080 = require('garage_administration_api_v0garage_v0_8_0');
var defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
var api = new GarageAdministrationApiV0garageV080.BucketApi()
var allowBucketKeyRequest = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequest(); // {AllowBucketKeyRequest} Aliases to put on the new bucket
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.allowBucketKey(allowBucketKeyRequest, callback);
```
## Documentation for API Endpoints
All URIs are relative to *http://localhost:3903/v0*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*GarageAdministrationApiV0garageV080.BucketApi* | [**allowBucketKey**](docs/BucketApi.md#allowBucketKey) | **POST** /bucket/allow | Allow key
*GarageAdministrationApiV0garageV080.BucketApi* | [**createBucket**](docs/BucketApi.md#createBucket) | **POST** /bucket | Create a bucket
*GarageAdministrationApiV0garageV080.BucketApi* | [**deleteBucket**](docs/BucketApi.md#deleteBucket) | **DELETE** /bucket?id&#x3D;{bucket_id} | Delete a bucket
*GarageAdministrationApiV0garageV080.BucketApi* | [**deleteBucketGlobalAlias**](docs/BucketApi.md#deleteBucketGlobalAlias) | **DELETE** /bucket/alias/global | Delete a global alias
*GarageAdministrationApiV0garageV080.BucketApi* | [**deleteBucketLocalAlias**](docs/BucketApi.md#deleteBucketLocalAlias) | **DELETE** /bucket/alias/local | Delete a local alias
*GarageAdministrationApiV0garageV080.BucketApi* | [**denyBucketKey**](docs/BucketApi.md#denyBucketKey) | **POST** /bucket/deny | Deny key
*GarageAdministrationApiV0garageV080.BucketApi* | [**findBucketInfo**](docs/BucketApi.md#findBucketInfo) | **GET** /bucket?globalAlias&#x3D;{alias} | Find a bucket
*GarageAdministrationApiV0garageV080.BucketApi* | [**getBucketInfo**](docs/BucketApi.md#getBucketInfo) | **GET** /bucket?id&#x3D;{bucket_id} | Get a bucket
*GarageAdministrationApiV0garageV080.BucketApi* | [**listBuckets**](docs/BucketApi.md#listBuckets) | **GET** /bucket | List all buckets
*GarageAdministrationApiV0garageV080.BucketApi* | [**putBucketGlobalAlias**](docs/BucketApi.md#putBucketGlobalAlias) | **PUT** /bucket/alias/global | Add a global alias
*GarageAdministrationApiV0garageV080.BucketApi* | [**putBucketLocalAlias**](docs/BucketApi.md#putBucketLocalAlias) | **PUT** /bucket/alias/local | Add a local alias
*GarageAdministrationApiV0garageV080.BucketApi* | [**updateBucket**](docs/BucketApi.md#updateBucket) | **PUT** /bucket?id&#x3D;{bucket_id} | Update a bucket
*GarageAdministrationApiV0garageV080.KeyApi* | [**addKey**](docs/KeyApi.md#addKey) | **POST** /key | Create a new API key
*GarageAdministrationApiV0garageV080.KeyApi* | [**deleteKey**](docs/KeyApi.md#deleteKey) | **DELETE** /key?id&#x3D;{access_key} | Delete a key
*GarageAdministrationApiV0garageV080.KeyApi* | [**getKey**](docs/KeyApi.md#getKey) | **GET** /key?id&#x3D;{access_key} | Get key information
*GarageAdministrationApiV0garageV080.KeyApi* | [**importKey**](docs/KeyApi.md#importKey) | **POST** /key/import | Import an existing key
*GarageAdministrationApiV0garageV080.KeyApi* | [**listKeys**](docs/KeyApi.md#listKeys) | **GET** /key | List all keys
*GarageAdministrationApiV0garageV080.KeyApi* | [**searchKey**](docs/KeyApi.md#searchKey) | **GET** /key?search&#x3D;{pattern} | Select key by pattern
*GarageAdministrationApiV0garageV080.KeyApi* | [**updateKey**](docs/KeyApi.md#updateKey) | **POST** /key?id&#x3D;{access_key} | Update a key
*GarageAdministrationApiV0garageV080.LayoutApi* | [**addLayout**](docs/LayoutApi.md#addLayout) | **POST** /layout | Send modifications to the cluster layout
*GarageAdministrationApiV0garageV080.LayoutApi* | [**applyLayout**](docs/LayoutApi.md#applyLayout) | **POST** /layout/apply | Apply staged layout
*GarageAdministrationApiV0garageV080.LayoutApi* | [**getLayout**](docs/LayoutApi.md#getLayout) | **GET** /layout | Details on the current and staged layout
*GarageAdministrationApiV0garageV080.LayoutApi* | [**revertLayout**](docs/LayoutApi.md#revertLayout) | **POST** /layout/revert | Clear staged layout
*GarageAdministrationApiV0garageV080.NodesApi* | [**addNode**](docs/NodesApi.md#addNode) | **POST** /connect | Connect target node to other Garage nodes
*GarageAdministrationApiV0garageV080.NodesApi* | [**getNodes**](docs/NodesApi.md#getNodes) | **GET** /status | Status of this node and other nodes in the cluster
## Documentation for Models
- [GarageAdministrationApiV0garageV080.AddKeyRequest](docs/AddKeyRequest.md)
- [GarageAdministrationApiV0garageV080.AddNode200ResponseInner](docs/AddNode200ResponseInner.md)
- [GarageAdministrationApiV0garageV080.AllowBucketKeyRequest](docs/AllowBucketKeyRequest.md)
- [GarageAdministrationApiV0garageV080.AllowBucketKeyRequestPermissions](docs/AllowBucketKeyRequestPermissions.md)
- [GarageAdministrationApiV0garageV080.BucketInfo](docs/BucketInfo.md)
- [GarageAdministrationApiV0garageV080.BucketInfoQuotas](docs/BucketInfoQuotas.md)
- [GarageAdministrationApiV0garageV080.BucketInfoWebsiteConfig](docs/BucketInfoWebsiteConfig.md)
- [GarageAdministrationApiV0garageV080.BucketKeyInfo](docs/BucketKeyInfo.md)
- [GarageAdministrationApiV0garageV080.ClusterLayout](docs/ClusterLayout.md)
- [GarageAdministrationApiV0garageV080.CreateBucketRequest](docs/CreateBucketRequest.md)
- [GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAlias](docs/CreateBucketRequestLocalAlias.md)
- [GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAliasAllow](docs/CreateBucketRequestLocalAliasAllow.md)
- [GarageAdministrationApiV0garageV080.GetNodes200Response](docs/GetNodes200Response.md)
- [GarageAdministrationApiV0garageV080.ImportKeyRequest](docs/ImportKeyRequest.md)
- [GarageAdministrationApiV0garageV080.KeyInfo](docs/KeyInfo.md)
- [GarageAdministrationApiV0garageV080.KeyInfoBucketsInner](docs/KeyInfoBucketsInner.md)
- [GarageAdministrationApiV0garageV080.KeyInfoBucketsInnerPermissions](docs/KeyInfoBucketsInnerPermissions.md)
- [GarageAdministrationApiV0garageV080.KeyInfoPermissions](docs/KeyInfoPermissions.md)
- [GarageAdministrationApiV0garageV080.LayoutVersion](docs/LayoutVersion.md)
- [GarageAdministrationApiV0garageV080.ListBuckets200ResponseInner](docs/ListBuckets200ResponseInner.md)
- [GarageAdministrationApiV0garageV080.ListBuckets200ResponseInnerLocalAliasesInner](docs/ListBuckets200ResponseInnerLocalAliasesInner.md)
- [GarageAdministrationApiV0garageV080.ListKeys200ResponseInner](docs/ListKeys200ResponseInner.md)
- [GarageAdministrationApiV0garageV080.NodeClusterInfo](docs/NodeClusterInfo.md)
- [GarageAdministrationApiV0garageV080.NodeNetworkInfo](docs/NodeNetworkInfo.md)
- [GarageAdministrationApiV0garageV080.UpdateBucketRequest](docs/UpdateBucketRequest.md)
- [GarageAdministrationApiV0garageV080.UpdateBucketRequestQuotas](docs/UpdateBucketRequestQuotas.md)
- [GarageAdministrationApiV0garageV080.UpdateBucketRequestWebsiteAccess](docs/UpdateBucketRequestWebsiteAccess.md)
- [GarageAdministrationApiV0garageV080.UpdateKeyRequest](docs/UpdateKeyRequest.md)
- [GarageAdministrationApiV0garageV080.UpdateKeyRequestAllow](docs/UpdateKeyRequestAllow.md)
- [GarageAdministrationApiV0garageV080.UpdateKeyRequestDeny](docs/UpdateKeyRequestDeny.md)
## Documentation for Authorization
### bearerAuth
- **Type**: Bearer authentication

View file

@ -0,0 +1,9 @@
# GarageAdministrationApiV0garageV080.AddKeyRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]

View file

@ -0,0 +1,10 @@
# GarageAdministrationApiV0garageV080.AddNode200ResponseInner
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**success** | **Boolean** | | [optional]
**error** | **String** | | [optional]

View file

@ -0,0 +1,11 @@
# GarageAdministrationApiV0garageV080.AllowBucketKeyRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bucketId** | **String** | |
**accessKeyId** | **String** | |
**permissions** | [**AllowBucketKeyRequestPermissions**](AllowBucketKeyRequestPermissions.md) | |

View file

@ -0,0 +1,11 @@
# GarageAdministrationApiV0garageV080.AllowBucketKeyRequestPermissions
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**read** | **Boolean** | |
**write** | **Boolean** | |
**owner** | **Boolean** | |

View file

@ -0,0 +1,618 @@
# GarageAdministrationApiV0garageV080.BucketApi
All URIs are relative to *http://localhost:3903/v0*
Method | HTTP request | Description
------------- | ------------- | -------------
[**allowBucketKey**](BucketApi.md#allowBucketKey) | **POST** /bucket/allow | Allow key
[**createBucket**](BucketApi.md#createBucket) | **POST** /bucket | Create a bucket
[**deleteBucket**](BucketApi.md#deleteBucket) | **DELETE** /bucket?id&#x3D;{bucket_id} | Delete a bucket
[**deleteBucketGlobalAlias**](BucketApi.md#deleteBucketGlobalAlias) | **DELETE** /bucket/alias/global | Delete a global alias
[**deleteBucketLocalAlias**](BucketApi.md#deleteBucketLocalAlias) | **DELETE** /bucket/alias/local | Delete a local alias
[**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?id&#x3D;{bucket_id} | Get a bucket
[**listBuckets**](BucketApi.md#listBuckets) | **GET** /bucket | List all buckets
[**putBucketGlobalAlias**](BucketApi.md#putBucketGlobalAlias) | **PUT** /bucket/alias/global | Add a global 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
## allowBucketKey
> BucketInfo allowBucketKey(allowBucketKeyRequest)
Allow key
⚠️ **DISCLAIMER**: Garage&#39;s developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Allows a key to do read/write/owner operations on a bucket. Flags in permissions which have the value true will be activated. Other flags will remain unchanged (ie. they will keep their internal value). For example, if you set read to true, the key will be allowed to read the bucket. If you set it to false, the key will keeps its previous read permission. If you want to disallow read for the key, check the DenyBucketKey operation.
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.BucketApi();
let allowBucketKeyRequest = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequest(); // AllowBucketKeyRequest | Aliases to put on the new bucket
apiInstance.allowBucketKey(allowBucketKeyRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**allowBucketKeyRequest** | [**AllowBucketKeyRequest**](AllowBucketKeyRequest.md)| Aliases to put on the new bucket |
### Return type
[**BucketInfo**](BucketInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## createBucket
> BucketInfo createBucket(createBucketRequest)
Create a bucket
Creates a new bucket, either with a global alias, a local one, or no alias at all. Technically, you can also specify both &#x60;globalAlias&#x60; and &#x60;localAlias&#x60; and that would create two aliases.
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.BucketApi();
let createBucketRequest = new GarageAdministrationApiV0garageV080.CreateBucketRequest(); // CreateBucketRequest | Aliases to put on the new bucket
apiInstance.createBucket(createBucketRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**createBucketRequest** | [**CreateBucketRequest**](CreateBucketRequest.md)| Aliases to put on the new bucket |
### Return type
[**BucketInfo**](BucketInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## deleteBucket
> deleteBucket(bucketId)
Delete a bucket
Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is not empty. **Warning:** this will delete all aliases associated with the bucket!
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.BucketApi();
let bucketId = b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87; // String | The exact bucket identifier, a 32 bytes hexadecimal string
apiInstance.deleteBucket(bucketId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bucketId** | **String**| The exact bucket identifier, a 32 bytes hexadecimal string |
### Return type
null (empty response body)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
## deleteBucketGlobalAlias
> BucketInfo deleteBucketGlobalAlias(id, alias)
Delete a global alias
Delete a global alias from the target bucket
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.BucketApi();
let id = e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b; // String |
let alias = my_documents; // String |
apiInstance.deleteBucketGlobalAlias(id, alias, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| |
**alias** | **String**| |
### Return type
[**BucketInfo**](BucketInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## deleteBucketLocalAlias
> BucketInfo deleteBucketLocalAlias(id, accessKeyId, alias)
Delete a local alias
Delete a local alias, bound to specified account, from the target bucket
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.BucketApi();
let id = e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b; // String |
let accessKeyId = GK31c2f218a2e44f485b94239e; // String |
let alias = my_documents; // String |
apiInstance.deleteBucketLocalAlias(id, accessKeyId, alias, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| |
**accessKeyId** | **String**| |
**alias** | **String**| |
### Return type
[**BucketInfo**](BucketInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## denyBucketKey
> BucketInfo denyBucketKey(allowBucketKeyRequest)
Deny key
⚠️ **DISCLAIMER**: Garage&#39;s developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Denies a key from doing read/write/owner operations on a bucket. Flags in permissions which have the value true will be deactivated. Other flags will remain unchanged. For example, if you set read to true, the key will be denied from reading. If you set read to false, the key will keep its previous permissions. If you want the key to have the reading permission, check the AllowBucketKey operation.
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.BucketApi();
let allowBucketKeyRequest = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequest(); // AllowBucketKeyRequest | Aliases to put on the new bucket
apiInstance.denyBucketKey(allowBucketKeyRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**allowBucketKeyRequest** | [**AllowBucketKeyRequest**](AllowBucketKeyRequest.md)| Aliases to put on the new bucket |
### Return type
[**BucketInfo**](BucketInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## findBucketInfo
> BucketInfo findBucketInfo(alias)
Find a bucket
Find a bucket by its global alias
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.BucketApi();
let alias = my_documents; // String | The exact global alias of one of the existing buckets
apiInstance.findBucketInfo(alias, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**alias** | **String**| The exact global alias of one of the existing buckets |
### Return type
[**BucketInfo**](BucketInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## getBucketInfo
> BucketInfo getBucketInfo(bucketId)
Get a bucket
Given a bucket identifier, get its information. 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, and its quotas (if any).
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.BucketApi();
let bucketId = b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87; // String | The exact bucket identifier, a 32 bytes hexadecimal string
apiInstance.getBucketInfo(bucketId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bucketId** | **String**| The exact bucket identifier, a 32 bytes hexadecimal string |
### Return type
[**BucketInfo**](BucketInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## listBuckets
> [ListBuckets200ResponseInner] listBuckets()
List all buckets
List all the buckets on the cluster with their UUID and their global and local aliases.
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.BucketApi();
apiInstance.listBuckets((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**[ListBuckets200ResponseInner]**](ListBuckets200ResponseInner.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## putBucketGlobalAlias
> BucketInfo putBucketGlobalAlias(id, alias)
Add a global alias
Add a global alias to the target bucket
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.BucketApi();
let id = e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b; // String |
let alias = my_documents; // String |
apiInstance.putBucketGlobalAlias(id, alias, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| |
**alias** | **String**| |
### Return type
[**BucketInfo**](BucketInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## putBucketLocalAlias
> BucketInfo putBucketLocalAlias(id, accessKeyId, alias)
Add a local alias
Add a local alias, bound to specified account, to the target bucket
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.BucketApi();
let id = e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b; // String |
let accessKeyId = GK31c2f218a2e44f485b94239e; // String |
let alias = my_documents; // String |
apiInstance.putBucketLocalAlias(id, accessKeyId, alias, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| |
**accessKeyId** | **String**| |
**alias** | **String**| |
### Return type
[**BucketInfo**](BucketInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## updateBucket
> BucketInfo updateBucket(bucketId, updateBucketRequest)
Update a bucket
All fields (&#x60;websiteAccess&#x60; and &#x60;quotas&#x60;) are optionnal. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In &#x60;websiteAccess&#x60;: if &#x60;enabled&#x60; is &#x60;true&#x60;, &#x60;indexDocument&#x60; must be specified. The field &#x60;errorDocument&#x60; is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if &#x60;enabled&#x60; is &#x60;false&#x60;, neither &#x60;indexDocument&#x60; nor &#x60;errorDocument&#x60; must be specified. In &#x60;quotas&#x60;: new values of &#x60;maxSize&#x60; and &#x60;maxObjects&#x60; must both be specified, or set to &#x60;null&#x60; to remove the quotas. An absent value will be considered the same as a &#x60;null&#x60;. It is not possible to change only one of the two quotas.
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.BucketApi();
let bucketId = b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87; // String | The exact bucket identifier, a 32 bytes hexadecimal string
let updateBucketRequest = new GarageAdministrationApiV0garageV080.UpdateBucketRequest(); // UpdateBucketRequest | Requested changes on the bucket. Both root fields are optionals.
apiInstance.updateBucket(bucketId, updateBucketRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bucketId** | **String**| The exact bucket identifier, a 32 bytes hexadecimal string |
**updateBucketRequest** | [**UpdateBucketRequest**](UpdateBucketRequest.md)| Requested changes on the bucket. Both root fields are optionals. |
### Return type
[**BucketInfo**](BucketInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json

View file

@ -0,0 +1,17 @@
# GarageAdministrationApiV0garageV080.BucketInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**globalAliases** | **[String]** | | [optional]
**websiteAccess** | **Boolean** | | [optional]
**websiteConfig** | [**BucketInfoWebsiteConfig**](BucketInfoWebsiteConfig.md) | | [optional]
**keys** | [**[BucketKeyInfo]**](BucketKeyInfo.md) | | [optional]
**objects** | **Number** | | [optional]
**bytes** | **Number** | | [optional]
**unfinishedUploads** | **Number** | | [optional]
**quotas** | [**BucketInfoQuotas**](BucketInfoQuotas.md) | | [optional]

View file

@ -0,0 +1,10 @@
# GarageAdministrationApiV0garageV080.BucketInfoQuotas
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**maxSize** | **Number** | | [optional]
**maxObjects** | **Number** | | [optional]

View file

@ -0,0 +1,10 @@
# GarageAdministrationApiV0garageV080.BucketInfoWebsiteConfig
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**indexDocument** | **String** | | [optional]
**errorDocument** | **String** | | [optional]

View file

@ -0,0 +1,12 @@
# GarageAdministrationApiV0garageV080.BucketKeyInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**accessKeyId** | **String** | | [optional]
**name** | **String** | | [optional]
**permissions** | [**CreateBucketRequestLocalAliasAllow**](CreateBucketRequestLocalAliasAllow.md) | | [optional]
**bucketLocalAliases** | **[String]** | | [optional]

View file

@ -0,0 +1,11 @@
# GarageAdministrationApiV0garageV080.ClusterLayout
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**version** | **Number** | |
**roles** | [**{String: NodeClusterInfo}**](NodeClusterInfo.md) | |
**stagedRoleChanges** | [**{String: NodeClusterInfo}**](NodeClusterInfo.md) | |

View file

@ -0,0 +1,10 @@
# GarageAdministrationApiV0garageV080.CreateBucketRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**globalAlias** | **String** | | [optional]
**localAlias** | [**CreateBucketRequestLocalAlias**](CreateBucketRequestLocalAlias.md) | | [optional]

View file

@ -0,0 +1,11 @@
# GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAlias
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**accessKeyId** | **String** | | [optional]
**alias** | **String** | | [optional]
**allow** | [**CreateBucketRequestLocalAliasAllow**](CreateBucketRequestLocalAliasAllow.md) | | [optional]

View file

@ -0,0 +1,11 @@
# GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAliasAllow
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**read** | **Boolean** | | [optional]
**write** | **Boolean** | | [optional]
**owner** | **Boolean** | | [optional]

View file

@ -0,0 +1,12 @@
# GarageAdministrationApiV0garageV080.GetNodes200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**node** | **String** | |
**garageVersion** | **String** | |
**knownNodes** | [**{String: NodeNetworkInfo}**](NodeNetworkInfo.md) | |
**layout** | [**ClusterLayout**](ClusterLayout.md) | |

View file

@ -0,0 +1,11 @@
# GarageAdministrationApiV0garageV080.ImportKeyRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | |
**accessKeyId** | **String** | |
**secretAccessKey** | **String** | |

356
javascript/docs/KeyApi.md Normal file
View file

@ -0,0 +1,356 @@
# GarageAdministrationApiV0garageV080.KeyApi
All URIs are relative to *http://localhost:3903/v0*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addKey**](KeyApi.md#addKey) | **POST** /key | Create a new API key
[**deleteKey**](KeyApi.md#deleteKey) | **DELETE** /key?id&#x3D;{access_key} | Delete a key
[**getKey**](KeyApi.md#getKey) | **GET** /key?id&#x3D;{access_key} | Get key information
[**importKey**](KeyApi.md#importKey) | **POST** /key/import | Import an existing key
[**listKeys**](KeyApi.md#listKeys) | **GET** /key | List all keys
[**searchKey**](KeyApi.md#searchKey) | **GET** /key?search&#x3D;{pattern} | Select key by pattern
[**updateKey**](KeyApi.md#updateKey) | **POST** /key?id&#x3D;{access_key} | Update a key
## addKey
> KeyInfo addKey(addKeyRequest)
Create a new API key
Creates a new API access key.
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.KeyApi();
let addKeyRequest = new GarageAdministrationApiV0garageV080.AddKeyRequest(); // AddKeyRequest | \"You can set a friendly name for this key, send an empty string instead\"
apiInstance.addKey(addKeyRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**addKeyRequest** | [**AddKeyRequest**](AddKeyRequest.md)| \&quot;You can set a friendly name for this key, send an empty string instead\&quot; |
### Return type
[**KeyInfo**](KeyInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## deleteKey
> deleteKey(accessKey)
Delete a key
Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before.
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.KeyApi();
let accessKey = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage
apiInstance.deleteKey(accessKey, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**accessKey** | **String**| The exact API access key generated by Garage |
### Return type
null (empty response body)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
## getKey
> KeyInfo getKey(accessKey)
Get key information
Return information about a specific key and return its information
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.KeyApi();
let accessKey = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage
apiInstance.getKey(accessKey, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**accessKey** | **String**| The exact API access key generated by Garage |
### Return type
[**KeyInfo**](KeyInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## importKey
> KeyInfo importKey(importKeyRequest)
Import an existing key
Imports an existing API key. This feature must only be used for migrations and backup restore. **Do not use it to generate custom key identifiers or you will break your Garage cluster.**
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.KeyApi();
let importKeyRequest = new GarageAdministrationApiV0garageV080.ImportKeyRequest(); // ImportKeyRequest | Information on the key to import
apiInstance.importKey(importKeyRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**importKeyRequest** | [**ImportKeyRequest**](ImportKeyRequest.md)| Information on the key to import |
### Return type
[**KeyInfo**](KeyInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## listKeys
> [ListKeys200ResponseInner] listKeys()
List all keys
Returns all API access keys in the cluster.
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.KeyApi();
apiInstance.listKeys((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**[ListKeys200ResponseInner]**](ListKeys200ResponseInner.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## searchKey
> KeyInfo searchKey(pattern)
Select key by pattern
Find the first key matching the given pattern based on its identifier aor friendly name and return its information.
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.KeyApi();
let pattern = test-k; // String | A pattern (beginning or full string) corresponding to a key identifier or friendly name
apiInstance.searchKey(pattern, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pattern** | **String**| A pattern (beginning or full string) corresponding to a key identifier or friendly name |
### Return type
[**KeyInfo**](KeyInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## updateKey
> KeyInfo updateKey(accessKey, updateKeyRequest)
Update a key
Updates information about the specified API access key.
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.KeyApi();
let accessKey = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage
let updateKeyRequest = new GarageAdministrationApiV0garageV080.UpdateKeyRequest(); // UpdateKeyRequest | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove
apiInstance.updateKey(accessKey, updateKeyRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**accessKey** | **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 |
### Return type
[**KeyInfo**](KeyInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json

View file

@ -0,0 +1,13 @@
# GarageAdministrationApiV0garageV080.KeyInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]
**accessKeyId** | **String** | | [optional]
**secretAccessKey** | **String** | | [optional]
**permissions** | [**KeyInfoPermissions**](KeyInfoPermissions.md) | | [optional]
**buckets** | [**[KeyInfoBucketsInner]**](KeyInfoBucketsInner.md) | | [optional]

View file

@ -0,0 +1,12 @@
# GarageAdministrationApiV0garageV080.KeyInfoBucketsInner
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**globalAliases** | **[String]** | | [optional]
**localAliases** | **[String]** | | [optional]
**permissions** | [**KeyInfoBucketsInnerPermissions**](KeyInfoBucketsInnerPermissions.md) | | [optional]

View file

@ -0,0 +1,11 @@
# GarageAdministrationApiV0garageV080.KeyInfoBucketsInnerPermissions
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**read** | **Boolean** | | [optional]
**write** | **Boolean** | | [optional]
**owner** | **Boolean** | | [optional]

View file

@ -0,0 +1,9 @@
# GarageAdministrationApiV0garageV080.KeyInfoPermissions
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**createBucket** | **Boolean** | | [optional]

View file

@ -0,0 +1,204 @@
# GarageAdministrationApiV0garageV080.LayoutApi
All URIs are relative to *http://localhost:3903/v0*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addLayout**](LayoutApi.md#addLayout) | **POST** /layout | Send modifications to the cluster layout
[**applyLayout**](LayoutApi.md#applyLayout) | **POST** /layout/apply | Apply staged layout
[**getLayout**](LayoutApi.md#getLayout) | **GET** /layout | Details on the current and staged layout
[**revertLayout**](LayoutApi.md#revertLayout) | **POST** /layout/revert | Clear staged layout
## addLayout
> addLayout(requestBody)
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 &#x60;GET /layout&#x60;. Once the set of staged changes is satisfactory, the user may call &#x60;POST /layout/apply&#x60; to apply the changed changes, or &#x60;POST /layout/revert&#x60; to clear all of the staged changes in the layout. Note that setting the capacity to &#x60;null&#x60; will configure the node as a gateway.
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.LayoutApi();
let requestBody = {key: new GarageAdministrationApiV0garageV080.NodeClusterInfo()}; // {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.
apiInstance.addLayout(requestBody, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**requestBody** | [**{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. |
### Return type
null (empty response body)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
## applyLayout
> applyLayout(layoutVersion)
Apply staged layout
Applies to the cluster the layout changes currently registered as staged layout changes.
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.LayoutApi();
let layoutVersion = new GarageAdministrationApiV0garageV080.LayoutVersion(); // 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.
apiInstance.applyLayout(layoutVersion, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**layoutVersion** | [**LayoutVersion**](LayoutVersion.md)| 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. |
### Return type
null (empty response body)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
## getLayout
> ClusterLayout getLayout()
Details on the current and staged layout
Returns the cluster&#39;s current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *The info returned by this endpoint is a subset of the info returned by &#x60;GET /status&#x60;.*
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.LayoutApi();
apiInstance.getLayout((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**ClusterLayout**](ClusterLayout.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## revertLayout
> revertLayout(layoutVersion)
Clear staged layout
Clears all of the staged layout changes.
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.LayoutApi();
let layoutVersion = new GarageAdministrationApiV0garageV080.LayoutVersion(); // 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.
apiInstance.revertLayout(layoutVersion, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**layoutVersion** | [**LayoutVersion**](LayoutVersion.md)| 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. |
### Return type
null (empty response body)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined

View file

@ -0,0 +1,9 @@
# GarageAdministrationApiV0garageV080.LayoutVersion
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**version** | **Number** | | [optional]

View file

@ -0,0 +1,11 @@
# GarageAdministrationApiV0garageV080.ListBuckets200ResponseInner
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**globalAliases** | **[String]** | | [optional]
**localAliases** | [**[ListBuckets200ResponseInnerLocalAliasesInner]**](ListBuckets200ResponseInnerLocalAliasesInner.md) | | [optional]

View file

@ -0,0 +1,10 @@
# GarageAdministrationApiV0garageV080.ListBuckets200ResponseInnerLocalAliasesInner
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**alias** | **String** | |
**accessKeyId** | **String** | |

View file

@ -0,0 +1,10 @@
# GarageAdministrationApiV0garageV080.ListKeys200ResponseInner
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**name** | **String** | | [optional]

View file

@ -0,0 +1,11 @@
# GarageAdministrationApiV0garageV080.NodeClusterInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**zone** | **String** | |
**capacity** | **Number** | |
**tags** | **[String]** | User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage |

View file

@ -0,0 +1,12 @@
# GarageAdministrationApiV0garageV080.NodeNetworkInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**addr** | **String** | |
**isUp** | **Boolean** | |
**lastSeenSecsAgo** | **Number** | |
**hostname** | **String** | |

104
javascript/docs/NodesApi.md Normal file
View file

@ -0,0 +1,104 @@
# GarageAdministrationApiV0garageV080.NodesApi
All URIs are relative to *http://localhost:3903/v0*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addNode**](NodesApi.md#addNode) | **POST** /connect | Connect target node to other Garage nodes
[**getNodes**](NodesApi.md#getNodes) | **GET** /status | Status of this node and other nodes in the cluster
## addNode
> [AddNode200ResponseInner] addNode(requestBody)
Connect target node to other Garage nodes
Instructs this Garage node to connect to other Garage nodes at specified &#x60;&lt;node_id&gt;@&lt;net_address&gt;&#x60;. &#x60;node_id&#x60; is generated automatically on node start.
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.NodesApi();
let requestBody = ["null"]; // [String] |
apiInstance.addNode(requestBody, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**requestBody** | [**[String]**](String.md)| |
### Return type
[**[AddNode200ResponseInner]**](AddNode200ResponseInner.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## getNodes
> GetNodes200Response getNodes()
Status of this node and other nodes in the cluster
Returns the cluster&#39;s current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout
### Example
```javascript
import GarageAdministrationApiV0garageV080 from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = GarageAdministrationApiV0garageV080.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GarageAdministrationApiV0garageV080.NodesApi();
apiInstance.getNodes((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**GetNodes200Response**](GetNodes200Response.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json

View file

@ -0,0 +1,10 @@
# GarageAdministrationApiV0garageV080.UpdateBucketRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**websiteAccess** | [**UpdateBucketRequestWebsiteAccess**](UpdateBucketRequestWebsiteAccess.md) | | [optional]
**quotas** | [**UpdateBucketRequestQuotas**](UpdateBucketRequestQuotas.md) | | [optional]

View file

@ -0,0 +1,10 @@
# GarageAdministrationApiV0garageV080.UpdateBucketRequestQuotas
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**maxSize** | **Number** | | [optional]
**maxObjects** | **Number** | | [optional]

View file

@ -0,0 +1,11 @@
# GarageAdministrationApiV0garageV080.UpdateBucketRequestWebsiteAccess
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**enabled** | **Boolean** | | [optional]
**indexDocument** | **String** | | [optional]
**errorDocument** | **String** | | [optional]

View file

@ -0,0 +1,11 @@
# GarageAdministrationApiV0garageV080.UpdateKeyRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]
**allow** | [**UpdateKeyRequestAllow**](UpdateKeyRequestAllow.md) | | [optional]
**deny** | [**UpdateKeyRequestDeny**](UpdateKeyRequestDeny.md) | | [optional]

View file

@ -0,0 +1,9 @@
# GarageAdministrationApiV0garageV080.UpdateKeyRequestAllow
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**createBucket** | **Boolean** | | [optional]

View file

@ -0,0 +1,9 @@
# GarageAdministrationApiV0garageV080.UpdateKeyRequestDeny
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**createBucket** | **Boolean** | | [optional]

57
javascript/git_push.sh Normal file
View file

@ -0,0 +1,57 @@
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'

1
javascript/mocha.opts Normal file
View file

@ -0,0 +1 @@
--timeout 10000

46
javascript/package.json Normal file
View file

@ -0,0 +1,46 @@
{
"name": "garage_administration_api_v0garage_v0_8_0",
"version": "v0.8.0",
"description": "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!* ",
"license": "Unlicense",
"main": "dist/index.js",
"scripts": {
"build": "babel src -d dist",
"prepare": "npm run build",
"test": "mocha --require @babel/register --recursive"
},
"browser": {
"fs": false
},
"dependencies": {
"@babel/cli": "^7.0.0",
"superagent": "^5.3.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-do-expressions": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-bind": "^7.0.0",
"@babel/plugin-proposal-function-sent": "^7.0.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
"@babel/plugin-proposal-pipeline-operator": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/register": "^7.0.0",
"expect.js": "^0.3.1",
"mocha": "^8.0.1",
"sinon": "^7.2.0"
},
"files": [
"dist"
]
}

692
javascript/src/ApiClient.js Normal file
View file

@ -0,0 +1,692 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import superagent from "superagent";
import querystring from "querystring";
/**
* @module ApiClient
* @version v0.8.0
*/
/**
* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
* application to use this class directly - the *Api and model classes provide the public API for the service. The
* contents of this file should be regarded as internal but are documented for completeness.
* @alias module:ApiClient
* @class
*/
class ApiClient {
/**
* The base URL against which to resolve every API call's (relative) path.
* Overrides the default value set in spec file if present
* @param {String} basePath
*/
constructor(basePath = 'http://localhost:3903/v0') {
/**
* The base URL against which to resolve every API call's (relative) path.
* @type {String}
* @default http://localhost:3903/v0
*/
this.basePath = basePath.replace(/\/+$/, '');
/**
* The authentication methods to be included for all API calls.
* @type {Array.<String>}
*/
this.authentications = {
'bearerAuth': {type: 'bearer'}
}
/**
* The default HTTP headers to be included for all API calls.
* @type {Array.<String>}
* @default {}
*/
this.defaultHeaders = {
'User-Agent': 'OpenAPI-Generator/v0.8.0/Javascript'
};
/**
* The default HTTP timeout for all API calls.
* @type {Number}
* @default 60000
*/
this.timeout = 60000;
/**
* If set to false an additional timestamp parameter is added to all API GET calls to
* prevent browser caching
* @type {Boolean}
* @default true
*/
this.cache = true;
/**
* If set to true, the client will save the cookies from each server
* response, and return them in the next request.
* @default false
*/
this.enableCookies = false;
/*
* Used to save and return cookies in a node.js (non-browser) setting,
* if this.enableCookies is set to true.
*/
if (typeof window === 'undefined') {
this.agent = new superagent.agent();
}
/*
* Allow user to override superagent agent
*/
this.requestAgent = null;
/*
* Allow user to add superagent plugins
*/
this.plugins = null;
}
/**
* Returns a string representation for an actual parameter.
* @param param The actual parameter.
* @returns {String} The string representation of <code>param</code>.
*/
paramToString(param) {
if (param == undefined || param == null) {
return '';
}
if (param instanceof Date) {
return param.toJSON();
}
if (ApiClient.canBeJsonified(param)) {
return JSON.stringify(param);
}
return param.toString();
}
/**
* Returns a boolean indicating if the parameter could be JSON.stringified
* @param param The actual parameter
* @returns {Boolean} Flag indicating if <code>param</code> can be JSON.stringified
*/
static canBeJsonified(str) {
if (typeof str !== 'string' && typeof str !== 'object') return false;
try {
const type = str.toString();
return type === '[object Object]'
|| type === '[object Array]';
} catch (err) {
return false;
}
};
/**
* Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.
* NOTE: query parameters are not handled here.
* @param {String} path The path to append to the base URL.
* @param {Object} pathParams The parameter values to append.
* @param {String} apiBasePath Base path defined in the path, operation level to override the default one
* @returns {String} The encoded path with parameter values substituted.
*/
buildUrl(path, pathParams, apiBasePath) {
if (!path.match(/^\//)) {
path = '/' + path;
}
var url = this.basePath + path;
// use API (operation, path) base path if defined
if (apiBasePath !== null && apiBasePath !== undefined) {
url = apiBasePath + path;
}
url = url.replace(/\{([\w-\.]+)\}/g, (fullMatch, key) => {
var value;
if (pathParams.hasOwnProperty(key)) {
value = this.paramToString(pathParams[key]);
} else {
value = fullMatch;
}
return encodeURIComponent(value);
});
return url;
}
/**
* Checks whether the given content type represents JSON.<br>
* JSON content type examples:<br>
* <ul>
* <li>application/json</li>
* <li>application/json; charset=UTF8</li>
* <li>APPLICATION/JSON</li>
* </ul>
* @param {String} contentType The MIME content type to check.
* @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
*/
isJsonMime(contentType) {
return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i));
}
/**
* Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
* @param {Array.<String>} contentTypes
* @returns {String} The chosen content type, preferring JSON.
*/
jsonPreferredMime(contentTypes) {
for (var i = 0; i < contentTypes.length; i++) {
if (this.isJsonMime(contentTypes[i])) {
return contentTypes[i];
}
}
return contentTypes[0];
}
/**
* Checks whether the given parameter value represents file-like content.
* @param param The parameter to check.
* @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
*/
isFileParam(param) {
// fs.ReadStream in Node.js and Electron (but not in runtime like browserify)
if (typeof require === 'function') {
let fs;
try {
fs = require('fs');
} catch (err) {}
if (fs && fs.ReadStream && param instanceof fs.ReadStream) {
return true;
}
}
// Buffer in Node.js
if (typeof Buffer === 'function' && param instanceof Buffer) {
return true;
}
// Blob in browser
if (typeof Blob === 'function' && param instanceof Blob) {
return true;
}
// File in browser (it seems File object is also instance of Blob, but keep this for safe)
if (typeof File === 'function' && param instanceof File) {
return true;
}
return false;
}
/**
* Normalizes parameter values:
* <ul>
* <li>remove nils</li>
* <li>keep files and arrays</li>
* <li>format to string with `paramToString` for other cases</li>
* </ul>
* @param {Object.<String, Object>} params The parameters as object properties.
* @returns {Object.<String, Object>} normalized parameters.
*/
normalizeParams(params) {
var newParams = {};
for (var key in params) {
if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {
var value = params[key];
if (this.isFileParam(value) || Array.isArray(value)) {
newParams[key] = value;
} else {
newParams[key] = this.paramToString(value);
}
}
}
return newParams;
}
/**
* Builds a string representation of an array-type actual parameter, according to the given collection format.
* @param {Array} param An array parameter.
* @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.
* @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns
* <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.
*/
buildCollectionParam(param, collectionFormat) {
if (param == null) {
return null;
}
switch (collectionFormat) {
case 'csv':
return param.map(this.paramToString, this).join(',');
case 'ssv':
return param.map(this.paramToString, this).join(' ');
case 'tsv':
return param.map(this.paramToString, this).join('\t');
case 'pipes':
return param.map(this.paramToString, this).join('|');
case 'multi':
//return the array directly as SuperAgent will handle it as expected
return param.map(this.paramToString, this);
case 'passthrough':
return param;
default:
throw new Error('Unknown collection format: ' + collectionFormat);
}
}
/**
* Applies authentication headers to the request.
* @param {Object} request The request object created by a <code>superagent()</code> call.
* @param {Array.<String>} authNames An array of authentication method names.
*/
applyAuthToRequest(request, authNames) {
authNames.forEach((authName) => {
var auth = this.authentications[authName];
switch (auth.type) {
case 'basic':
if (auth.username || auth.password) {
request.auth(auth.username || '', auth.password || '');
}
break;
case 'bearer':
if (auth.accessToken) {
var localVarBearerToken = typeof auth.accessToken === 'function'
? auth.accessToken()
: auth.accessToken
request.set({'Authorization': 'Bearer ' + localVarBearerToken});
}
break;
case 'apiKey':
if (auth.apiKey) {
var data = {};
if (auth.apiKeyPrefix) {
data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;
} else {
data[auth.name] = auth.apiKey;
}
if (auth['in'] === 'header') {
request.set(data);
} else {
request.query(data);
}
}
break;
case 'oauth2':
if (auth.accessToken) {
request.set({'Authorization': 'Bearer ' + auth.accessToken});
}
break;
default:
throw new Error('Unknown authentication type: ' + auth.type);
}
});
}
/**
* Deserializes an HTTP response body into a value of the specified type.
* @param {Object} response A SuperAgent response object.
* @param {(String|Array.<String>|Object.<String, Object>|Function)} returnType The type to return. Pass a string for simple types
* or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
* return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
* all properties on <code>data<code> will be converted to this type.
* @returns A value of the specified type.
*/
deserialize(response, returnType) {
if (response == null || returnType == null || response.status == 204) {
return null;
}
// Rely on SuperAgent for parsing response body.
// See http://visionmedia.github.io/superagent/#parsing-response-bodies
var data = response.body;
if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {
// SuperAgent does not always produce a body; use the unparsed response as a fallback
data = response.text;
}
return ApiClient.convertToType(data, returnType);
}
/**
* Callback function to receive the result of the operation.
* @callback module:ApiClient~callApiCallback
* @param {String} error Error message, if any.
* @param data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Invokes the REST service using the supplied settings and parameters.
* @param {String} path The base URL to invoke.
* @param {String} httpMethod The HTTP method to use.
* @param {Object.<String, String>} pathParams A map of path parameters and their values.
* @param {Object.<String, Object>} queryParams A map of query parameters and their values.
* @param {Object.<String, Object>} headerParams A map of header parameters and their values.
* @param {Object.<String, Object>} formParams A map of form parameters and their values.
* @param {Object} bodyParam The value to pass as the request body.
* @param {Array.<String>} authNames An array of authentication type names.
* @param {Array.<String>} contentTypes An array of request MIME types.
* @param {Array.<String>} accepts An array of acceptable response MIME types.
* @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the
* constructor for a complex type.
* @param {String} apiBasePath base path defined in the operation/path level to override the default one
* @param {module:ApiClient~callApiCallback} callback The callback function.
* @returns {Object} The SuperAgent request object.
*/
callApi(path, httpMethod, pathParams,
queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,
returnType, apiBasePath, callback) {
var url = this.buildUrl(path, pathParams, apiBasePath);
var request = superagent(httpMethod, url);
if (this.plugins !== null) {
for (var index in this.plugins) {
if (this.plugins.hasOwnProperty(index)) {
request.use(this.plugins[index])
}
}
}
// apply authentications
this.applyAuthToRequest(request, authNames);
// set query parameters
if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {
queryParams['_'] = new Date().getTime();
}
request.query(this.normalizeParams(queryParams));
// set header parameters
request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
// set requestAgent if it is set by user
if (this.requestAgent) {
request.agent(this.requestAgent);
}
// set request timeout
request.timeout(this.timeout);
var contentType = this.jsonPreferredMime(contentTypes);
if (contentType) {
// Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)
if(contentType != 'multipart/form-data') {
request.type(contentType);
}
}
if (contentType === 'application/x-www-form-urlencoded') {
request.send(querystring.stringify(this.normalizeParams(formParams)));
} else if (contentType == 'multipart/form-data') {
var _formParams = this.normalizeParams(formParams);
for (var key in _formParams) {
if (_formParams.hasOwnProperty(key)) {
let _formParamsValue = _formParams[key];
if (this.isFileParam(_formParamsValue)) {
// file field
request.attach(key, _formParamsValue);
} else if (Array.isArray(_formParamsValue) && _formParamsValue.length
&& this.isFileParam(_formParamsValue[0])) {
// multiple files
_formParamsValue.forEach(file => request.attach(key, file));
} else {
request.field(key, _formParamsValue);
}
}
}
} else if (bodyParam !== null && bodyParam !== undefined) {
if (!request.header['Content-Type']) {
request.type('application/json');
}
request.send(bodyParam);
}
var accept = this.jsonPreferredMime(accepts);
if (accept) {
request.accept(accept);
}
if (returnType === 'Blob') {
request.responseType('blob');
} else if (returnType === 'String') {
request.responseType('text');
}
// Attach previously saved cookies, if enabled
if (this.enableCookies){
if (typeof window === 'undefined') {
this.agent._attachCookies(request);
}
else {
request.withCredentials();
}
}
request.end((error, response) => {
if (callback) {
var data = null;
if (!error) {
try {
data = this.deserialize(response, returnType);
if (this.enableCookies && typeof window === 'undefined'){
this.agent._saveCookies(response);
}
} catch (err) {
error = err;
}
}
callback(error, data, response);
}
});
return request;
}
/**
* Parses an ISO-8601 string representation or epoch representation of a date value.
* @param {String} str The date value as a string.
* @returns {Date} The parsed date object.
*/
static parseDate(str) {
if (isNaN(str)) {
return new Date(str.replace(/(\d)(T)(\d)/i, '$1 $3'));
}
return new Date(+str);
}
/**
* Converts a value to the specified type.
* @param {(String|Object)} data The data to convert, as a string or object.
* @param {(String|Array.<String>|Object.<String, Object>|Function)} type The type to return. Pass a string for simple types
* or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
* return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
* all properties on <code>data<code> will be converted to this type.
* @returns An instance of the specified type or null or undefined if data is null or undefined.
*/
static convertToType(data, type) {
if (data === null || data === undefined)
return data
switch (type) {
case 'Boolean':
return Boolean(data);
case 'Integer':
return parseInt(data, 10);
case 'Number':
return parseFloat(data);
case 'String':
return String(data);
case 'Date':
return ApiClient.parseDate(String(data));
case 'Blob':
return data;
default:
if (type === Object) {
// generic object, return directly
return data;
} else if (typeof type.constructFromObject === 'function') {
// for model type like User and enum class
return type.constructFromObject(data);
} else if (Array.isArray(type)) {
// for array type like: ['String']
var itemType = type[0];
return data.map((item) => {
return ApiClient.convertToType(item, itemType);
});
} else if (typeof type === 'object') {
// for plain object type like: {'String': 'Integer'}
var keyType, valueType;
for (var k in type) {
if (type.hasOwnProperty(k)) {
keyType = k;
valueType = type[k];
break;
}
}
var result = {};
for (var k in data) {
if (data.hasOwnProperty(k)) {
var key = ApiClient.convertToType(k, keyType);
var value = ApiClient.convertToType(data[k], valueType);
result[key] = value;
}
}
return result;
} else {
// for unknown type, return the data directly
return data;
}
}
}
/**
* Gets an array of host settings
* @returns An array of host settings
*/
hostSettings() {
return [
{
'url': "http://localhost:3903/v0",
'description': "A local server",
}
];
}
getBasePathFromSettings(index, variables={}) {
var servers = this.hostSettings();
// check array index out of bound
if (index < 0 || index >= servers.length) {
throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length);
}
var server = servers[index];
var url = server['url'];
// go through variable and assign a value
for (var variable_name in server['variables']) {
if (variable_name in variables) {
let variable = server['variables'][variable_name];
if ( !('enum_values' in variable) || variable['enum_values'].includes(variables[variable_name]) ) {
url = url.replace("{" + variable_name + "}", variables[variable_name]);
} else {
throw new Error("The variable `" + variable_name + "` in the host URL has invalid value " + variables[variable_name] + ". Must be " + server['variables'][variable_name]['enum_values'] + ".");
}
} else {
// use default value
url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value'])
}
}
return url;
}
/**
* Constructs a new map or array model from REST data.
* @param data {Object|Array} The REST data.
* @param obj {Object|Array} The target object or array.
*/
static constructFromObject(data, obj, itemType) {
if (Array.isArray(data)) {
for (var i = 0; i < data.length; i++) {
if (data.hasOwnProperty(i))
obj[i] = ApiClient.convertToType(data[i], itemType);
}
} else {
for (var k in data) {
if (data.hasOwnProperty(k))
obj[k] = ApiClient.convertToType(data[k], itemType);
}
}
};
}
/**
* Enumeration of collection format separator strategies.
* @enum {String}
* @readonly
*/
ApiClient.CollectionFormatEnum = {
/**
* Comma-separated values. Value: <code>csv</code>
* @const
*/
CSV: ',',
/**
* Space-separated values. Value: <code>ssv</code>
* @const
*/
SSV: ' ',
/**
* Tab-separated values. Value: <code>tsv</code>
* @const
*/
TSV: '\t',
/**
* Pipe(|)-separated values. Value: <code>pipes</code>
* @const
*/
PIPES: '|',
/**
* Native array. Value: <code>multi</code>
* @const
*/
MULTI: 'multi'
};
/**
* The default API client implementation.
* @type {module:ApiClient}
*/
ApiClient.instance = new ApiClient();
export default ApiClient;

View file

@ -0,0 +1,589 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from "../ApiClient";
import AllowBucketKeyRequest from '../model/AllowBucketKeyRequest';
import BucketInfo from '../model/BucketInfo';
import CreateBucketRequest from '../model/CreateBucketRequest';
import ListBuckets200ResponseInner from '../model/ListBuckets200ResponseInner';
import UpdateBucketRequest from '../model/UpdateBucketRequest';
/**
* Bucket service.
* @module api/BucketApi
* @version v0.8.0
*/
export default class BucketApi {
/**
* Constructs a new BucketApi.
* @alias module:api/BucketApi
* @class
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
* default to {@link module:ApiClient#instance} if unspecified.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
}
/**
* Callback function to receive the result of the allowBucketKey operation.
* @callback module:api/BucketApi~allowBucketKeyCallback
* @param {String} error Error message, if any.
* @param {module:model/BucketInfo} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Allow key
* **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Allows a key to do read/write/owner operations on a bucket. Flags in permissions which have the value true will be activated. Other flags will remain unchanged (ie. they will keep their internal value). For example, if you set read to true, the key will be allowed to read the bucket. If you set it to false, the key will keeps its previous read permission. If you want to disallow read for the key, check the DenyBucketKey operation.
* @param {module:model/AllowBucketKeyRequest} allowBucketKeyRequest Aliases to put on the new bucket
* @param {module:api/BucketApi~allowBucketKeyCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/BucketInfo}
*/
allowBucketKey(allowBucketKeyRequest, callback) {
let postBody = allowBucketKeyRequest;
// verify the required parameter 'allowBucketKeyRequest' is set
if (allowBucketKeyRequest === undefined || allowBucketKeyRequest === null) {
throw new Error("Missing the required parameter 'allowBucketKeyRequest' when calling allowBucketKey");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = BucketInfo;
return this.apiClient.callApi(
'/bucket/allow', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the createBucket operation.
* @callback module:api/BucketApi~createBucketCallback
* @param {String} error Error message, if any.
* @param {module:model/BucketInfo} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Create a bucket
* Creates a new bucket, either with a global alias, a local one, or no alias at all. Technically, you can also specify both `globalAlias` and `localAlias` and that would create two aliases.
* @param {module:model/CreateBucketRequest} createBucketRequest Aliases to put on the new bucket
* @param {module:api/BucketApi~createBucketCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/BucketInfo}
*/
createBucket(createBucketRequest, callback) {
let postBody = createBucketRequest;
// verify the required parameter 'createBucketRequest' is set
if (createBucketRequest === undefined || createBucketRequest === null) {
throw new Error("Missing the required parameter 'createBucketRequest' when calling createBucket");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = BucketInfo;
return this.apiClient.callApi(
'/bucket', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the deleteBucket operation.
* @callback module:api/BucketApi~deleteBucketCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Delete a bucket
* Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is not empty. **Warning:** this will delete all aliases associated with the bucket!
* @param {String} bucketId The exact bucket identifier, a 32 bytes hexadecimal string
* @param {module:api/BucketApi~deleteBucketCallback} callback The callback function, accepting three arguments: error, data, response
*/
deleteBucket(bucketId, callback) {
let postBody = null;
// verify the required parameter 'bucketId' is set
if (bucketId === undefined || bucketId === null) {
throw new Error("Missing the required parameter 'bucketId' when calling deleteBucket");
}
let pathParams = {
'bucket_id': bucketId
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/bucket?id={bucket_id}', 'DELETE',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the deleteBucketGlobalAlias operation.
* @callback module:api/BucketApi~deleteBucketGlobalAliasCallback
* @param {String} error Error message, if any.
* @param {module:model/BucketInfo} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Delete a global alias
* Delete a global alias from the target bucket
* @param {String} id
* @param {String} alias
* @param {module:api/BucketApi~deleteBucketGlobalAliasCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/BucketInfo}
*/
deleteBucketGlobalAlias(id, alias, callback) {
let postBody = null;
// verify the required parameter 'id' is set
if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'id' when calling deleteBucketGlobalAlias");
}
// verify the required parameter 'alias' is set
if (alias === undefined || alias === null) {
throw new Error("Missing the required parameter 'alias' when calling deleteBucketGlobalAlias");
}
let pathParams = {
};
let queryParams = {
'id': id,
'alias': alias
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = BucketInfo;
return this.apiClient.callApi(
'/bucket/alias/global', 'DELETE',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the deleteBucketLocalAlias operation.
* @callback module:api/BucketApi~deleteBucketLocalAliasCallback
* @param {String} error Error message, if any.
* @param {module:model/BucketInfo} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Delete a local alias
* Delete a local alias, bound to specified account, from the target bucket
* @param {String} id
* @param {String} accessKeyId
* @param {String} alias
* @param {module:api/BucketApi~deleteBucketLocalAliasCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/BucketInfo}
*/
deleteBucketLocalAlias(id, accessKeyId, alias, callback) {
let postBody = null;
// verify the required parameter 'id' is set
if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'id' when calling deleteBucketLocalAlias");
}
// verify the required parameter 'accessKeyId' is set
if (accessKeyId === undefined || accessKeyId === null) {
throw new Error("Missing the required parameter 'accessKeyId' when calling deleteBucketLocalAlias");
}
// verify the required parameter 'alias' is set
if (alias === undefined || alias === null) {
throw new Error("Missing the required parameter 'alias' when calling deleteBucketLocalAlias");
}
let pathParams = {
};
let queryParams = {
'id': id,
'accessKeyId': accessKeyId,
'alias': alias
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = BucketInfo;
return this.apiClient.callApi(
'/bucket/alias/local', 'DELETE',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the denyBucketKey operation.
* @callback module:api/BucketApi~denyBucketKeyCallback
* @param {String} error Error message, if any.
* @param {module:model/BucketInfo} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Deny key
* **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Denies a key from doing read/write/owner operations on a bucket. Flags in permissions which have the value true will be deactivated. Other flags will remain unchanged. For example, if you set read to true, the key will be denied from reading. If you set read to false, the key will keep its previous permissions. If you want the key to have the reading permission, check the AllowBucketKey operation.
* @param {module:model/AllowBucketKeyRequest} allowBucketKeyRequest Aliases to put on the new bucket
* @param {module:api/BucketApi~denyBucketKeyCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/BucketInfo}
*/
denyBucketKey(allowBucketKeyRequest, callback) {
let postBody = allowBucketKeyRequest;
// verify the required parameter 'allowBucketKeyRequest' is set
if (allowBucketKeyRequest === undefined || allowBucketKeyRequest === null) {
throw new Error("Missing the required parameter 'allowBucketKeyRequest' when calling denyBucketKey");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = BucketInfo;
return this.apiClient.callApi(
'/bucket/deny', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the findBucketInfo operation.
* @callback module:api/BucketApi~findBucketInfoCallback
* @param {String} error Error message, if any.
* @param {module:model/BucketInfo} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Find a bucket
* Find a bucket by its global alias
* @param {String} alias The exact global alias of one of the existing buckets
* @param {module:api/BucketApi~findBucketInfoCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/BucketInfo}
*/
findBucketInfo(alias, callback) {
let postBody = null;
// verify the required parameter 'alias' is set
if (alias === undefined || alias === null) {
throw new Error("Missing the required parameter 'alias' when calling findBucketInfo");
}
let pathParams = {
'alias': alias
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = BucketInfo;
return this.apiClient.callApi(
'/bucket?globalAlias={alias}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the getBucketInfo operation.
* @callback module:api/BucketApi~getBucketInfoCallback
* @param {String} error Error message, if any.
* @param {module:model/BucketInfo} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Get a bucket
* Given a bucket identifier, get its information. 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, and its quotas (if any).
* @param {String} bucketId The exact bucket identifier, a 32 bytes hexadecimal string
* @param {module:api/BucketApi~getBucketInfoCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/BucketInfo}
*/
getBucketInfo(bucketId, callback) {
let postBody = null;
// verify the required parameter 'bucketId' is set
if (bucketId === undefined || bucketId === null) {
throw new Error("Missing the required parameter 'bucketId' when calling getBucketInfo");
}
let pathParams = {
'bucket_id': bucketId
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = BucketInfo;
return this.apiClient.callApi(
'/bucket?id={bucket_id}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the listBuckets operation.
* @callback module:api/BucketApi~listBucketsCallback
* @param {String} error Error message, if any.
* @param {Array.<module:model/ListBuckets200ResponseInner>} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* List all buckets
* List all the buckets on the cluster with their UUID and their global and local aliases.
* @param {module:api/BucketApi~listBucketsCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link Array.<module:model/ListBuckets200ResponseInner>}
*/
listBuckets(callback) {
let postBody = null;
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = [ListBuckets200ResponseInner];
return this.apiClient.callApi(
'/bucket', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the putBucketGlobalAlias operation.
* @callback module:api/BucketApi~putBucketGlobalAliasCallback
* @param {String} error Error message, if any.
* @param {module:model/BucketInfo} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Add a global alias
* Add a global alias to the target bucket
* @param {String} id
* @param {String} alias
* @param {module:api/BucketApi~putBucketGlobalAliasCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/BucketInfo}
*/
putBucketGlobalAlias(id, alias, callback) {
let postBody = null;
// verify the required parameter 'id' is set
if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'id' when calling putBucketGlobalAlias");
}
// verify the required parameter 'alias' is set
if (alias === undefined || alias === null) {
throw new Error("Missing the required parameter 'alias' when calling putBucketGlobalAlias");
}
let pathParams = {
};
let queryParams = {
'id': id,
'alias': alias
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = BucketInfo;
return this.apiClient.callApi(
'/bucket/alias/global', 'PUT',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the putBucketLocalAlias operation.
* @callback module:api/BucketApi~putBucketLocalAliasCallback
* @param {String} error Error message, if any.
* @param {module:model/BucketInfo} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Add a local alias
* Add a local alias, bound to specified account, to the target bucket
* @param {String} id
* @param {String} accessKeyId
* @param {String} alias
* @param {module:api/BucketApi~putBucketLocalAliasCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/BucketInfo}
*/
putBucketLocalAlias(id, accessKeyId, alias, callback) {
let postBody = null;
// verify the required parameter 'id' is set
if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'id' when calling putBucketLocalAlias");
}
// verify the required parameter 'accessKeyId' is set
if (accessKeyId === undefined || accessKeyId === null) {
throw new Error("Missing the required parameter 'accessKeyId' when calling putBucketLocalAlias");
}
// verify the required parameter 'alias' is set
if (alias === undefined || alias === null) {
throw new Error("Missing the required parameter 'alias' when calling putBucketLocalAlias");
}
let pathParams = {
};
let queryParams = {
'id': id,
'accessKeyId': accessKeyId,
'alias': alias
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = BucketInfo;
return this.apiClient.callApi(
'/bucket/alias/local', 'PUT',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the updateBucket operation.
* @callback module:api/BucketApi~updateBucketCallback
* @param {String} error Error message, if any.
* @param {module:model/BucketInfo} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Update a bucket
* All fields (`websiteAccess` and `quotas`) are optionnal. 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. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas.
* @param {String} bucketId The exact bucket identifier, a 32 bytes hexadecimal string
* @param {module:model/UpdateBucketRequest} updateBucketRequest Requested changes on the bucket. Both root fields are optionals.
* @param {module:api/BucketApi~updateBucketCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/BucketInfo}
*/
updateBucket(bucketId, updateBucketRequest, callback) {
let postBody = updateBucketRequest;
// verify the required parameter 'bucketId' is set
if (bucketId === undefined || bucketId === null) {
throw new Error("Missing the required parameter 'bucketId' when calling updateBucket");
}
// verify the required parameter 'updateBucketRequest' is set
if (updateBucketRequest === undefined || updateBucketRequest === null) {
throw new Error("Missing the required parameter 'updateBucketRequest' when calling updateBucket");
}
let pathParams = {
'bucket_id': bucketId
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = BucketInfo;
return this.apiClient.callApi(
'/bucket?id={bucket_id}', 'PUT',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
}

View file

@ -0,0 +1,339 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from "../ApiClient";
import AddKeyRequest from '../model/AddKeyRequest';
import ImportKeyRequest from '../model/ImportKeyRequest';
import KeyInfo from '../model/KeyInfo';
import ListKeys200ResponseInner from '../model/ListKeys200ResponseInner';
import UpdateKeyRequest from '../model/UpdateKeyRequest';
/**
* Key service.
* @module api/KeyApi
* @version v0.8.0
*/
export default class KeyApi {
/**
* Constructs a new KeyApi.
* @alias module:api/KeyApi
* @class
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
* default to {@link module:ApiClient#instance} if unspecified.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
}
/**
* Callback function to receive the result of the addKey operation.
* @callback module:api/KeyApi~addKeyCallback
* @param {String} error Error message, if any.
* @param {module:model/KeyInfo} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Create a new API key
* Creates a new API access key.
* @param {module:model/AddKeyRequest} addKeyRequest \"You can set a friendly name for this key, send an empty string instead\"
* @param {module:api/KeyApi~addKeyCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/KeyInfo}
*/
addKey(addKeyRequest, callback) {
let postBody = addKeyRequest;
// verify the required parameter 'addKeyRequest' is set
if (addKeyRequest === undefined || addKeyRequest === null) {
throw new Error("Missing the required parameter 'addKeyRequest' when calling addKey");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = KeyInfo;
return this.apiClient.callApi(
'/key', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the deleteKey operation.
* @callback module:api/KeyApi~deleteKeyCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Delete a key
* Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before.
* @param {String} accessKey The exact API access key generated by Garage
* @param {module:api/KeyApi~deleteKeyCallback} callback The callback function, accepting three arguments: error, data, response
*/
deleteKey(accessKey, callback) {
let postBody = null;
// verify the required parameter 'accessKey' is set
if (accessKey === undefined || accessKey === null) {
throw new Error("Missing the required parameter 'accessKey' when calling deleteKey");
}
let pathParams = {
'access_key': accessKey
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/key?id={access_key}', 'DELETE',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the getKey operation.
* @callback module:api/KeyApi~getKeyCallback
* @param {String} error Error message, if any.
* @param {module:model/KeyInfo} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Get key information
* Return information about a specific key and return its information
* @param {String} accessKey The exact API access key generated by Garage
* @param {module:api/KeyApi~getKeyCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/KeyInfo}
*/
getKey(accessKey, callback) {
let postBody = null;
// verify the required parameter 'accessKey' is set
if (accessKey === undefined || accessKey === null) {
throw new Error("Missing the required parameter 'accessKey' when calling getKey");
}
let pathParams = {
'access_key': accessKey
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = KeyInfo;
return this.apiClient.callApi(
'/key?id={access_key}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the importKey operation.
* @callback module:api/KeyApi~importKeyCallback
* @param {String} error Error message, if any.
* @param {module:model/KeyInfo} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Import an existing key
* Imports an existing API key. This feature must only be used for migrations and backup restore. **Do not use it to generate custom key identifiers or you will break your Garage cluster.**
* @param {module:model/ImportKeyRequest} importKeyRequest Information on the key to import
* @param {module:api/KeyApi~importKeyCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/KeyInfo}
*/
importKey(importKeyRequest, callback) {
let postBody = importKeyRequest;
// verify the required parameter 'importKeyRequest' is set
if (importKeyRequest === undefined || importKeyRequest === null) {
throw new Error("Missing the required parameter 'importKeyRequest' when calling importKey");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = KeyInfo;
return this.apiClient.callApi(
'/key/import', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the listKeys operation.
* @callback module:api/KeyApi~listKeysCallback
* @param {String} error Error message, if any.
* @param {Array.<module:model/ListKeys200ResponseInner>} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* List all keys
* Returns all API access keys in the cluster.
* @param {module:api/KeyApi~listKeysCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link Array.<module:model/ListKeys200ResponseInner>}
*/
listKeys(callback) {
let postBody = null;
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = [ListKeys200ResponseInner];
return this.apiClient.callApi(
'/key', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the searchKey operation.
* @callback module:api/KeyApi~searchKeyCallback
* @param {String} error Error message, if any.
* @param {module:model/KeyInfo} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Select key by pattern
* Find the first key matching the given pattern based on its identifier aor friendly name and return its information.
* @param {String} pattern A pattern (beginning or full string) corresponding to a key identifier or friendly name
* @param {module:api/KeyApi~searchKeyCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/KeyInfo}
*/
searchKey(pattern, callback) {
let postBody = null;
// verify the required parameter 'pattern' is set
if (pattern === undefined || pattern === null) {
throw new Error("Missing the required parameter 'pattern' when calling searchKey");
}
let pathParams = {
'pattern': pattern
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = KeyInfo;
return this.apiClient.callApi(
'/key?search={pattern}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the updateKey operation.
* @callback module:api/KeyApi~updateKeyCallback
* @param {String} error Error message, if any.
* @param {module:model/KeyInfo} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Update a key
* Updates information about the specified API access key.
* @param {String} accessKey The exact API access key generated by Garage
* @param {module:model/UpdateKeyRequest} updateKeyRequest For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove
* @param {module:api/KeyApi~updateKeyCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/KeyInfo}
*/
updateKey(accessKey, updateKeyRequest, callback) {
let postBody = updateKeyRequest;
// verify the required parameter 'accessKey' is set
if (accessKey === undefined || accessKey === null) {
throw new Error("Missing the required parameter 'accessKey' when calling updateKey");
}
// verify the required parameter 'updateKeyRequest' is set
if (updateKeyRequest === undefined || updateKeyRequest === null) {
throw new Error("Missing the required parameter 'updateKeyRequest' when calling updateKey");
}
let pathParams = {
'access_key': accessKey
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = KeyInfo;
return this.apiClient.callApi(
'/key?id={access_key}', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
}

View file

@ -0,0 +1,200 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from "../ApiClient";
import ClusterLayout from '../model/ClusterLayout';
import LayoutVersion from '../model/LayoutVersion';
import NodeClusterInfo from '../model/NodeClusterInfo';
/**
* Layout service.
* @module api/LayoutApi
* @version v0.8.0
*/
export default class LayoutApi {
/**
* Constructs a new LayoutApi.
* @alias module:api/LayoutApi
* @class
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
* default to {@link module:ApiClient#instance} if unspecified.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
}
/**
* Callback function to receive the result of the addLayout operation.
* @callback module:api/LayoutApi~addLayoutCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* 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. Note that setting the capacity to `null` will configure the node as a gateway.
* @param {Object.<String, module:model/{String: NodeClusterInfo}>} requestBody 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.
* @param {module:api/LayoutApi~addLayoutCallback} callback The callback function, accepting three arguments: error, data, response
*/
addLayout(requestBody, callback) {
let postBody = requestBody;
// verify the required parameter 'requestBody' is set
if (requestBody === undefined || requestBody === null) {
throw new Error("Missing the required parameter 'requestBody' when calling addLayout");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = ['application/json'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/layout', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the applyLayout operation.
* @callback module:api/LayoutApi~applyLayoutCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Apply staged layout
* Applies to the cluster the layout changes currently registered as staged layout changes.
* @param {module:model/LayoutVersion} 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.
* @param {module:api/LayoutApi~applyLayoutCallback} callback The callback function, accepting three arguments: error, data, response
*/
applyLayout(layoutVersion, callback) {
let postBody = layoutVersion;
// verify the required parameter 'layoutVersion' is set
if (layoutVersion === undefined || layoutVersion === null) {
throw new Error("Missing the required parameter 'layoutVersion' when calling applyLayout");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = ['application/json'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/layout/apply', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the getLayout operation.
* @callback module:api/LayoutApi~getLayoutCallback
* @param {String} error Error message, if any.
* @param {module:model/ClusterLayout} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Details on the current and staged layout
* Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *The info returned by this endpoint is a subset of the info returned by `GET /status`.*
* @param {module:api/LayoutApi~getLayoutCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/ClusterLayout}
*/
getLayout(callback) {
let postBody = null;
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = ClusterLayout;
return this.apiClient.callApi(
'/layout', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the revertLayout operation.
* @callback module:api/LayoutApi~revertLayoutCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Clear staged layout
* Clears all of the staged layout changes.
* @param {module:model/LayoutVersion} 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.
* @param {module:api/LayoutApi~revertLayoutCallback} callback The callback function, accepting three arguments: error, data, response
*/
revertLayout(layoutVersion, callback) {
let postBody = layoutVersion;
// verify the required parameter 'layoutVersion' is set
if (layoutVersion === undefined || layoutVersion === null) {
throw new Error("Missing the required parameter 'layoutVersion' when calling revertLayout");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = ['application/json'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/layout/revert', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
}

View file

@ -0,0 +1,118 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from "../ApiClient";
import AddNode200ResponseInner from '../model/AddNode200ResponseInner';
import GetNodes200Response from '../model/GetNodes200Response';
/**
* Nodes service.
* @module api/NodesApi
* @version v0.8.0
*/
export default class NodesApi {
/**
* Constructs a new NodesApi.
* @alias module:api/NodesApi
* @class
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
* default to {@link module:ApiClient#instance} if unspecified.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
}
/**
* Callback function to receive the result of the addNode operation.
* @callback module:api/NodesApi~addNodeCallback
* @param {String} error Error message, if any.
* @param {Array.<module:model/AddNode200ResponseInner>} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Connect target node to other Garage nodes
* Instructs this Garage node to connect to other Garage nodes at specified `<node_id>@<net_address>`. `node_id` is generated automatically on node start.
* @param {Array.<String>} requestBody
* @param {module:api/NodesApi~addNodeCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link Array.<module:model/AddNode200ResponseInner>}
*/
addNode(requestBody, callback) {
let postBody = requestBody;
// verify the required parameter 'requestBody' is set
if (requestBody === undefined || requestBody === null) {
throw new Error("Missing the required parameter 'requestBody' when calling addNode");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = [AddNode200ResponseInner];
return this.apiClient.callApi(
'/connect', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
/**
* Callback function to receive the result of the getNodes operation.
* @callback module:api/NodesApi~getNodesCallback
* @param {String} error Error message, if any.
* @param {module:model/GetNodes200Response} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Status of this node and other nodes in the cluster
* Returns the cluster's current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout
* @param {module:api/NodesApi~getNodesCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/GetNodes200Response}
*/
getNodes(callback) {
let postBody = null;
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = GetNodes200Response;
return this.apiClient.callApi(
'/status', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
}

293
javascript/src/index.js Normal file
View file

@ -0,0 +1,293 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from './ApiClient';
import AddKeyRequest from './model/AddKeyRequest';
import AddNode200ResponseInner from './model/AddNode200ResponseInner';
import AllowBucketKeyRequest from './model/AllowBucketKeyRequest';
import AllowBucketKeyRequestPermissions from './model/AllowBucketKeyRequestPermissions';
import BucketInfo from './model/BucketInfo';
import BucketInfoQuotas from './model/BucketInfoQuotas';
import BucketInfoWebsiteConfig from './model/BucketInfoWebsiteConfig';
import BucketKeyInfo from './model/BucketKeyInfo';
import ClusterLayout from './model/ClusterLayout';
import CreateBucketRequest from './model/CreateBucketRequest';
import CreateBucketRequestLocalAlias from './model/CreateBucketRequestLocalAlias';
import CreateBucketRequestLocalAliasAllow from './model/CreateBucketRequestLocalAliasAllow';
import GetNodes200Response from './model/GetNodes200Response';
import ImportKeyRequest from './model/ImportKeyRequest';
import KeyInfo from './model/KeyInfo';
import KeyInfoBucketsInner from './model/KeyInfoBucketsInner';
import KeyInfoBucketsInnerPermissions from './model/KeyInfoBucketsInnerPermissions';
import KeyInfoPermissions from './model/KeyInfoPermissions';
import LayoutVersion from './model/LayoutVersion';
import ListBuckets200ResponseInner from './model/ListBuckets200ResponseInner';
import ListBuckets200ResponseInnerLocalAliasesInner from './model/ListBuckets200ResponseInnerLocalAliasesInner';
import ListKeys200ResponseInner from './model/ListKeys200ResponseInner';
import NodeClusterInfo from './model/NodeClusterInfo';
import NodeNetworkInfo from './model/NodeNetworkInfo';
import UpdateBucketRequest from './model/UpdateBucketRequest';
import UpdateBucketRequestQuotas from './model/UpdateBucketRequestQuotas';
import UpdateBucketRequestWebsiteAccess from './model/UpdateBucketRequestWebsiteAccess';
import UpdateKeyRequest from './model/UpdateKeyRequest';
import UpdateKeyRequestAllow from './model/UpdateKeyRequestAllow';
import UpdateKeyRequestDeny from './model/UpdateKeyRequestDeny';
import BucketApi from './api/BucketApi';
import KeyApi from './api/KeyApi';
import LayoutApi from './api/LayoutApi';
import NodesApi from './api/NodesApi';
/**
* 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!* .<br>
* The <code>index</code> module provides access to constructors for all the classes which comprise the public API.
* <p>
* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following:
* <pre>
* var GarageAdministrationApiV0garageV080 = require('index'); // See note below*.
* var xxxSvc = new GarageAdministrationApiV0garageV080.XxxApi(); // Allocate the API class we're going to use.
* var yyyModel = new GarageAdministrationApiV0garageV080.Yyy(); // Construct a model instance.
* yyyModel.someProperty = 'someValue';
* ...
* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
* ...
* </pre>
* <em>*NOTE: For a top-level AMD script, use require(['index'], function(){...})
* and put the application logic within the callback function.</em>
* </p>
* <p>
* A non-AMD browser application (discouraged) might do something like this:
* <pre>
* var xxxSvc = new GarageAdministrationApiV0garageV080.XxxApi(); // Allocate the API class we're going to use.
* var yyy = new GarageAdministrationApiV0garageV080.Yyy(); // Construct a model instance.
* yyyModel.someProperty = 'someValue';
* ...
* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
* ...
* </pre>
* </p>
* @module index
* @version v0.8.0
*/
export {
/**
* The ApiClient constructor.
* @property {module:ApiClient}
*/
ApiClient,
/**
* The AddKeyRequest model constructor.
* @property {module:model/AddKeyRequest}
*/
AddKeyRequest,
/**
* The AddNode200ResponseInner model constructor.
* @property {module:model/AddNode200ResponseInner}
*/
AddNode200ResponseInner,
/**
* The AllowBucketKeyRequest model constructor.
* @property {module:model/AllowBucketKeyRequest}
*/
AllowBucketKeyRequest,
/**
* The AllowBucketKeyRequestPermissions model constructor.
* @property {module:model/AllowBucketKeyRequestPermissions}
*/
AllowBucketKeyRequestPermissions,
/**
* The BucketInfo model constructor.
* @property {module:model/BucketInfo}
*/
BucketInfo,
/**
* The BucketInfoQuotas model constructor.
* @property {module:model/BucketInfoQuotas}
*/
BucketInfoQuotas,
/**
* The BucketInfoWebsiteConfig model constructor.
* @property {module:model/BucketInfoWebsiteConfig}
*/
BucketInfoWebsiteConfig,
/**
* The BucketKeyInfo model constructor.
* @property {module:model/BucketKeyInfo}
*/
BucketKeyInfo,
/**
* The ClusterLayout model constructor.
* @property {module:model/ClusterLayout}
*/
ClusterLayout,
/**
* The CreateBucketRequest model constructor.
* @property {module:model/CreateBucketRequest}
*/
CreateBucketRequest,
/**
* The CreateBucketRequestLocalAlias model constructor.
* @property {module:model/CreateBucketRequestLocalAlias}
*/
CreateBucketRequestLocalAlias,
/**
* The CreateBucketRequestLocalAliasAllow model constructor.
* @property {module:model/CreateBucketRequestLocalAliasAllow}
*/
CreateBucketRequestLocalAliasAllow,
/**
* The GetNodes200Response model constructor.
* @property {module:model/GetNodes200Response}
*/
GetNodes200Response,
/**
* The ImportKeyRequest model constructor.
* @property {module:model/ImportKeyRequest}
*/
ImportKeyRequest,
/**
* The KeyInfo model constructor.
* @property {module:model/KeyInfo}
*/
KeyInfo,
/**
* The KeyInfoBucketsInner model constructor.
* @property {module:model/KeyInfoBucketsInner}
*/
KeyInfoBucketsInner,
/**
* The KeyInfoBucketsInnerPermissions model constructor.
* @property {module:model/KeyInfoBucketsInnerPermissions}
*/
KeyInfoBucketsInnerPermissions,
/**
* The KeyInfoPermissions model constructor.
* @property {module:model/KeyInfoPermissions}
*/
KeyInfoPermissions,
/**
* The LayoutVersion model constructor.
* @property {module:model/LayoutVersion}
*/
LayoutVersion,
/**
* The ListBuckets200ResponseInner model constructor.
* @property {module:model/ListBuckets200ResponseInner}
*/
ListBuckets200ResponseInner,
/**
* The ListBuckets200ResponseInnerLocalAliasesInner model constructor.
* @property {module:model/ListBuckets200ResponseInnerLocalAliasesInner}
*/
ListBuckets200ResponseInnerLocalAliasesInner,
/**
* The ListKeys200ResponseInner model constructor.
* @property {module:model/ListKeys200ResponseInner}
*/
ListKeys200ResponseInner,
/**
* The NodeClusterInfo model constructor.
* @property {module:model/NodeClusterInfo}
*/
NodeClusterInfo,
/**
* The NodeNetworkInfo model constructor.
* @property {module:model/NodeNetworkInfo}
*/
NodeNetworkInfo,
/**
* The UpdateBucketRequest model constructor.
* @property {module:model/UpdateBucketRequest}
*/
UpdateBucketRequest,
/**
* The UpdateBucketRequestQuotas model constructor.
* @property {module:model/UpdateBucketRequestQuotas}
*/
UpdateBucketRequestQuotas,
/**
* The UpdateBucketRequestWebsiteAccess model constructor.
* @property {module:model/UpdateBucketRequestWebsiteAccess}
*/
UpdateBucketRequestWebsiteAccess,
/**
* The UpdateKeyRequest model constructor.
* @property {module:model/UpdateKeyRequest}
*/
UpdateKeyRequest,
/**
* The UpdateKeyRequestAllow model constructor.
* @property {module:model/UpdateKeyRequestAllow}
*/
UpdateKeyRequestAllow,
/**
* The UpdateKeyRequestDeny model constructor.
* @property {module:model/UpdateKeyRequestDeny}
*/
UpdateKeyRequestDeny,
/**
* The BucketApi service constructor.
* @property {module:api/BucketApi}
*/
BucketApi,
/**
* The KeyApi service constructor.
* @property {module:api/KeyApi}
*/
KeyApi,
/**
* The LayoutApi service constructor.
* @property {module:api/LayoutApi}
*/
LayoutApi,
/**
* The NodesApi service constructor.
* @property {module:api/NodesApi}
*/
NodesApi
};

View file

@ -0,0 +1,71 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The AddKeyRequest model module.
* @module model/AddKeyRequest
* @version v0.8.0
*/
class AddKeyRequest {
/**
* Constructs a new <code>AddKeyRequest</code>.
* @alias module:model/AddKeyRequest
*/
constructor() {
AddKeyRequest.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>AddKeyRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/AddKeyRequest} obj Optional instance to populate.
* @return {module:model/AddKeyRequest} The populated <code>AddKeyRequest</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new AddKeyRequest();
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
}
return obj;
}
}
/**
* @member {String} name
*/
AddKeyRequest.prototype['name'] = undefined;
export default AddKeyRequest;

View file

@ -0,0 +1,79 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The AddNode200ResponseInner model module.
* @module model/AddNode200ResponseInner
* @version v0.8.0
*/
class AddNode200ResponseInner {
/**
* Constructs a new <code>AddNode200ResponseInner</code>.
* @alias module:model/AddNode200ResponseInner
*/
constructor() {
AddNode200ResponseInner.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>AddNode200ResponseInner</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/AddNode200ResponseInner} obj Optional instance to populate.
* @return {module:model/AddNode200ResponseInner} The populated <code>AddNode200ResponseInner</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new AddNode200ResponseInner();
if (data.hasOwnProperty('success')) {
obj['success'] = ApiClient.convertToType(data['success'], 'Boolean');
}
if (data.hasOwnProperty('error')) {
obj['error'] = ApiClient.convertToType(data['error'], 'String');
}
}
return obj;
}
}
/**
* @member {Boolean} success
*/
AddNode200ResponseInner.prototype['success'] = undefined;
/**
* @member {String} error
*/
AddNode200ResponseInner.prototype['error'] = undefined;
export default AddNode200ResponseInner;

View file

@ -0,0 +1,94 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import AllowBucketKeyRequestPermissions from './AllowBucketKeyRequestPermissions';
/**
* The AllowBucketKeyRequest model module.
* @module model/AllowBucketKeyRequest
* @version v0.8.0
*/
class AllowBucketKeyRequest {
/**
* Constructs a new <code>AllowBucketKeyRequest</code>.
* @alias module:model/AllowBucketKeyRequest
* @param bucketId {String}
* @param accessKeyId {String}
* @param permissions {module:model/AllowBucketKeyRequestPermissions}
*/
constructor(bucketId, accessKeyId, permissions) {
AllowBucketKeyRequest.initialize(this, bucketId, accessKeyId, permissions);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, bucketId, accessKeyId, permissions) {
obj['bucketId'] = bucketId;
obj['accessKeyId'] = accessKeyId;
obj['permissions'] = permissions;
}
/**
* Constructs a <code>AllowBucketKeyRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/AllowBucketKeyRequest} obj Optional instance to populate.
* @return {module:model/AllowBucketKeyRequest} The populated <code>AllowBucketKeyRequest</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new AllowBucketKeyRequest();
if (data.hasOwnProperty('bucketId')) {
obj['bucketId'] = ApiClient.convertToType(data['bucketId'], 'String');
}
if (data.hasOwnProperty('accessKeyId')) {
obj['accessKeyId'] = ApiClient.convertToType(data['accessKeyId'], 'String');
}
if (data.hasOwnProperty('permissions')) {
obj['permissions'] = AllowBucketKeyRequestPermissions.constructFromObject(data['permissions']);
}
}
return obj;
}
}
/**
* @member {String} bucketId
*/
AllowBucketKeyRequest.prototype['bucketId'] = undefined;
/**
* @member {String} accessKeyId
*/
AllowBucketKeyRequest.prototype['accessKeyId'] = undefined;
/**
* @member {module:model/AllowBucketKeyRequestPermissions} permissions
*/
AllowBucketKeyRequest.prototype['permissions'] = undefined;
export default AllowBucketKeyRequest;

View file

@ -0,0 +1,93 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The AllowBucketKeyRequestPermissions model module.
* @module model/AllowBucketKeyRequestPermissions
* @version v0.8.0
*/
class AllowBucketKeyRequestPermissions {
/**
* Constructs a new <code>AllowBucketKeyRequestPermissions</code>.
* @alias module:model/AllowBucketKeyRequestPermissions
* @param read {Boolean}
* @param write {Boolean}
* @param owner {Boolean}
*/
constructor(read, write, owner) {
AllowBucketKeyRequestPermissions.initialize(this, read, write, owner);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, read, write, owner) {
obj['read'] = read;
obj['write'] = write;
obj['owner'] = owner;
}
/**
* Constructs a <code>AllowBucketKeyRequestPermissions</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/AllowBucketKeyRequestPermissions} obj Optional instance to populate.
* @return {module:model/AllowBucketKeyRequestPermissions} The populated <code>AllowBucketKeyRequestPermissions</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new AllowBucketKeyRequestPermissions();
if (data.hasOwnProperty('read')) {
obj['read'] = ApiClient.convertToType(data['read'], 'Boolean');
}
if (data.hasOwnProperty('write')) {
obj['write'] = ApiClient.convertToType(data['write'], 'Boolean');
}
if (data.hasOwnProperty('owner')) {
obj['owner'] = ApiClient.convertToType(data['owner'], 'Boolean');
}
}
return obj;
}
}
/**
* @member {Boolean} read
*/
AllowBucketKeyRequestPermissions.prototype['read'] = undefined;
/**
* @member {Boolean} write
*/
AllowBucketKeyRequestPermissions.prototype['write'] = undefined;
/**
* @member {Boolean} owner
*/
AllowBucketKeyRequestPermissions.prototype['owner'] = undefined;
export default AllowBucketKeyRequestPermissions;

View file

@ -0,0 +1,138 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import BucketInfoQuotas from './BucketInfoQuotas';
import BucketInfoWebsiteConfig from './BucketInfoWebsiteConfig';
import BucketKeyInfo from './BucketKeyInfo';
/**
* The BucketInfo model module.
* @module model/BucketInfo
* @version v0.8.0
*/
class BucketInfo {
/**
* Constructs a new <code>BucketInfo</code>.
* @alias module:model/BucketInfo
*/
constructor() {
BucketInfo.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>BucketInfo</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/BucketInfo} obj Optional instance to populate.
* @return {module:model/BucketInfo} The populated <code>BucketInfo</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new BucketInfo();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('globalAliases')) {
obj['globalAliases'] = ApiClient.convertToType(data['globalAliases'], ['String']);
}
if (data.hasOwnProperty('websiteAccess')) {
obj['websiteAccess'] = ApiClient.convertToType(data['websiteAccess'], 'Boolean');
}
if (data.hasOwnProperty('websiteConfig')) {
obj['websiteConfig'] = BucketInfoWebsiteConfig.constructFromObject(data['websiteConfig']);
}
if (data.hasOwnProperty('keys')) {
obj['keys'] = ApiClient.convertToType(data['keys'], [BucketKeyInfo]);
}
if (data.hasOwnProperty('objects')) {
obj['objects'] = ApiClient.convertToType(data['objects'], 'Number');
}
if (data.hasOwnProperty('bytes')) {
obj['bytes'] = ApiClient.convertToType(data['bytes'], 'Number');
}
if (data.hasOwnProperty('unfinishedUploads')) {
obj['unfinishedUploads'] = ApiClient.convertToType(data['unfinishedUploads'], 'Number');
}
if (data.hasOwnProperty('quotas')) {
obj['quotas'] = BucketInfoQuotas.constructFromObject(data['quotas']);
}
}
return obj;
}
}
/**
* @member {String} id
*/
BucketInfo.prototype['id'] = undefined;
/**
* @member {Array.<String>} globalAliases
*/
BucketInfo.prototype['globalAliases'] = undefined;
/**
* @member {Boolean} websiteAccess
*/
BucketInfo.prototype['websiteAccess'] = undefined;
/**
* @member {module:model/BucketInfoWebsiteConfig} websiteConfig
*/
BucketInfo.prototype['websiteConfig'] = undefined;
/**
* @member {Array.<module:model/BucketKeyInfo>} keys
*/
BucketInfo.prototype['keys'] = undefined;
/**
* @member {Number} objects
*/
BucketInfo.prototype['objects'] = undefined;
/**
* @member {Number} bytes
*/
BucketInfo.prototype['bytes'] = undefined;
/**
* @member {Number} unfinishedUploads
*/
BucketInfo.prototype['unfinishedUploads'] = undefined;
/**
* @member {module:model/BucketInfoQuotas} quotas
*/
BucketInfo.prototype['quotas'] = undefined;
export default BucketInfo;

View file

@ -0,0 +1,79 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The BucketInfoQuotas model module.
* @module model/BucketInfoQuotas
* @version v0.8.0
*/
class BucketInfoQuotas {
/**
* Constructs a new <code>BucketInfoQuotas</code>.
* @alias module:model/BucketInfoQuotas
*/
constructor() {
BucketInfoQuotas.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>BucketInfoQuotas</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/BucketInfoQuotas} obj Optional instance to populate.
* @return {module:model/BucketInfoQuotas} The populated <code>BucketInfoQuotas</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new BucketInfoQuotas();
if (data.hasOwnProperty('maxSize')) {
obj['maxSize'] = ApiClient.convertToType(data['maxSize'], 'Number');
}
if (data.hasOwnProperty('maxObjects')) {
obj['maxObjects'] = ApiClient.convertToType(data['maxObjects'], 'Number');
}
}
return obj;
}
}
/**
* @member {Number} maxSize
*/
BucketInfoQuotas.prototype['maxSize'] = undefined;
/**
* @member {Number} maxObjects
*/
BucketInfoQuotas.prototype['maxObjects'] = undefined;
export default BucketInfoQuotas;

View file

@ -0,0 +1,79 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The BucketInfoWebsiteConfig model module.
* @module model/BucketInfoWebsiteConfig
* @version v0.8.0
*/
class BucketInfoWebsiteConfig {
/**
* Constructs a new <code>BucketInfoWebsiteConfig</code>.
* @alias module:model/BucketInfoWebsiteConfig
*/
constructor() {
BucketInfoWebsiteConfig.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>BucketInfoWebsiteConfig</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/BucketInfoWebsiteConfig} obj Optional instance to populate.
* @return {module:model/BucketInfoWebsiteConfig} The populated <code>BucketInfoWebsiteConfig</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new BucketInfoWebsiteConfig();
if (data.hasOwnProperty('indexDocument')) {
obj['indexDocument'] = ApiClient.convertToType(data['indexDocument'], 'String');
}
if (data.hasOwnProperty('errorDocument')) {
obj['errorDocument'] = ApiClient.convertToType(data['errorDocument'], 'String');
}
}
return obj;
}
}
/**
* @member {String} indexDocument
*/
BucketInfoWebsiteConfig.prototype['indexDocument'] = undefined;
/**
* @member {String} errorDocument
*/
BucketInfoWebsiteConfig.prototype['errorDocument'] = undefined;
export default BucketInfoWebsiteConfig;

View file

@ -0,0 +1,96 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import CreateBucketRequestLocalAliasAllow from './CreateBucketRequestLocalAliasAllow';
/**
* The BucketKeyInfo model module.
* @module model/BucketKeyInfo
* @version v0.8.0
*/
class BucketKeyInfo {
/**
* Constructs a new <code>BucketKeyInfo</code>.
* @alias module:model/BucketKeyInfo
*/
constructor() {
BucketKeyInfo.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>BucketKeyInfo</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/BucketKeyInfo} obj Optional instance to populate.
* @return {module:model/BucketKeyInfo} The populated <code>BucketKeyInfo</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new BucketKeyInfo();
if (data.hasOwnProperty('accessKeyId')) {
obj['accessKeyId'] = ApiClient.convertToType(data['accessKeyId'], 'String');
}
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('permissions')) {
obj['permissions'] = CreateBucketRequestLocalAliasAllow.constructFromObject(data['permissions']);
}
if (data.hasOwnProperty('bucketLocalAliases')) {
obj['bucketLocalAliases'] = ApiClient.convertToType(data['bucketLocalAliases'], ['String']);
}
}
return obj;
}
}
/**
* @member {String} accessKeyId
*/
BucketKeyInfo.prototype['accessKeyId'] = undefined;
/**
* @member {String} name
*/
BucketKeyInfo.prototype['name'] = undefined;
/**
* @member {module:model/CreateBucketRequestLocalAliasAllow} permissions
*/
BucketKeyInfo.prototype['permissions'] = undefined;
/**
* @member {Array.<String>} bucketLocalAliases
*/
BucketKeyInfo.prototype['bucketLocalAliases'] = undefined;
export default BucketKeyInfo;

View file

@ -0,0 +1,94 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import NodeClusterInfo from './NodeClusterInfo';
/**
* The ClusterLayout model module.
* @module model/ClusterLayout
* @version v0.8.0
*/
class ClusterLayout {
/**
* Constructs a new <code>ClusterLayout</code>.
* @alias module:model/ClusterLayout
* @param version {Number}
* @param roles {Object.<String, module:model/NodeClusterInfo>}
* @param stagedRoleChanges {Object.<String, module:model/NodeClusterInfo>}
*/
constructor(version, roles, stagedRoleChanges) {
ClusterLayout.initialize(this, version, roles, stagedRoleChanges);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, version, roles, stagedRoleChanges) {
obj['version'] = version;
obj['roles'] = roles;
obj['stagedRoleChanges'] = stagedRoleChanges;
}
/**
* Constructs a <code>ClusterLayout</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ClusterLayout} obj Optional instance to populate.
* @return {module:model/ClusterLayout} The populated <code>ClusterLayout</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ClusterLayout();
if (data.hasOwnProperty('version')) {
obj['version'] = ApiClient.convertToType(data['version'], 'Number');
}
if (data.hasOwnProperty('roles')) {
obj['roles'] = ApiClient.convertToType(data['roles'], {'String': NodeClusterInfo});
}
if (data.hasOwnProperty('stagedRoleChanges')) {
obj['stagedRoleChanges'] = ApiClient.convertToType(data['stagedRoleChanges'], {'String': NodeClusterInfo});
}
}
return obj;
}
}
/**
* @member {Number} version
*/
ClusterLayout.prototype['version'] = undefined;
/**
* @member {Object.<String, module:model/NodeClusterInfo>} roles
*/
ClusterLayout.prototype['roles'] = undefined;
/**
* @member {Object.<String, module:model/NodeClusterInfo>} stagedRoleChanges
*/
ClusterLayout.prototype['stagedRoleChanges'] = undefined;
export default ClusterLayout;

View file

@ -0,0 +1,80 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import CreateBucketRequestLocalAlias from './CreateBucketRequestLocalAlias';
/**
* The CreateBucketRequest model module.
* @module model/CreateBucketRequest
* @version v0.8.0
*/
class CreateBucketRequest {
/**
* Constructs a new <code>CreateBucketRequest</code>.
* @alias module:model/CreateBucketRequest
*/
constructor() {
CreateBucketRequest.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>CreateBucketRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/CreateBucketRequest} obj Optional instance to populate.
* @return {module:model/CreateBucketRequest} The populated <code>CreateBucketRequest</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new CreateBucketRequest();
if (data.hasOwnProperty('globalAlias')) {
obj['globalAlias'] = ApiClient.convertToType(data['globalAlias'], 'String');
}
if (data.hasOwnProperty('localAlias')) {
obj['localAlias'] = CreateBucketRequestLocalAlias.constructFromObject(data['localAlias']);
}
}
return obj;
}
}
/**
* @member {String} globalAlias
*/
CreateBucketRequest.prototype['globalAlias'] = undefined;
/**
* @member {module:model/CreateBucketRequestLocalAlias} localAlias
*/
CreateBucketRequest.prototype['localAlias'] = undefined;
export default CreateBucketRequest;

View file

@ -0,0 +1,88 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import CreateBucketRequestLocalAliasAllow from './CreateBucketRequestLocalAliasAllow';
/**
* The CreateBucketRequestLocalAlias model module.
* @module model/CreateBucketRequestLocalAlias
* @version v0.8.0
*/
class CreateBucketRequestLocalAlias {
/**
* Constructs a new <code>CreateBucketRequestLocalAlias</code>.
* @alias module:model/CreateBucketRequestLocalAlias
*/
constructor() {
CreateBucketRequestLocalAlias.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>CreateBucketRequestLocalAlias</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/CreateBucketRequestLocalAlias} obj Optional instance to populate.
* @return {module:model/CreateBucketRequestLocalAlias} The populated <code>CreateBucketRequestLocalAlias</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new CreateBucketRequestLocalAlias();
if (data.hasOwnProperty('accessKeyId')) {
obj['accessKeyId'] = ApiClient.convertToType(data['accessKeyId'], 'String');
}
if (data.hasOwnProperty('alias')) {
obj['alias'] = ApiClient.convertToType(data['alias'], 'String');
}
if (data.hasOwnProperty('allow')) {
obj['allow'] = CreateBucketRequestLocalAliasAllow.constructFromObject(data['allow']);
}
}
return obj;
}
}
/**
* @member {String} accessKeyId
*/
CreateBucketRequestLocalAlias.prototype['accessKeyId'] = undefined;
/**
* @member {String} alias
*/
CreateBucketRequestLocalAlias.prototype['alias'] = undefined;
/**
* @member {module:model/CreateBucketRequestLocalAliasAllow} allow
*/
CreateBucketRequestLocalAlias.prototype['allow'] = undefined;
export default CreateBucketRequestLocalAlias;

View file

@ -0,0 +1,87 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The CreateBucketRequestLocalAliasAllow model module.
* @module model/CreateBucketRequestLocalAliasAllow
* @version v0.8.0
*/
class CreateBucketRequestLocalAliasAllow {
/**
* Constructs a new <code>CreateBucketRequestLocalAliasAllow</code>.
* @alias module:model/CreateBucketRequestLocalAliasAllow
*/
constructor() {
CreateBucketRequestLocalAliasAllow.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>CreateBucketRequestLocalAliasAllow</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/CreateBucketRequestLocalAliasAllow} obj Optional instance to populate.
* @return {module:model/CreateBucketRequestLocalAliasAllow} The populated <code>CreateBucketRequestLocalAliasAllow</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new CreateBucketRequestLocalAliasAllow();
if (data.hasOwnProperty('read')) {
obj['read'] = ApiClient.convertToType(data['read'], 'Boolean');
}
if (data.hasOwnProperty('write')) {
obj['write'] = ApiClient.convertToType(data['write'], 'Boolean');
}
if (data.hasOwnProperty('owner')) {
obj['owner'] = ApiClient.convertToType(data['owner'], 'Boolean');
}
}
return obj;
}
}
/**
* @member {Boolean} read
*/
CreateBucketRequestLocalAliasAllow.prototype['read'] = undefined;
/**
* @member {Boolean} write
*/
CreateBucketRequestLocalAliasAllow.prototype['write'] = undefined;
/**
* @member {Boolean} owner
*/
CreateBucketRequestLocalAliasAllow.prototype['owner'] = undefined;
export default CreateBucketRequestLocalAliasAllow;

View file

@ -0,0 +1,105 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import ClusterLayout from './ClusterLayout';
import NodeNetworkInfo from './NodeNetworkInfo';
/**
* The GetNodes200Response model module.
* @module model/GetNodes200Response
* @version v0.8.0
*/
class GetNodes200Response {
/**
* Constructs a new <code>GetNodes200Response</code>.
* @alias module:model/GetNodes200Response
* @param node {String}
* @param garageVersion {String}
* @param knownNodes {Object.<String, module:model/NodeNetworkInfo>}
* @param layout {module:model/ClusterLayout}
*/
constructor(node, garageVersion, knownNodes, layout) {
GetNodes200Response.initialize(this, node, garageVersion, knownNodes, layout);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, node, garageVersion, knownNodes, layout) {
obj['node'] = node;
obj['garageVersion'] = garageVersion;
obj['knownNodes'] = knownNodes;
obj['layout'] = layout;
}
/**
* Constructs a <code>GetNodes200Response</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/GetNodes200Response} obj Optional instance to populate.
* @return {module:model/GetNodes200Response} The populated <code>GetNodes200Response</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new GetNodes200Response();
if (data.hasOwnProperty('node')) {
obj['node'] = ApiClient.convertToType(data['node'], 'String');
}
if (data.hasOwnProperty('garageVersion')) {
obj['garageVersion'] = ApiClient.convertToType(data['garageVersion'], 'String');
}
if (data.hasOwnProperty('knownNodes')) {
obj['knownNodes'] = ApiClient.convertToType(data['knownNodes'], {'String': NodeNetworkInfo});
}
if (data.hasOwnProperty('layout')) {
obj['layout'] = ClusterLayout.constructFromObject(data['layout']);
}
}
return obj;
}
}
/**
* @member {String} node
*/
GetNodes200Response.prototype['node'] = undefined;
/**
* @member {String} garageVersion
*/
GetNodes200Response.prototype['garageVersion'] = undefined;
/**
* @member {Object.<String, module:model/NodeNetworkInfo>} knownNodes
*/
GetNodes200Response.prototype['knownNodes'] = undefined;
/**
* @member {module:model/ClusterLayout} layout
*/
GetNodes200Response.prototype['layout'] = undefined;
export default GetNodes200Response;

View file

@ -0,0 +1,93 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The ImportKeyRequest model module.
* @module model/ImportKeyRequest
* @version v0.8.0
*/
class ImportKeyRequest {
/**
* Constructs a new <code>ImportKeyRequest</code>.
* @alias module:model/ImportKeyRequest
* @param name {String}
* @param accessKeyId {String}
* @param secretAccessKey {String}
*/
constructor(name, accessKeyId, secretAccessKey) {
ImportKeyRequest.initialize(this, name, accessKeyId, secretAccessKey);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, name, accessKeyId, secretAccessKey) {
obj['name'] = name;
obj['accessKeyId'] = accessKeyId;
obj['secretAccessKey'] = secretAccessKey;
}
/**
* Constructs a <code>ImportKeyRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ImportKeyRequest} obj Optional instance to populate.
* @return {module:model/ImportKeyRequest} The populated <code>ImportKeyRequest</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ImportKeyRequest();
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('accessKeyId')) {
obj['accessKeyId'] = ApiClient.convertToType(data['accessKeyId'], 'String');
}
if (data.hasOwnProperty('secretAccessKey')) {
obj['secretAccessKey'] = ApiClient.convertToType(data['secretAccessKey'], 'String');
}
}
return obj;
}
}
/**
* @member {String} name
*/
ImportKeyRequest.prototype['name'] = undefined;
/**
* @member {String} accessKeyId
*/
ImportKeyRequest.prototype['accessKeyId'] = undefined;
/**
* @member {String} secretAccessKey
*/
ImportKeyRequest.prototype['secretAccessKey'] = undefined;
export default ImportKeyRequest;

View file

@ -0,0 +1,105 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import KeyInfoBucketsInner from './KeyInfoBucketsInner';
import KeyInfoPermissions from './KeyInfoPermissions';
/**
* The KeyInfo model module.
* @module model/KeyInfo
* @version v0.8.0
*/
class KeyInfo {
/**
* Constructs a new <code>KeyInfo</code>.
* @alias module:model/KeyInfo
*/
constructor() {
KeyInfo.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>KeyInfo</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/KeyInfo} obj Optional instance to populate.
* @return {module:model/KeyInfo} The populated <code>KeyInfo</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new KeyInfo();
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('accessKeyId')) {
obj['accessKeyId'] = ApiClient.convertToType(data['accessKeyId'], 'String');
}
if (data.hasOwnProperty('secretAccessKey')) {
obj['secretAccessKey'] = ApiClient.convertToType(data['secretAccessKey'], 'String');
}
if (data.hasOwnProperty('permissions')) {
obj['permissions'] = KeyInfoPermissions.constructFromObject(data['permissions']);
}
if (data.hasOwnProperty('buckets')) {
obj['buckets'] = ApiClient.convertToType(data['buckets'], [KeyInfoBucketsInner]);
}
}
return obj;
}
}
/**
* @member {String} name
*/
KeyInfo.prototype['name'] = undefined;
/**
* @member {String} accessKeyId
*/
KeyInfo.prototype['accessKeyId'] = undefined;
/**
* @member {String} secretAccessKey
*/
KeyInfo.prototype['secretAccessKey'] = undefined;
/**
* @member {module:model/KeyInfoPermissions} permissions
*/
KeyInfo.prototype['permissions'] = undefined;
/**
* @member {Array.<module:model/KeyInfoBucketsInner>} buckets
*/
KeyInfo.prototype['buckets'] = undefined;
export default KeyInfo;

View file

@ -0,0 +1,96 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import KeyInfoBucketsInnerPermissions from './KeyInfoBucketsInnerPermissions';
/**
* The KeyInfoBucketsInner model module.
* @module model/KeyInfoBucketsInner
* @version v0.8.0
*/
class KeyInfoBucketsInner {
/**
* Constructs a new <code>KeyInfoBucketsInner</code>.
* @alias module:model/KeyInfoBucketsInner
*/
constructor() {
KeyInfoBucketsInner.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>KeyInfoBucketsInner</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/KeyInfoBucketsInner} obj Optional instance to populate.
* @return {module:model/KeyInfoBucketsInner} The populated <code>KeyInfoBucketsInner</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new KeyInfoBucketsInner();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('globalAliases')) {
obj['globalAliases'] = ApiClient.convertToType(data['globalAliases'], ['String']);
}
if (data.hasOwnProperty('localAliases')) {
obj['localAliases'] = ApiClient.convertToType(data['localAliases'], ['String']);
}
if (data.hasOwnProperty('permissions')) {
obj['permissions'] = KeyInfoBucketsInnerPermissions.constructFromObject(data['permissions']);
}
}
return obj;
}
}
/**
* @member {String} id
*/
KeyInfoBucketsInner.prototype['id'] = undefined;
/**
* @member {Array.<String>} globalAliases
*/
KeyInfoBucketsInner.prototype['globalAliases'] = undefined;
/**
* @member {Array.<String>} localAliases
*/
KeyInfoBucketsInner.prototype['localAliases'] = undefined;
/**
* @member {module:model/KeyInfoBucketsInnerPermissions} permissions
*/
KeyInfoBucketsInner.prototype['permissions'] = undefined;
export default KeyInfoBucketsInner;

View file

@ -0,0 +1,87 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The KeyInfoBucketsInnerPermissions model module.
* @module model/KeyInfoBucketsInnerPermissions
* @version v0.8.0
*/
class KeyInfoBucketsInnerPermissions {
/**
* Constructs a new <code>KeyInfoBucketsInnerPermissions</code>.
* @alias module:model/KeyInfoBucketsInnerPermissions
*/
constructor() {
KeyInfoBucketsInnerPermissions.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>KeyInfoBucketsInnerPermissions</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/KeyInfoBucketsInnerPermissions} obj Optional instance to populate.
* @return {module:model/KeyInfoBucketsInnerPermissions} The populated <code>KeyInfoBucketsInnerPermissions</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new KeyInfoBucketsInnerPermissions();
if (data.hasOwnProperty('read')) {
obj['read'] = ApiClient.convertToType(data['read'], 'Boolean');
}
if (data.hasOwnProperty('write')) {
obj['write'] = ApiClient.convertToType(data['write'], 'Boolean');
}
if (data.hasOwnProperty('owner')) {
obj['owner'] = ApiClient.convertToType(data['owner'], 'Boolean');
}
}
return obj;
}
}
/**
* @member {Boolean} read
*/
KeyInfoBucketsInnerPermissions.prototype['read'] = undefined;
/**
* @member {Boolean} write
*/
KeyInfoBucketsInnerPermissions.prototype['write'] = undefined;
/**
* @member {Boolean} owner
*/
KeyInfoBucketsInnerPermissions.prototype['owner'] = undefined;
export default KeyInfoBucketsInnerPermissions;

View file

@ -0,0 +1,71 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The KeyInfoPermissions model module.
* @module model/KeyInfoPermissions
* @version v0.8.0
*/
class KeyInfoPermissions {
/**
* Constructs a new <code>KeyInfoPermissions</code>.
* @alias module:model/KeyInfoPermissions
*/
constructor() {
KeyInfoPermissions.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>KeyInfoPermissions</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/KeyInfoPermissions} obj Optional instance to populate.
* @return {module:model/KeyInfoPermissions} The populated <code>KeyInfoPermissions</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new KeyInfoPermissions();
if (data.hasOwnProperty('createBucket')) {
obj['createBucket'] = ApiClient.convertToType(data['createBucket'], 'Boolean');
}
}
return obj;
}
}
/**
* @member {Boolean} createBucket
*/
KeyInfoPermissions.prototype['createBucket'] = undefined;
export default KeyInfoPermissions;

View file

@ -0,0 +1,71 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The LayoutVersion model module.
* @module model/LayoutVersion
* @version v0.8.0
*/
class LayoutVersion {
/**
* Constructs a new <code>LayoutVersion</code>.
* @alias module:model/LayoutVersion
*/
constructor() {
LayoutVersion.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>LayoutVersion</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/LayoutVersion} obj Optional instance to populate.
* @return {module:model/LayoutVersion} The populated <code>LayoutVersion</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new LayoutVersion();
if (data.hasOwnProperty('version')) {
obj['version'] = ApiClient.convertToType(data['version'], 'Number');
}
}
return obj;
}
}
/**
* @member {Number} version
*/
LayoutVersion.prototype['version'] = undefined;
export default LayoutVersion;

View file

@ -0,0 +1,90 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import ListBuckets200ResponseInnerLocalAliasesInner from './ListBuckets200ResponseInnerLocalAliasesInner';
/**
* The ListBuckets200ResponseInner model module.
* @module model/ListBuckets200ResponseInner
* @version v0.8.0
*/
class ListBuckets200ResponseInner {
/**
* Constructs a new <code>ListBuckets200ResponseInner</code>.
* @alias module:model/ListBuckets200ResponseInner
* @param id {String}
*/
constructor(id) {
ListBuckets200ResponseInner.initialize(this, id);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, id) {
obj['id'] = id;
}
/**
* Constructs a <code>ListBuckets200ResponseInner</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ListBuckets200ResponseInner} obj Optional instance to populate.
* @return {module:model/ListBuckets200ResponseInner} The populated <code>ListBuckets200ResponseInner</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ListBuckets200ResponseInner();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('globalAliases')) {
obj['globalAliases'] = ApiClient.convertToType(data['globalAliases'], ['String']);
}
if (data.hasOwnProperty('localAliases')) {
obj['localAliases'] = ApiClient.convertToType(data['localAliases'], [ListBuckets200ResponseInnerLocalAliasesInner]);
}
}
return obj;
}
}
/**
* @member {String} id
*/
ListBuckets200ResponseInner.prototype['id'] = undefined;
/**
* @member {Array.<String>} globalAliases
*/
ListBuckets200ResponseInner.prototype['globalAliases'] = undefined;
/**
* @member {Array.<module:model/ListBuckets200ResponseInnerLocalAliasesInner>} localAliases
*/
ListBuckets200ResponseInner.prototype['localAliases'] = undefined;
export default ListBuckets200ResponseInner;

View file

@ -0,0 +1,83 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The ListBuckets200ResponseInnerLocalAliasesInner model module.
* @module model/ListBuckets200ResponseInnerLocalAliasesInner
* @version v0.8.0
*/
class ListBuckets200ResponseInnerLocalAliasesInner {
/**
* Constructs a new <code>ListBuckets200ResponseInnerLocalAliasesInner</code>.
* @alias module:model/ListBuckets200ResponseInnerLocalAliasesInner
* @param alias {String}
* @param accessKeyId {String}
*/
constructor(alias, accessKeyId) {
ListBuckets200ResponseInnerLocalAliasesInner.initialize(this, alias, accessKeyId);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, alias, accessKeyId) {
obj['alias'] = alias;
obj['accessKeyId'] = accessKeyId;
}
/**
* Constructs a <code>ListBuckets200ResponseInnerLocalAliasesInner</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ListBuckets200ResponseInnerLocalAliasesInner} obj Optional instance to populate.
* @return {module:model/ListBuckets200ResponseInnerLocalAliasesInner} The populated <code>ListBuckets200ResponseInnerLocalAliasesInner</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ListBuckets200ResponseInnerLocalAliasesInner();
if (data.hasOwnProperty('alias')) {
obj['alias'] = ApiClient.convertToType(data['alias'], 'String');
}
if (data.hasOwnProperty('accessKeyId')) {
obj['accessKeyId'] = ApiClient.convertToType(data['accessKeyId'], 'String');
}
}
return obj;
}
}
/**
* @member {String} alias
*/
ListBuckets200ResponseInnerLocalAliasesInner.prototype['alias'] = undefined;
/**
* @member {String} accessKeyId
*/
ListBuckets200ResponseInnerLocalAliasesInner.prototype['accessKeyId'] = undefined;
export default ListBuckets200ResponseInnerLocalAliasesInner;

View file

@ -0,0 +1,81 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The ListKeys200ResponseInner model module.
* @module model/ListKeys200ResponseInner
* @version v0.8.0
*/
class ListKeys200ResponseInner {
/**
* Constructs a new <code>ListKeys200ResponseInner</code>.
* @alias module:model/ListKeys200ResponseInner
* @param id {String}
*/
constructor(id) {
ListKeys200ResponseInner.initialize(this, id);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, id) {
obj['id'] = id;
}
/**
* Constructs a <code>ListKeys200ResponseInner</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ListKeys200ResponseInner} obj Optional instance to populate.
* @return {module:model/ListKeys200ResponseInner} The populated <code>ListKeys200ResponseInner</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ListKeys200ResponseInner();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
}
return obj;
}
}
/**
* @member {String} id
*/
ListKeys200ResponseInner.prototype['id'] = undefined;
/**
* @member {String} name
*/
ListKeys200ResponseInner.prototype['name'] = undefined;
export default ListKeys200ResponseInner;

View file

@ -0,0 +1,94 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The NodeClusterInfo model module.
* @module model/NodeClusterInfo
* @version v0.8.0
*/
class NodeClusterInfo {
/**
* Constructs a new <code>NodeClusterInfo</code>.
* @alias module:model/NodeClusterInfo
* @param zone {String}
* @param capacity {Number}
* @param tags {Array.<String>} User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage
*/
constructor(zone, capacity, tags) {
NodeClusterInfo.initialize(this, zone, capacity, tags);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, zone, capacity, tags) {
obj['zone'] = zone;
obj['capacity'] = capacity;
obj['tags'] = tags;
}
/**
* Constructs a <code>NodeClusterInfo</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/NodeClusterInfo} obj Optional instance to populate.
* @return {module:model/NodeClusterInfo} The populated <code>NodeClusterInfo</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new NodeClusterInfo();
if (data.hasOwnProperty('zone')) {
obj['zone'] = ApiClient.convertToType(data['zone'], 'String');
}
if (data.hasOwnProperty('capacity')) {
obj['capacity'] = ApiClient.convertToType(data['capacity'], 'Number');
}
if (data.hasOwnProperty('tags')) {
obj['tags'] = ApiClient.convertToType(data['tags'], ['String']);
}
}
return obj;
}
}
/**
* @member {String} zone
*/
NodeClusterInfo.prototype['zone'] = undefined;
/**
* @member {Number} capacity
*/
NodeClusterInfo.prototype['capacity'] = undefined;
/**
* User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage
* @member {Array.<String>} tags
*/
NodeClusterInfo.prototype['tags'] = undefined;
export default NodeClusterInfo;

View file

@ -0,0 +1,103 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The NodeNetworkInfo model module.
* @module model/NodeNetworkInfo
* @version v0.8.0
*/
class NodeNetworkInfo {
/**
* Constructs a new <code>NodeNetworkInfo</code>.
* @alias module:model/NodeNetworkInfo
* @param addr {String}
* @param isUp {Boolean}
* @param lastSeenSecsAgo {Number}
* @param hostname {String}
*/
constructor(addr, isUp, lastSeenSecsAgo, hostname) {
NodeNetworkInfo.initialize(this, addr, isUp, lastSeenSecsAgo, hostname);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, addr, isUp, lastSeenSecsAgo, hostname) {
obj['addr'] = addr;
obj['is_up'] = isUp;
obj['last_seen_secs_ago'] = lastSeenSecsAgo;
obj['hostname'] = hostname;
}
/**
* Constructs a <code>NodeNetworkInfo</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/NodeNetworkInfo} obj Optional instance to populate.
* @return {module:model/NodeNetworkInfo} The populated <code>NodeNetworkInfo</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new NodeNetworkInfo();
if (data.hasOwnProperty('addr')) {
obj['addr'] = ApiClient.convertToType(data['addr'], 'String');
}
if (data.hasOwnProperty('is_up')) {
obj['is_up'] = ApiClient.convertToType(data['is_up'], 'Boolean');
}
if (data.hasOwnProperty('last_seen_secs_ago')) {
obj['last_seen_secs_ago'] = ApiClient.convertToType(data['last_seen_secs_ago'], 'Number');
}
if (data.hasOwnProperty('hostname')) {
obj['hostname'] = ApiClient.convertToType(data['hostname'], 'String');
}
}
return obj;
}
}
/**
* @member {String} addr
*/
NodeNetworkInfo.prototype['addr'] = undefined;
/**
* @member {Boolean} is_up
*/
NodeNetworkInfo.prototype['is_up'] = undefined;
/**
* @member {Number} last_seen_secs_ago
*/
NodeNetworkInfo.prototype['last_seen_secs_ago'] = undefined;
/**
* @member {String} hostname
*/
NodeNetworkInfo.prototype['hostname'] = undefined;
export default NodeNetworkInfo;

View file

@ -0,0 +1,81 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import UpdateBucketRequestQuotas from './UpdateBucketRequestQuotas';
import UpdateBucketRequestWebsiteAccess from './UpdateBucketRequestWebsiteAccess';
/**
* The UpdateBucketRequest model module.
* @module model/UpdateBucketRequest
* @version v0.8.0
*/
class UpdateBucketRequest {
/**
* Constructs a new <code>UpdateBucketRequest</code>.
* @alias module:model/UpdateBucketRequest
*/
constructor() {
UpdateBucketRequest.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>UpdateBucketRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/UpdateBucketRequest} obj Optional instance to populate.
* @return {module:model/UpdateBucketRequest} The populated <code>UpdateBucketRequest</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new UpdateBucketRequest();
if (data.hasOwnProperty('websiteAccess')) {
obj['websiteAccess'] = UpdateBucketRequestWebsiteAccess.constructFromObject(data['websiteAccess']);
}
if (data.hasOwnProperty('quotas')) {
obj['quotas'] = UpdateBucketRequestQuotas.constructFromObject(data['quotas']);
}
}
return obj;
}
}
/**
* @member {module:model/UpdateBucketRequestWebsiteAccess} websiteAccess
*/
UpdateBucketRequest.prototype['websiteAccess'] = undefined;
/**
* @member {module:model/UpdateBucketRequestQuotas} quotas
*/
UpdateBucketRequest.prototype['quotas'] = undefined;
export default UpdateBucketRequest;

View file

@ -0,0 +1,79 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The UpdateBucketRequestQuotas model module.
* @module model/UpdateBucketRequestQuotas
* @version v0.8.0
*/
class UpdateBucketRequestQuotas {
/**
* Constructs a new <code>UpdateBucketRequestQuotas</code>.
* @alias module:model/UpdateBucketRequestQuotas
*/
constructor() {
UpdateBucketRequestQuotas.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>UpdateBucketRequestQuotas</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/UpdateBucketRequestQuotas} obj Optional instance to populate.
* @return {module:model/UpdateBucketRequestQuotas} The populated <code>UpdateBucketRequestQuotas</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new UpdateBucketRequestQuotas();
if (data.hasOwnProperty('maxSize')) {
obj['maxSize'] = ApiClient.convertToType(data['maxSize'], 'Number');
}
if (data.hasOwnProperty('maxObjects')) {
obj['maxObjects'] = ApiClient.convertToType(data['maxObjects'], 'Number');
}
}
return obj;
}
}
/**
* @member {Number} maxSize
*/
UpdateBucketRequestQuotas.prototype['maxSize'] = undefined;
/**
* @member {Number} maxObjects
*/
UpdateBucketRequestQuotas.prototype['maxObjects'] = undefined;
export default UpdateBucketRequestQuotas;

View file

@ -0,0 +1,87 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The UpdateBucketRequestWebsiteAccess model module.
* @module model/UpdateBucketRequestWebsiteAccess
* @version v0.8.0
*/
class UpdateBucketRequestWebsiteAccess {
/**
* Constructs a new <code>UpdateBucketRequestWebsiteAccess</code>.
* @alias module:model/UpdateBucketRequestWebsiteAccess
*/
constructor() {
UpdateBucketRequestWebsiteAccess.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>UpdateBucketRequestWebsiteAccess</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/UpdateBucketRequestWebsiteAccess} obj Optional instance to populate.
* @return {module:model/UpdateBucketRequestWebsiteAccess} The populated <code>UpdateBucketRequestWebsiteAccess</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new UpdateBucketRequestWebsiteAccess();
if (data.hasOwnProperty('enabled')) {
obj['enabled'] = ApiClient.convertToType(data['enabled'], 'Boolean');
}
if (data.hasOwnProperty('indexDocument')) {
obj['indexDocument'] = ApiClient.convertToType(data['indexDocument'], 'String');
}
if (data.hasOwnProperty('errorDocument')) {
obj['errorDocument'] = ApiClient.convertToType(data['errorDocument'], 'String');
}
}
return obj;
}
}
/**
* @member {Boolean} enabled
*/
UpdateBucketRequestWebsiteAccess.prototype['enabled'] = undefined;
/**
* @member {String} indexDocument
*/
UpdateBucketRequestWebsiteAccess.prototype['indexDocument'] = undefined;
/**
* @member {String} errorDocument
*/
UpdateBucketRequestWebsiteAccess.prototype['errorDocument'] = undefined;
export default UpdateBucketRequestWebsiteAccess;

View file

@ -0,0 +1,89 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import UpdateKeyRequestAllow from './UpdateKeyRequestAllow';
import UpdateKeyRequestDeny from './UpdateKeyRequestDeny';
/**
* The UpdateKeyRequest model module.
* @module model/UpdateKeyRequest
* @version v0.8.0
*/
class UpdateKeyRequest {
/**
* Constructs a new <code>UpdateKeyRequest</code>.
* @alias module:model/UpdateKeyRequest
*/
constructor() {
UpdateKeyRequest.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>UpdateKeyRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/UpdateKeyRequest} obj Optional instance to populate.
* @return {module:model/UpdateKeyRequest} The populated <code>UpdateKeyRequest</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new UpdateKeyRequest();
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('allow')) {
obj['allow'] = UpdateKeyRequestAllow.constructFromObject(data['allow']);
}
if (data.hasOwnProperty('deny')) {
obj['deny'] = UpdateKeyRequestDeny.constructFromObject(data['deny']);
}
}
return obj;
}
}
/**
* @member {String} name
*/
UpdateKeyRequest.prototype['name'] = undefined;
/**
* @member {module:model/UpdateKeyRequestAllow} allow
*/
UpdateKeyRequest.prototype['allow'] = undefined;
/**
* @member {module:model/UpdateKeyRequestDeny} deny
*/
UpdateKeyRequest.prototype['deny'] = undefined;
export default UpdateKeyRequest;

View file

@ -0,0 +1,71 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The UpdateKeyRequestAllow model module.
* @module model/UpdateKeyRequestAllow
* @version v0.8.0
*/
class UpdateKeyRequestAllow {
/**
* Constructs a new <code>UpdateKeyRequestAllow</code>.
* @alias module:model/UpdateKeyRequestAllow
*/
constructor() {
UpdateKeyRequestAllow.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>UpdateKeyRequestAllow</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/UpdateKeyRequestAllow} obj Optional instance to populate.
* @return {module:model/UpdateKeyRequestAllow} The populated <code>UpdateKeyRequestAllow</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new UpdateKeyRequestAllow();
if (data.hasOwnProperty('createBucket')) {
obj['createBucket'] = ApiClient.convertToType(data['createBucket'], 'Boolean');
}
}
return obj;
}
}
/**
* @member {Boolean} createBucket
*/
UpdateKeyRequestAllow.prototype['createBucket'] = undefined;
export default UpdateKeyRequestAllow;

View file

@ -0,0 +1,71 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The UpdateKeyRequestDeny model module.
* @module model/UpdateKeyRequestDeny
* @version v0.8.0
*/
class UpdateKeyRequestDeny {
/**
* Constructs a new <code>UpdateKeyRequestDeny</code>.
* @alias module:model/UpdateKeyRequestDeny
*/
constructor() {
UpdateKeyRequestDeny.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>UpdateKeyRequestDeny</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/UpdateKeyRequestDeny} obj Optional instance to populate.
* @return {module:model/UpdateKeyRequestDeny} The populated <code>UpdateKeyRequestDeny</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new UpdateKeyRequestDeny();
if (data.hasOwnProperty('createBucket')) {
obj['createBucket'] = ApiClient.convertToType(data['createBucket'], 'Boolean');
}
}
return obj;
}
}
/**
* @member {Boolean} createBucket
*/
UpdateKeyRequestDeny.prototype['createBucket'] = undefined;
export default UpdateKeyRequestDeny;

View file

@ -0,0 +1,173 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.BucketApi();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('BucketApi', function() {
describe('allowBucketKey', function() {
it('should call allowBucketKey successfully', function(done) {
//uncomment below and update the code to test allowBucketKey
//instance.allowBucketKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('createBucket', function() {
it('should call createBucket successfully', function(done) {
//uncomment below and update the code to test createBucket
//instance.createBucket(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('deleteBucket', function() {
it('should call deleteBucket successfully', function(done) {
//uncomment below and update the code to test deleteBucket
//instance.deleteBucket(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('deleteBucketGlobalAlias', function() {
it('should call deleteBucketGlobalAlias successfully', function(done) {
//uncomment below and update the code to test deleteBucketGlobalAlias
//instance.deleteBucketGlobalAlias(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('deleteBucketLocalAlias', function() {
it('should call deleteBucketLocalAlias successfully', function(done) {
//uncomment below and update the code to test deleteBucketLocalAlias
//instance.deleteBucketLocalAlias(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('denyBucketKey', function() {
it('should call denyBucketKey successfully', function(done) {
//uncomment below and update the code to test denyBucketKey
//instance.denyBucketKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('findBucketInfo', function() {
it('should call findBucketInfo successfully', function(done) {
//uncomment below and update the code to test findBucketInfo
//instance.findBucketInfo(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('getBucketInfo', function() {
it('should call getBucketInfo successfully', function(done) {
//uncomment below and update the code to test getBucketInfo
//instance.getBucketInfo(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('listBuckets', function() {
it('should call listBuckets successfully', function(done) {
//uncomment below and update the code to test listBuckets
//instance.listBuckets(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('putBucketGlobalAlias', function() {
it('should call putBucketGlobalAlias successfully', function(done) {
//uncomment below and update the code to test putBucketGlobalAlias
//instance.putBucketGlobalAlias(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('putBucketLocalAlias', function() {
it('should call putBucketLocalAlias successfully', function(done) {
//uncomment below and update the code to test putBucketLocalAlias
//instance.putBucketLocalAlias(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('updateBucket', function() {
it('should call updateBucket successfully', function(done) {
//uncomment below and update the code to test updateBucket
//instance.updateBucket(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
});
}));

View file

@ -0,0 +1,123 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.KeyApi();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('KeyApi', function() {
describe('addKey', function() {
it('should call addKey successfully', function(done) {
//uncomment below and update the code to test addKey
//instance.addKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('deleteKey', function() {
it('should call deleteKey successfully', function(done) {
//uncomment below and update the code to test deleteKey
//instance.deleteKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('getKey', function() {
it('should call getKey successfully', function(done) {
//uncomment below and update the code to test getKey
//instance.getKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('importKey', function() {
it('should call importKey successfully', function(done) {
//uncomment below and update the code to test importKey
//instance.importKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('listKeys', function() {
it('should call listKeys successfully', function(done) {
//uncomment below and update the code to test listKeys
//instance.listKeys(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('searchKey', function() {
it('should call searchKey successfully', function(done) {
//uncomment below and update the code to test searchKey
//instance.searchKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('updateKey', function() {
it('should call updateKey successfully', function(done) {
//uncomment below and update the code to test updateKey
//instance.updateKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
});
}));

View file

@ -0,0 +1,93 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.LayoutApi();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('LayoutApi', function() {
describe('addLayout', function() {
it('should call addLayout successfully', function(done) {
//uncomment below and update the code to test addLayout
//instance.addLayout(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('applyLayout', function() {
it('should call applyLayout successfully', function(done) {
//uncomment below and update the code to test applyLayout
//instance.applyLayout(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('getLayout', function() {
it('should call getLayout successfully', function(done) {
//uncomment below and update the code to test getLayout
//instance.getLayout(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('revertLayout', function() {
it('should call revertLayout successfully', function(done) {
//uncomment below and update the code to test revertLayout
//instance.revertLayout(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
});
}));

View file

@ -0,0 +1,73 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.NodesApi();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('NodesApi', function() {
describe('addNode', function() {
it('should call addNode successfully', function(done) {
//uncomment below and update the code to test addNode
//instance.addNode(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('getNodes', function() {
it('should call getNodes successfully', function(done) {
//uncomment below and update the code to test getNodes
//instance.getNodes(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
});
}));

View file

@ -0,0 +1,65 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.AddKeyRequest();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('AddKeyRequest', function() {
it('should create an instance of AddKeyRequest', function() {
// uncomment below and update the code to test AddKeyRequest
//var instance = new GarageAdministrationApiV0garageV080.AddKeyRequest();
//expect(instance).to.be.a(GarageAdministrationApiV0garageV080.AddKeyRequest);
});
it('should have the property name (base name: "name")', function() {
// uncomment below and update the code to test the property name
//var instance = new GarageAdministrationApiV0garageV080.AddKeyRequest();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,71 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.AddNode200ResponseInner();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('AddNode200ResponseInner', function() {
it('should create an instance of AddNode200ResponseInner', function() {
// uncomment below and update the code to test AddNode200ResponseInner
//var instance = new GarageAdministrationApiV0garageV080.AddNode200ResponseInner();
//expect(instance).to.be.a(GarageAdministrationApiV0garageV080.AddNode200ResponseInner);
});
it('should have the property success (base name: "success")', function() {
// uncomment below and update the code to test the property success
//var instance = new GarageAdministrationApiV0garageV080.AddNode200ResponseInner();
//expect(instance).to.be();
});
it('should have the property error (base name: "error")', function() {
// uncomment below and update the code to test the property error
//var instance = new GarageAdministrationApiV0garageV080.AddNode200ResponseInner();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,77 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequest();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('AllowBucketKeyRequest', function() {
it('should create an instance of AllowBucketKeyRequest', function() {
// uncomment below and update the code to test AllowBucketKeyRequest
//var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequest();
//expect(instance).to.be.a(GarageAdministrationApiV0garageV080.AllowBucketKeyRequest);
});
it('should have the property bucketId (base name: "bucketId")', function() {
// uncomment below and update the code to test the property bucketId
//var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequest();
//expect(instance).to.be();
});
it('should have the property accessKeyId (base name: "accessKeyId")', function() {
// uncomment below and update the code to test the property accessKeyId
//var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequest();
//expect(instance).to.be();
});
it('should have the property permissions (base name: "permissions")', function() {
// uncomment below and update the code to test the property permissions
//var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequest();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,77 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequestPermissions();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('AllowBucketKeyRequestPermissions', function() {
it('should create an instance of AllowBucketKeyRequestPermissions', function() {
// uncomment below and update the code to test AllowBucketKeyRequestPermissions
//var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequestPermissions();
//expect(instance).to.be.a(GarageAdministrationApiV0garageV080.AllowBucketKeyRequestPermissions);
});
it('should have the property read (base name: "read")', function() {
// uncomment below and update the code to test the property read
//var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequestPermissions();
//expect(instance).to.be();
});
it('should have the property write (base name: "write")', function() {
// uncomment below and update the code to test the property write
//var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequestPermissions();
//expect(instance).to.be();
});
it('should have the property owner (base name: "owner")', function() {
// uncomment below and update the code to test the property owner
//var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequestPermissions();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,113 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.BucketInfo();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('BucketInfo', function() {
it('should create an instance of BucketInfo', function() {
// uncomment below and update the code to test BucketInfo
//var instance = new GarageAdministrationApiV0garageV080.BucketInfo();
//expect(instance).to.be.a(GarageAdministrationApiV0garageV080.BucketInfo);
});
it('should have the property id (base name: "id")', function() {
// uncomment below and update the code to test the property id
//var instance = new GarageAdministrationApiV0garageV080.BucketInfo();
//expect(instance).to.be();
});
it('should have the property globalAliases (base name: "globalAliases")', function() {
// uncomment below and update the code to test the property globalAliases
//var instance = new GarageAdministrationApiV0garageV080.BucketInfo();
//expect(instance).to.be();
});
it('should have the property websiteAccess (base name: "websiteAccess")', function() {
// uncomment below and update the code to test the property websiteAccess
//var instance = new GarageAdministrationApiV0garageV080.BucketInfo();
//expect(instance).to.be();
});
it('should have the property websiteConfig (base name: "websiteConfig")', function() {
// uncomment below and update the code to test the property websiteConfig
//var instance = new GarageAdministrationApiV0garageV080.BucketInfo();
//expect(instance).to.be();
});
it('should have the property keys (base name: "keys")', function() {
// uncomment below and update the code to test the property keys
//var instance = new GarageAdministrationApiV0garageV080.BucketInfo();
//expect(instance).to.be();
});
it('should have the property objects (base name: "objects")', function() {
// uncomment below and update the code to test the property objects
//var instance = new GarageAdministrationApiV0garageV080.BucketInfo();
//expect(instance).to.be();
});
it('should have the property bytes (base name: "bytes")', function() {
// uncomment below and update the code to test the property bytes
//var instance = new GarageAdministrationApiV0garageV080.BucketInfo();
//expect(instance).to.be();
});
it('should have the property unfinishedUploads (base name: "unfinishedUploads")', function() {
// uncomment below and update the code to test the property unfinishedUploads
//var instance = new GarageAdministrationApiV0garageV080.BucketInfo();
//expect(instance).to.be();
});
it('should have the property quotas (base name: "quotas")', function() {
// uncomment below and update the code to test the property quotas
//var instance = new GarageAdministrationApiV0garageV080.BucketInfo();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,71 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.BucketInfoQuotas();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('BucketInfoQuotas', function() {
it('should create an instance of BucketInfoQuotas', function() {
// uncomment below and update the code to test BucketInfoQuotas
//var instance = new GarageAdministrationApiV0garageV080.BucketInfoQuotas();
//expect(instance).to.be.a(GarageAdministrationApiV0garageV080.BucketInfoQuotas);
});
it('should have the property maxSize (base name: "maxSize")', function() {
// uncomment below and update the code to test the property maxSize
//var instance = new GarageAdministrationApiV0garageV080.BucketInfoQuotas();
//expect(instance).to.be();
});
it('should have the property maxObjects (base name: "maxObjects")', function() {
// uncomment below and update the code to test the property maxObjects
//var instance = new GarageAdministrationApiV0garageV080.BucketInfoQuotas();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,71 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.BucketInfoWebsiteConfig();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('BucketInfoWebsiteConfig', function() {
it('should create an instance of BucketInfoWebsiteConfig', function() {
// uncomment below and update the code to test BucketInfoWebsiteConfig
//var instance = new GarageAdministrationApiV0garageV080.BucketInfoWebsiteConfig();
//expect(instance).to.be.a(GarageAdministrationApiV0garageV080.BucketInfoWebsiteConfig);
});
it('should have the property indexDocument (base name: "indexDocument")', function() {
// uncomment below and update the code to test the property indexDocument
//var instance = new GarageAdministrationApiV0garageV080.BucketInfoWebsiteConfig();
//expect(instance).to.be();
});
it('should have the property errorDocument (base name: "errorDocument")', function() {
// uncomment below and update the code to test the property errorDocument
//var instance = new GarageAdministrationApiV0garageV080.BucketInfoWebsiteConfig();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,83 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.BucketKeyInfo();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('BucketKeyInfo', function() {
it('should create an instance of BucketKeyInfo', function() {
// uncomment below and update the code to test BucketKeyInfo
//var instance = new GarageAdministrationApiV0garageV080.BucketKeyInfo();
//expect(instance).to.be.a(GarageAdministrationApiV0garageV080.BucketKeyInfo);
});
it('should have the property accessKeyId (base name: "accessKeyId")', function() {
// uncomment below and update the code to test the property accessKeyId
//var instance = new GarageAdministrationApiV0garageV080.BucketKeyInfo();
//expect(instance).to.be();
});
it('should have the property name (base name: "name")', function() {
// uncomment below and update the code to test the property name
//var instance = new GarageAdministrationApiV0garageV080.BucketKeyInfo();
//expect(instance).to.be();
});
it('should have the property permissions (base name: "permissions")', function() {
// uncomment below and update the code to test the property permissions
//var instance = new GarageAdministrationApiV0garageV080.BucketKeyInfo();
//expect(instance).to.be();
});
it('should have the property bucketLocalAliases (base name: "bucketLocalAliases")', function() {
// uncomment below and update the code to test the property bucketLocalAliases
//var instance = new GarageAdministrationApiV0garageV080.BucketKeyInfo();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,77 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.ClusterLayout();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('ClusterLayout', function() {
it('should create an instance of ClusterLayout', function() {
// uncomment below and update the code to test ClusterLayout
//var instance = new GarageAdministrationApiV0garageV080.ClusterLayout();
//expect(instance).to.be.a(GarageAdministrationApiV0garageV080.ClusterLayout);
});
it('should have the property version (base name: "version")', function() {
// uncomment below and update the code to test the property version
//var instance = new GarageAdministrationApiV0garageV080.ClusterLayout();
//expect(instance).to.be();
});
it('should have the property roles (base name: "roles")', function() {
// uncomment below and update the code to test the property roles
//var instance = new GarageAdministrationApiV0garageV080.ClusterLayout();
//expect(instance).to.be();
});
it('should have the property stagedRoleChanges (base name: "stagedRoleChanges")', function() {
// uncomment below and update the code to test the property stagedRoleChanges
//var instance = new GarageAdministrationApiV0garageV080.ClusterLayout();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,71 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.CreateBucketRequest();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('CreateBucketRequest', function() {
it('should create an instance of CreateBucketRequest', function() {
// uncomment below and update the code to test CreateBucketRequest
//var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequest();
//expect(instance).to.be.a(GarageAdministrationApiV0garageV080.CreateBucketRequest);
});
it('should have the property globalAlias (base name: "globalAlias")', function() {
// uncomment below and update the code to test the property globalAlias
//var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequest();
//expect(instance).to.be();
});
it('should have the property localAlias (base name: "localAlias")', function() {
// uncomment below and update the code to test the property localAlias
//var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequest();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,77 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAlias();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('CreateBucketRequestLocalAlias', function() {
it('should create an instance of CreateBucketRequestLocalAlias', function() {
// uncomment below and update the code to test CreateBucketRequestLocalAlias
//var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAlias();
//expect(instance).to.be.a(GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAlias);
});
it('should have the property accessKeyId (base name: "accessKeyId")', function() {
// uncomment below and update the code to test the property accessKeyId
//var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAlias();
//expect(instance).to.be();
});
it('should have the property alias (base name: "alias")', function() {
// uncomment below and update the code to test the property alias
//var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAlias();
//expect(instance).to.be();
});
it('should have the property allow (base name: "allow")', function() {
// uncomment below and update the code to test the property allow
//var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAlias();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,77 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAliasAllow();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('CreateBucketRequestLocalAliasAllow', function() {
it('should create an instance of CreateBucketRequestLocalAliasAllow', function() {
// uncomment below and update the code to test CreateBucketRequestLocalAliasAllow
//var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAliasAllow();
//expect(instance).to.be.a(GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAliasAllow);
});
it('should have the property read (base name: "read")', function() {
// uncomment below and update the code to test the property read
//var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAliasAllow();
//expect(instance).to.be();
});
it('should have the property write (base name: "write")', function() {
// uncomment below and update the code to test the property write
//var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAliasAllow();
//expect(instance).to.be();
});
it('should have the property owner (base name: "owner")', function() {
// uncomment below and update the code to test the property owner
//var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAliasAllow();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,83 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.GetNodes200Response();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('GetNodes200Response', function() {
it('should create an instance of GetNodes200Response', function() {
// uncomment below and update the code to test GetNodes200Response
//var instance = new GarageAdministrationApiV0garageV080.GetNodes200Response();
//expect(instance).to.be.a(GarageAdministrationApiV0garageV080.GetNodes200Response);
});
it('should have the property node (base name: "node")', function() {
// uncomment below and update the code to test the property node
//var instance = new GarageAdministrationApiV0garageV080.GetNodes200Response();
//expect(instance).to.be();
});
it('should have the property garageVersion (base name: "garageVersion")', function() {
// uncomment below and update the code to test the property garageVersion
//var instance = new GarageAdministrationApiV0garageV080.GetNodes200Response();
//expect(instance).to.be();
});
it('should have the property knownNodes (base name: "knownNodes")', function() {
// uncomment below and update the code to test the property knownNodes
//var instance = new GarageAdministrationApiV0garageV080.GetNodes200Response();
//expect(instance).to.be();
});
it('should have the property layout (base name: "layout")', function() {
// uncomment below and update the code to test the property layout
//var instance = new GarageAdministrationApiV0garageV080.GetNodes200Response();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,77 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.ImportKeyRequest();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('ImportKeyRequest', function() {
it('should create an instance of ImportKeyRequest', function() {
// uncomment below and update the code to test ImportKeyRequest
//var instance = new GarageAdministrationApiV0garageV080.ImportKeyRequest();
//expect(instance).to.be.a(GarageAdministrationApiV0garageV080.ImportKeyRequest);
});
it('should have the property name (base name: "name")', function() {
// uncomment below and update the code to test the property name
//var instance = new GarageAdministrationApiV0garageV080.ImportKeyRequest();
//expect(instance).to.be();
});
it('should have the property accessKeyId (base name: "accessKeyId")', function() {
// uncomment below and update the code to test the property accessKeyId
//var instance = new GarageAdministrationApiV0garageV080.ImportKeyRequest();
//expect(instance).to.be();
});
it('should have the property secretAccessKey (base name: "secretAccessKey")', function() {
// uncomment below and update the code to test the property secretAccessKey
//var instance = new GarageAdministrationApiV0garageV080.ImportKeyRequest();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,89 @@
/**
* Garage Administration API v0+garage-v0.8.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!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.GarageAdministrationApiV0garageV080);
}
}(this, function(expect, GarageAdministrationApiV0garageV080) {
'use strict';
var instance;
beforeEach(function() {
instance = new GarageAdministrationApiV0garageV080.KeyInfo();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('KeyInfo', function() {
it('should create an instance of KeyInfo', function() {
// uncomment below and update the code to test KeyInfo
//var instance = new GarageAdministrationApiV0garageV080.KeyInfo();
//expect(instance).to.be.a(GarageAdministrationApiV0garageV080.KeyInfo);
});
it('should have the property name (base name: "name")', function() {
// uncomment below and update the code to test the property name
//var instance = new GarageAdministrationApiV0garageV080.KeyInfo();
//expect(instance).to.be();
});
it('should have the property accessKeyId (base name: "accessKeyId")', function() {
// uncomment below and update the code to test the property accessKeyId
//var instance = new GarageAdministrationApiV0garageV080.KeyInfo();
//expect(instance).to.be();
});
it('should have the property secretAccessKey (base name: "secretAccessKey")', function() {
// uncomment below and update the code to test the property secretAccessKey
//var instance = new GarageAdministrationApiV0garageV080.KeyInfo();
//expect(instance).to.be();
});
it('should have the property permissions (base name: "permissions")', function() {
// uncomment below and update the code to test the property permissions
//var instance = new GarageAdministrationApiV0garageV080.KeyInfo();
//expect(instance).to.be();
});
it('should have the property buckets (base name: "buckets")', function() {
// uncomment below and update the code to test the property buckets
//var instance = new GarageAdministrationApiV0garageV080.KeyInfo();
//expect(instance).to.be();
});
});
}));

Some files were not shown because too many files have changed in this diff Show more