Skip to content

Commit 562f33f

Browse files
committed
add code generation
1 parent 96135aa commit 562f33f

File tree

6 files changed

+2936
-153
lines changed

6 files changed

+2936
-153
lines changed

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@
22

33
A WIP [pod](https://github.com/babashka/babashka.pods) to interact with AWS using [babashka](https://github.com/borkdude/babashka/).
44

5-
[This file](./babashka.go) contains the code around receiving/sending bencoded messages from/to babashka.
5+
[This file](./babashka/babashka.go) contains the code around receiving/sending bencoded messages from/to babashka.
66

7-
Then [this](./dynamo.go) is just a wrapper around the golang sdk. Only a few functions are implementend at the moment but it would be quite easy to add more (and add other components than dynamodb) if that turns out to be useful.
7+
Then [this](./gen/generate.clj) generates all the code to use the golang sdk. That might be a bit too hacky but allows to have access to most of the AWS sdk really quickly and I believe this is relatively common in Go to get around the lack of generics.
8+
9+
Currently most dynamodb and s3 functions are supported (adding other services should be easy in most cases as the code is mostly auto generated), but not paginators.
810

911
## Usage
12+
1013
Compile the pod by running `go build`, then:
1114
``` clojure
1215
(require '[babashka.pods])
1316
(babashka.pods/load-pod ["./pod-tzzh-aws"])
1417
(require '[pod.tzzh.dynamodb :as d])
18+
(require '[pod.tzzh.s3 :as s3])
19+
20+
(s3/list-buckets)
1521

1622
(d/list-tables)
1723

0 commit comments

Comments
 (0)