The TeoS3 package contains Golang features that make it easy to use S3 storage as a key-value database.
The TeoS3 package contains Golang features that make it easy to use S3 storage as a key-value database.
This project contain also the s3cp utilite which copy files from disk to s3 storage and back.
There is a part of code with connect, set and get key value:
1// Connect to S3 storage
2con, err := teos3.Connect(accessKey, secretKey, endpoint, secure)
3if err != nil {
4 log.Fatalln(err)
5}
6
7// Set key to teos3 Map
8err = con.Map.Set(key, data)
9if err != nil {
10 log.Fatalln(err)
11}
12
13// Get key from TeoS3 Map
14data, err := con.Map.Get(key)
15if err != nil {
16 log.Fatalln(err)
17}
See the code and more descriptions and examples at: https://github.com/teonet-go/teos3
See this golang package documentation at: https://pkg.go.dev/github.com/teonet-go/teos3