{"id":19225590,"url":"https://github.com/golang-design/tgstore","last_synced_at":"2025-07-03T02:32:55.445Z","repository":{"id":45037015,"uuid":"319693569","full_name":"golang-design/tgstore","owner":"golang-design","description":"An encrypted object storage system with unlimited space backed by Telegram.","archived":false,"fork":false,"pushed_at":"2021-03-24T06:48:28.000Z","size":142,"stargazers_count":98,"open_issues_count":2,"forks_count":29,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-29T15:11:20.630Z","etag":null,"topics":["encrypted-storage","object-storage","telegram","unlimited-storage"],"latest_commit_sha":null,"homepage":"https://golang.design/x/tgstore","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/golang-design.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-08T16:17:28.000Z","updated_at":"2025-05-25T17:43:03.000Z","dependencies_parsed_at":"2022-09-18T04:41:34.730Z","dependency_job_id":null,"html_url":"https://github.com/golang-design/tgstore","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/golang-design/tgstore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang-design%2Ftgstore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang-design%2Ftgstore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang-design%2Ftgstore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang-design%2Ftgstore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golang-design","download_url":"https://codeload.github.com/golang-design/tgstore/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang-design%2Ftgstore/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263247197,"owners_count":23436809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["encrypted-storage","object-storage","telegram","unlimited-storage"],"created_at":"2024-11-09T15:15:40.144Z","updated_at":"2025-07-03T02:32:55.421Z","avatar_url":"https://github.com/golang-design.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TGStore\n\n[![PkgGoDev](https://pkg.go.dev/badge/golang.design/x/tgstore)](https://pkg.go.dev/golang.design/x/tgstore)\n\nAn encrypted object storage system with unlimited space backed by Telegram.\n\nPlease only upload what you really need to upload, don't abuse any system.\n\n## Features\n\n* Extremely easy to use\n\t* One function: [`tgstore.New`](https://pkg.go.dev/golang.design/x/tgstore#New)\n\t* One struct: [`tgstore.TGStore`](https://pkg.go.dev/golang.design/x/tgstore#TGStore)\n\t\t* [`tgstore.TGStore.Upload`](https://pkg.go.dev/golang.design/x/tgstore#TGStore.Upload)\n\t\t* [`tgstore.TGStore.Download`](https://pkg.go.dev/golang.design/x/tgstore#TGStore.Download)\n* Unlimited storage space\n* Up to 50 TiB or more (depending on the [`tgstore.TGStore.MaxFileBytes`](https://pkg.go.dev/golang.design/x/tgstore#TGStore.MaxFileBytes)) per object\n* Crazy upload and download speed (try concurrency to make it happen)\n\n## Installation\n\nOpen your terminal and execute\n\n```bash\n$ go get golang.design/x/tgstore\n```\n\ndone.\n\n\u003e The only requirement is the [Go](https://golang.org), at least v1.16.\n\n## Hello, 世界\n\nCreate a file named `hello.go`\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"crypto/rand\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"strings\"\n\t\"time\"\n\n\t\"golang.design/x/tgstore\"\n\t\"golang.org/x/crypto/chacha20poly1305\"\n)\n\nfunc main() {\n\ttgs := tgstore.New()\n\ttgs.BotToken = \"\u003cyour-telegram-bot-token\"\n\ttgs.ChatID = 1234567890\n\n\tobjectSecretKey := make([]byte, chacha20poly1305.KeySize)\n\tif _, err := rand.Read(objectSecretKey); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tstartTime := time.Now()\n\n\tobjectID, err := tgs.Upload(\n\t\tcontext.TODO(),\n\t\tobjectSecretKey,\n\t\tstrings.NewReader(\"Hello, 世界\"),\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Println(\"Upload time:\", time.Since(startTime))\n\n\tstartTime = time.Now()\n\n\tobjectReader, err := tgs.Download(\n\t\tcontext.TODO(),\n\t\tobjectSecretKey,\n\t\tobjectID,\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Println(\"Download time:\", time.Since(startTime))\n\n\tstartTime = time.Now()\n\n\tb, err := io.ReadAll(objectReader)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Println(\"Read time:\", time.Since(startTime))\n\n\tfmt.Println(\"Content:\", string(b))\n}\n```\n\nand run it\n\n```bash\n$ go run hello.go\n```\n\nthen check what your terminal outputs.\n\n## Community\n\nIf you want to discuss TGStore, or ask questions about it, simply post questions\nor ideas [here](https://github.com/golang-design/tgstore/issues).\n\n## Contributing\n\nIf you want to help build TGStore, simply follow\n[this](https://github.com/golang-design/tgstore/wiki/Contributing) to send pull\nrequests [here](https://github.com/golang-design/tgstore/pulls).\n\n## License\n\nThis project is licensed under the MIT License.\n\nLicense can be found [here](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolang-design%2Ftgstore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolang-design%2Ftgstore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolang-design%2Ftgstore/lists"}