{"id":16848675,"url":"https://github.com/d5/go-s3fs","last_synced_at":"2025-08-08T04:41:05.887Z","repository":{"id":57600667,"uuid":"160472870","full_name":"d5/go-s3fs","owner":"d5","description":null,"archived":false,"fork":false,"pushed_at":"2018-12-05T06:50:36.000Z","size":13,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T07:26:42.622Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/d5.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":"2018-12-05T06:40:49.000Z","updated_at":"2023-08-09T05:45:31.000Z","dependencies_parsed_at":"2022-09-16T18:51:52.423Z","dependency_job_id":null,"html_url":"https://github.com/d5/go-s3fs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/d5/go-s3fs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d5%2Fgo-s3fs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d5%2Fgo-s3fs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d5%2Fgo-s3fs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d5%2Fgo-s3fs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d5","download_url":"https://codeload.github.com/d5/go-s3fs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d5%2Fgo-s3fs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269366158,"owners_count":24405237,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-10-13T13:12:10.788Z","updated_at":"2025-08-08T04:41:05.824Z","avatar_url":"https://github.com/d5.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# s3fs\n\n[![GoDoc](https://godoc.org/github.com/d5/go-s3fs?status.svg)](https://godoc.org/github.com/d5/go-s3fs)\n\n\nA simple S3-based file store implementation for Go.\n\nExample:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/d5/go-s3fs\"\n)\n\nfunc main() {\n\t// create client\n\tclient := s3fs.NewClient(\n\t\tos.Getenv(\"S3_BUCKET\"), // S3 bucket name\n\t\tnil,                  // use default client options\n\t\ts3fs.NewAWSSession(), // AWS session\n\t\ts3fs.NewAWSConfigWithStaticCredentialsAndRegion(\n\t\t\tos.Getenv(\"AWS_ACCESS_KEY_ID\"),     // AWS access key\n\t\t\tos.Getenv(\"AWS_SECRET_ACCESS_KEY\"), // AWS secret key\n\t\t\tos.Getenv(\"S3_BUCKET_REGION\")))     // S3 bucket region\n\n\t// write a file\n\terr := client.Write(\u0026s3fs.File{\n\t\tPath:        \"test/foo/bar\",\n\t\tData:        []byte(\"hello world!\"),\n\t\tContentType: s3fs.StringPtr(\"text/plain\"),\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// read a file\n\tfile, err := client.Read(\"test/foo/bar\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(string(file.Data))\n\n\t// get a pre-signed URL for the file\n\tlink, err := client.GenerateURLWithExpire(\"test/foo/bar\", 10*time.Minute)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(link)\n}\n```\n\nTo run tests, you need to create your own S3 bucket and set the following environment variables.\n\n```bash\nexport AWS_ACCESS_KEY_ID=\"\u003cyour AWS access key\u003e\"\nexport AWS_SECRET_ACCESS_KEY=\"\u003cyour AWS secret key\u003e\"\nexport TEST_S3_BUCKET=\"\u003cyour S3 bucket name\u003e\"\nexport TEST_S3_BUCKET_REGION=\"\u003cyour S3 bucket region\u003e\"\n\n# run tests\nmake test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd5%2Fgo-s3fs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd5%2Fgo-s3fs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd5%2Fgo-s3fs/lists"}