DEV Community

Cover image for TeoS3 package and s3cp utility
Kirill Scherba
Kirill Scherba

Posted on • Updated on

TeoS3 package and s3cp utility

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 utility which copy files from disk to s3 storage and back.

https://github.com/teonet-go/teos3

There is a part of code with connect, set and get key value:

// Connect to S3 storage
con, err := teos3.Connect(accessKey, secretKey, endpoint, secure)
if err != nil {
    log.Fatalln(err)
}

// Set key to teos3 Map
err = con.Map.Set(key, data)
if err != nil {
    log.Fatalln(err)
}

// Get key from TeoS3 Map
data, err := con.Map.Get(key)
if err != nil {
    log.Fatalln(err)
}
Enter fullscreen mode Exit fullscreen mode

See the code and more descriptions and example at: https://github.com/teonet-go/teos3

Top comments (0)