{"id":38252007,"url":"https://github.com/stark-sim/cas","last_synced_at":"2026-01-17T01:28:19.190Z","repository":{"id":62876015,"uuid":"562506790","full_name":"stark-sim/cas","owner":"stark-sim","description":"Microservice that provides authentication and authorization function","archived":false,"fork":false,"pushed_at":"2024-03-25T07:45:10.000Z","size":327,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-28T11:16:15.733Z","etag":null,"topics":["apollo-federation-subgraph","ent","gqlgen","graphql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stark-sim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-06T15:18:15.000Z","updated_at":"2024-06-28T07:19:46.000Z","dependencies_parsed_at":"2024-03-25T07:47:15.492Z","dependency_job_id":null,"html_url":"https://github.com/stark-sim/cas","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/stark-sim/cas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stark-sim%2Fcas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stark-sim%2Fcas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stark-sim%2Fcas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stark-sim%2Fcas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stark-sim","download_url":"https://codeload.github.com/stark-sim/cas/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stark-sim%2Fcas/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28491520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"ssl_error","status_checked_at":"2026-01-17T00:43:11.982Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["apollo-federation-subgraph","ent","gqlgen","graphql"],"created_at":"2026-01-17T01:28:18.738Z","updated_at":"2026-01-17T01:28:19.180Z","avatar_url":"https://github.com/stark-sim.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## internal 目录\n\n私有的应用程序代码库。[Golang 编译器强制执行](https://go.dev\\/doc\\/go1.4#internalpackages)，不会被他人导入的代码\n\ninternal 中的目录结构，多应用时可以具备 \n- /internal/app/app1\n- /internal/pkg\n区分应用程序的部分和应用程序共享的部分\n\n而如果是微服务，则直接 /internal/myapp/ 就够了 \n\n## pkg 目录\n\n外部应用程序可以使用的裤代码，可以被其他项目导入使用。放在此处的代码要慎重。\n\n\n### 区分理解 [pkg 和 internal](https://travisjeffery.com\\/b\\/2019\\/11\\/i-ll-take-pkg-over-internal\\/)\n\n当根目录包含大量非 Go 组件和目录时，也应该放到 pkg 中，如果项目很小，非必要使用。主要看非 Go 组件多不多\n\n所以微服务里不用 pkg 的情景比较正常，如果有公用代码，可以直接做成一个库，供其他项目复用。\n\n权限服务中需要用到用户服务的 struct User 时，可以考虑把 struct 放在用户的 pkg 中，供权限服务引用\n\n## vendor 目录\n\nGo module 已经成熟，不需要 vendor 目录来手动管理程序的依赖关系\n\n## api 目录\n\n项目对外提供的 API 文件。如 OpenAPI/Swagger/JSON/protobuf 等定义文件\n\n- /api/protobuf_stark_cas/test/test.pb.go\n- /api/protobuf_stark_cas/test/test.proto\n\n\n## build 目录\n\n打包和 CI 所需的文件\n\n## configs 目录\n\n配置文件\n\n## deployments 或 deploy(k8s) 目录\n\n存放 docker-compose 之类的部署用文件\n\n## scripts 目录\n\n用于执行各种构建、安装、分析等操作的脚本\n\n可以让根目录的 Makefile 来调用它们，使得 Makefile 比较精简\n\n## test 目录\n\n外部测试应用程序和测试数据\n\n## assets 目录\n\n项目中使用的静态资源，如图片\n\n## docs 目录\n\n设计和用户文档，如使用文档，非数据定义文档，那些在 API 目录\n\n## examples 目录\n\n使用示例程序\n\n## tools\n此项目的支持工具，可以从 /pkg 和 /internal 导入代码结合使用\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstark-sim%2Fcas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstark-sim%2Fcas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstark-sim%2Fcas/lists"}