api-v1, generator #2

Merged
quentin merged 15 commits from v0.9.x into main 2023-11-28 15:40:37 +00:00
7 changed files with 16 additions and 13 deletions
Showing only changes of commit 6b641dd607 - Show all commits

View file

@ -172,7 +172,7 @@ func main() {
}
// Process the response
fmt.Fprintf(os.Stdout, "Target hostname: %v\n", resp.KnownNodes[resp.Node].Hostname)
fmt.Fprintf(os.Stdout, "Target hostname: %v\n", resp.KnownNodes[0].Hostname)
}
```

View file

@ -3,7 +3,7 @@ module garage-admin-example
go 1.18
require (
git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-golang v0.0.0-20221113145120-d012cff7c554 // indirect
git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-golang v0.0.0-20231122201735-f442d10b102d // indirect
github.com/golang/protobuf v1.4.2 // indirect
golang.org/x/net v0.0.0-20200822124328-c89045814202 // indirect
golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 // indirect

View file

@ -33,6 +33,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-golang v0.0.0-20221113145120-d012cff7c554 h1:GAQabea9CjkmQIDm4MxbG064enYVL69swewbjRfl5G8=
git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-golang v0.0.0-20221113145120-d012cff7c554/go.mod h1:TlSL6QVxozmdRaSgP6Akspi0HCJv4HAkkq3Dldru4GM=
git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-golang v0.0.0-20231122201735-f442d10b102d h1:GxlTiFj3WwYjULWp/MvW2iETmDf7TpOtEP2Qst2TkwU=
git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-golang v0.0.0-20231122201735-f442d10b102d/go.mod h1:TlSL6QVxozmdRaSgP6Akspi0HCJv4HAkkq3Dldru4GM=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=

View file

@ -27,5 +27,5 @@ func main() {
}
// Process the response
fmt.Fprintf(os.Stdout, "Target hostname: %v\n", resp.KnownNodes[resp.Node].Hostname)
fmt.Fprintf(os.Stdout, "Target hostname: %v\n", resp.KnownNodes[0].Hostname)
}

View file

@ -9,7 +9,7 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"garage_administration_api_v0garage_v0_8_0": "git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-js.git"
"garage_administration_api_v1garage_v0_9_0": "git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-js.git#4e3e8ea9986e427f969ab31be116b7ed95ae8362"
}
},
"node_modules/@ampproject/remapping": {
@ -736,9 +736,10 @@
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"node_modules/garage_administration_api_v0garage_v0_8_0": {
"version": "v0.8.0",
"resolved": "git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-js.git#635d3c1517482099289de1e01c21877b4659208e",
"node_modules/garage_administration_api_v1garage_v0_9_0": {
"name": "garage_administration_api_v0garage_v0_9_0",
"version": "v0.9.0",
"resolved": "git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-js.git#4e3e8ea9986e427f969ab31be116b7ed95ae8362",
"license": "Unlicense",
"dependencies": {
"@babel/cli": "^7.0.0",
@ -1813,9 +1814,9 @@
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"garage_administration_api_v0garage_v0_8_0": {
"version": "git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-js.git#635d3c1517482099289de1e01c21877b4659208e",
"from": "garage_administration_api_v0garage_v0_8_0@git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-js.git",
"garage_administration_api_v1garage_v0_9_0": {
"version": "git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-js.git#4e3e8ea9986e427f969ab31be116b7ed95ae8362",
"from": "garage_administration_api_v1garage_v0_9_0@git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-js.git#4e3e8ea9986e427f969ab31be116b7ed95ae8362",
"requires": {
"@babel/cli": "^7.0.0",
"superagent": "^5.3.0"

View file

@ -9,6 +9,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"garage_administration_api_v0garage_v0_8_0": "git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-js.git"
"garage_administration_api_v1garage_v0_9_0": "git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-js.git#4e3e8ea9986e427f969ab31be116b7ed95ae8362"
}
}

View file

@ -1,6 +1,6 @@
const garage = require('garage_administration_api_v0garage_v0_8_0');
const garage = require('garage_administration_api_v1garage_v0_9_0');
const api = new garage.ApiClient("http://127.0.0.1:3903/v0");
const api = new garage.ApiClient("http://127.0.0.1:3903/v1");
api.authentications['bearerAuth'].accessToken = "s3cr3t";
const [node, layout, key, bucket] = [