Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/golang-design/tgstore
- Owner: golang-design
- License: mit
- Created: 2020-12-08T16:17:28.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-24T06:48:28.000Z (almost 4 years ago)
- Last Synced: 2024-10-23T17:17:14.974Z (4 months ago)
- Topics: encrypted-storage, object-storage, telegram, unlimited-storage
- Language: Go
- Homepage: https://golang.design/x/tgstore
- Size: 139 KB
- Stars: 96
- Watchers: 9
- Forks: 30
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 mainimport (
"context"
"crypto/rand"
"fmt"
"io"
"log"
"strings"
"time""golang.design/x/tgstore"
"golang.org/x/crypto/chacha20poly1305"
)func main() {
tgs := tgstore.New()
tgs.BotToken = "