{"id":37162487,"url":"https://github.com/jackcvr/s3","last_synced_at":"2026-01-14T19:20:15.136Z","repository":{"id":256092983,"uuid":"854303719","full_name":"jackcvr/s3","owner":"jackcvr","description":"Go S3 client","archived":false,"fork":false,"pushed_at":"2024-09-10T20:03:41.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-11T02:37:47.340Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/jackcvr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-08T22:56:40.000Z","updated_at":"2024-09-10T20:03:44.000Z","dependencies_parsed_at":"2024-09-09T00:26:17.314Z","dependency_job_id":"79116c2c-d312-43bb-96a5-fdb2b143ae2f","html_url":"https://github.com/jackcvr/s3","commit_stats":null,"previous_names":["jackcvr/s3"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jackcvr/s3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackcvr%2Fs3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackcvr%2Fs3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackcvr%2Fs3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackcvr%2Fs3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackcvr","download_url":"https://codeload.github.com/jackcvr/s3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackcvr%2Fs3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28432468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-14T19:20:14.488Z","updated_at":"2026-01-14T19:20:15.125Z","avatar_url":"https://github.com/jackcvr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go S3 client\n\nExtended MinIO S3 client with (de)serialization.\n\nAdded extra functionality:\n - **PutBytes**, **ReadBytes** functions: for more convenient storage of bytes\n - **Put**, **Read** functions: for storage of structs (serialized in JSON/MsgPack/etc...)\n - **BucketClient**: for encapsulating functionality around specific bucket\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"github.com/jackcvr/s3\"\n\t\"github.com/jackcvr/s3/msgpack\"\n\t\"github.com/minio/minio-go/v7\"\n\t\"os\"\n)\n\nconst (\n\tbucketName = \"test-bucket\"\n\tobjectName = \"test-object\"\n)\n\nfunc main() {\n\tvar accessKey = os.Getenv(\"ACCESS_KEY\")\n\tvar secretKey = os.Getenv(\"SECRET_KEY\")\n\n\t// create BucketClient to simplify working with a single bucket\n\tc, err := s3.NewBucketClient(\n\t\t\"localhost:9000\",\n\t\tbucketName,\n\t\ts3.NewOptions(accessKey, secretKey, \"\", false),\n\t\tmsgpack.MsgPackSerializer{}) // use MsgPack serializer for this bucket\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tctx := context.Background()\n\t// create bucket if it doesn't exist\n\tif err = c.EnsureBucket(ctx, minio.MakeBucketOptions{Region: \"us-east-1\"}); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Put bytes\n\tif _, err = c.PutBytes(ctx, objectName, []byte(\"test\"), minio.PutObjectOptions{}); err != nil {\n\t\tpanic(err)\n\t}\n\t// Get bytes\n\tvar buf bytes.Buffer\n\tif err = c.ReadBytes(ctx, objectName, \u0026buf, minio.GetObjectOptions{}); err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(string(buf.Bytes())) // test\n\n\ttype Test struct {\n\t\tName   string `json:\"name\"`\n\t\tAmount int    `json:\"amount\"`\n\t}\n\n\t// Put serialized struct\n\tobj := Test{\n\t\tName:   \"Test\",\n\t\tAmount: 12,\n\t}\n\tif _, err = c.Put(ctx, objectName, obj, minio.PutObjectOptions{}); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Get deserialized struct\n\tobj2 := Test{}\n\tif err = c.Read(ctx, objectName, \u0026obj2, minio.GetObjectOptions{}); err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", obj2) // {Name:Test Amount:12}\n\n\tbuf.Reset()\n\tif err = c.ReadBytes(ctx, objectName, \u0026buf, minio.GetObjectOptions{}); err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(hex.Dump(buf.Bytes()))\n\t//00000000  82 a4 4e 61 6d 65 a4 54  65 73 74 a6 41 6d 6f 75  |..Name.Test.Amou|\n\t//00000010  6e 74 0c                                          |nt.|\n}\n```\n\n## License\n\n[MIT](https://spdx.org/licenses/MIT.html) ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackcvr%2Fs3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackcvr%2Fs3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackcvr%2Fs3/lists"}