{"id":37225720,"url":"https://github.com/ego-component/eoss","last_synced_at":"2026-01-15T01:49:21.757Z","repository":{"id":65146379,"uuid":"569998879","full_name":"ego-component/eoss","owner":"ego-component","description":"阿里oss 和 aws s3 客户端的封装","archived":true,"fork":false,"pushed_at":"2023-10-10T10:28:55.000Z","size":253,"stargazers_count":2,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-12T03:38:18.341Z","etag":null,"topics":["aws","oss","s3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ego-component.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":"2022-11-24T05:18:53.000Z","updated_at":"2023-10-18T08:30:06.000Z","dependencies_parsed_at":"2024-06-20T03:20:19.534Z","dependency_job_id":null,"html_url":"https://github.com/ego-component/eoss","commit_stats":null,"previous_names":["ego-component/awos"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ego-component/eoss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ego-component%2Feoss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ego-component%2Feoss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ego-component%2Feoss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ego-component%2Feoss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ego-component","download_url":"https://codeload.github.com/ego-component/eoss/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ego-component%2Feoss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28441031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"ssl_error","status_checked_at":"2026-01-15T00:55:20.945Z","response_time":107,"last_error":"SSL_read: 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":["aws","oss","s3"],"created_at":"2026-01-15T01:49:21.212Z","updated_at":"2026-01-15T01:49:21.739Z","avatar_url":"https://github.com/ego-component.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EOSS: Wrapper For Aliyun OSS And Amazon S3\n\nawos for node: https://github.com/shimohq/awos-js\n\n## Features\n\n- enable shards bucket\n- add retry strategy\n- avoid 404 status code:\n  - `Get(objectName string) (string, error)` will return `\"\", nil` when object not exist\n  - `Head(key string, meta []string) (map[string]string, error)` will return `nil, nil` when object not exist\n\n## Installing\n\nUse go get to retrieve the SDK to add it to your GOPATH workspace, or project's Go module dependencies.\n\n```bash\ngo get github.com/ego-component/eoss\n```\n\n## How to use\n### config\n```toml\n[storage]\nstorageType = \"oss\" # oss|s3\naccessKeyID = \"xxx\"\naccessKeySecret = \"xxx\"\nendpoint = \"oss-cn-beijing.aliyuncs.com\"\nbucket = \"aaa\"\nshards = []\n[storage.buckets.template] # 可配置多套buckets配置，buckets里的配置会替换上层配置\nbucket = \"template-bucket\"\nshards = []\n[storage.buckets.fileContent]\nbucket = \"contents-bucket\"\nshards = [\n \"abcdefghijklmnopqr\",\n \"stuvwxyz0123456789\"\n]\n```\n\n```golang\nimport \"github.com/ego-component/eoss\"\n\n// 单独一个 bucket 配置\nclient := eoss.Load(\"storage\").Build()\n// 多 bucket 配置\nclient := eoss.Load(\"storage\").Build(eoss.WithBucketKey(\"template\"))\n\n// 带context（可记录链路）\nclient.WithContext(ctx).Get(key)\n```\n\nAvailable operations：\n\n```golang\nWithContext(ctx context.Context) Component\nGet(key string, options ...GetOptions) (string, error)\nGetBytes(key string, options ...GetOptions) ([]byte, error)\nGetAsReader(key string, options ...GetOptions) (io.ReadCloser, error)\nGetWithMeta(key string, attributes []string, options ...GetOptions) (io.ReadCloser, map[string]string, error)\nPut(key string, reader io.ReadSeeker, meta map[string]string, options ...PutOptions) error\nDel(key string) error\nDelMulti(keys []string) error\nHead(key string, meta []string) (map[string]string, error)\nListObject(key string, prefix string, marker string, maxKeys int, delimiter string) ([]string, error)\nSignURL(key string, expired int64) (string, error)\nGetAndDecompress(key string) (string, error)\nGetAndDecompressAsReader(key string) (io.ReadCloser, error)\nCompressAndPut(key string, reader io.ReadSeeker, meta map[string]string, options ...PutOptions) error\nRange(key string, offset int64, length int64) (io.ReadCloser, error)\nExists(key string)(bool, error)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fego-component%2Feoss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fego-component%2Feoss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fego-component%2Feoss/lists"}