aboutsummaryrefslogtreecommitdiff
path: root/doc/book/build/rust.md
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2022-11-16 10:51:04 +0000
committerAlex <alex@adnab.me>2022-11-16 10:51:04 +0000
commitbcc97724707aaa39fd64490cdd81aa5073285f33 (patch)
tree41e0535d0aaf8cfb095576c3c0d41213197dd003 /doc/book/build/rust.md
parentc4e4cc1156e10fb0a840666873efa1e4dfb7c884 (diff)
parentcf23aee1831e464b2a445a1ffb302086f32dd6e5 (diff)
downloadgarage-bcc97724707aaa39fd64490cdd81aa5073285f33.tar.gz
garage-bcc97724707aaa39fd64490cdd81aa5073285f33.zip
Merge pull request 'OpenAPI spec for admin API' (#379) from ecosystem/openapi into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/379
Diffstat (limited to 'doc/book/build/rust.md')
-rw-r--r--doc/book/build/rust.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/doc/book/build/rust.md b/doc/book/build/rust.md
new file mode 100644
index 00000000..7101ba6e
--- /dev/null
+++ b/doc/book/build/rust.md
@@ -0,0 +1,47 @@
++++
+title = "Rust"
+weight = 40
++++
+
+## S3
+
+*Coming soon*
+
+Some refs:
+ - Amazon aws-rust-sdk
+ - [Github](https://github.com/awslabs/aws-sdk-rust)
+
+## K2V
+
+*Coming soon*
+
+Some refs: https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/src/k2v-client
+
+```bash
+# all these values can be provided on the cli instead
+export AWS_ACCESS_KEY_ID=GK123456
+export AWS_SECRET_ACCESS_KEY=0123..789
+export AWS_REGION=garage
+export K2V_ENDPOINT=http://172.30.2.1:3903
+export K2V_BUCKET=my-bucket
+
+cargo run --features=cli -- read-range my-partition-key --all
+
+cargo run --features=cli -- insert my-partition-key my-sort-key --text "my string1"
+cargo run --features=cli -- insert my-partition-key my-sort-key --text "my string2"
+cargo run --features=cli -- insert my-partition-key my-sort-key2 --text "my string"
+
+cargo run --features=cli -- read-range my-partition-key --all
+
+causality=$(cargo run --features=cli -- read my-partition-key my-sort-key2 -b | head -n1)
+cargo run --features=cli -- delete my-partition-key my-sort-key2 -c $causality
+
+causality=$(cargo run --features=cli -- read my-partition-key my-sort-key -b | head -n1)
+cargo run --features=cli -- insert my-partition-key my-sort-key --text "my string3" -c $causality
+
+cargo run --features=cli -- read-range my-partition-key --all
+```
+
+## Admin API
+
+*Coming soon*