Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/golang-design/tgstore

An encrypted object storage system with unlimited space backed by Telegram.
https://github.com/golang-design/tgstore

encrypted-storage object-storage telegram unlimited-storage

Last synced: 3 months ago
JSON representation

An encrypted object storage system with unlimited space backed by Telegram.

Awesome Lists containing this project

README

        

# TGStore

[![PkgGoDev](https://pkg.go.dev/badge/golang.design/x/tgstore)](https://pkg.go.dev/golang.design/x/tgstore)

An encrypted object storage system with unlimited space backed by Telegram.

Please only upload what you really need to upload, don't abuse any system.

## Features

* Extremely easy to use
* One function: [`tgstore.New`](https://pkg.go.dev/golang.design/x/tgstore#New)
* One struct: [`tgstore.TGStore`](https://pkg.go.dev/golang.design/x/tgstore#TGStore)
* [`tgstore.TGStore.Upload`](https://pkg.go.dev/golang.design/x/tgstore#TGStore.Upload)
* [`tgstore.TGStore.Download`](https://pkg.go.dev/golang.design/x/tgstore#TGStore.Download)
* Unlimited storage space
* Up to 50 TiB or more (depending on the [`tgstore.TGStore.MaxFileBytes`](https://pkg.go.dev/golang.design/x/tgstore#TGStore.MaxFileBytes)) per object
* Crazy upload and download speed (try concurrency to make it happen)

## Installation

Open your terminal and execute

```bash
$ go get golang.design/x/tgstore
```

done.

> The only requirement is the [Go](https://golang.org), at least v1.16.

## Hello, 世界

Create a file named `hello.go`

```go
package main

import (
"context"
"crypto/rand"
"fmt"
"io"
"log"
"strings"
"time"

"golang.design/x/tgstore"
"golang.org/x/crypto/chacha20poly1305"
)

func main() {
tgs := tgstore.New()
tgs.BotToken = "