{"id":20716735,"url":"https://github.com/ozeer/warehouse","last_synced_at":"2026-04-22T06:40:27.699Z","repository":{"id":189203237,"uuid":"680224952","full_name":"ozeer/warehouse","owner":"ozeer","description":"Kratos project demo","archived":false,"fork":false,"pushed_at":"2023-08-20T04:47:33.000Z","size":141,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T22:12:04.838Z","etag":null,"topics":["demo","golang","gorm","grpc","kratos","learning","project"],"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/ozeer.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":"2023-08-18T16:43:31.000Z","updated_at":"2023-10-19T07:25:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"afebe44b-03f5-43e9-8cab-8546b3c2662e","html_url":"https://github.com/ozeer/warehouse","commit_stats":null,"previous_names":["ozeer/warehouse"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozeer%2Fwarehouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozeer%2Fwarehouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozeer%2Fwarehouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozeer%2Fwarehouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozeer","download_url":"https://codeload.github.com/ozeer/warehouse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242989427,"owners_count":20217787,"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":["demo","golang","gorm","grpc","kratos","learning","project"],"created_at":"2024-11-17T03:06:39.831Z","updated_at":"2025-12-24T06:30:32.940Z","avatar_url":"https://github.com/ozeer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Kratos Project Demo\n\n### 安装Kratos\n```\ngo install github.com/go-kratos/kratos/cmd/kratos/v2@latest\n```\n### 创建项目\n```\nkratos new warehouse\n```\n### 创建模块服务\n#### 1. 用户模块\n```bash\ncd warehouse\n# 创建user.proto\nkratos proto add api/git/user.proto\n# 创建PB文件（Generate the proto code）\nkratos proto client api/git/user.proto\n# 生成service服务（Generate the source code of service by proto file）\nkratos proto server api/git/user.proto -t internal/service\n```\n#### 2. 仓库模块\n```bash\n# 创建repo.proto\nkratos proto add api/git/repo.proto\n# 创建PB文件\nkratos proto client api/git/repo.proto\n# 生成service服务\nkratos proto server api/git/repo.proto -t internal/service\n```\n\n### 启动项目\n```\ngo generate ./...\ngo build -o ./bin/ ./...\n./bin/server -conf ./configs\n```\n### Generate other auxiliary files by Makefile\n```\n# Download and update dependencies\nmake init\n# Generate API files (include: pb.go, http, grpc, validate, swagger) by proto file\nmake api\n# Generate all files\nmake all\n```\n### Automated Initialization (wire)\n```\n# install wire\ngo get github.com/google/wire/cmd/wire\n\n# generate wire\ncd cmd/server\nwire\n```\n\n### Docker\n```bash\n# build\ndocker build -t \u003cyour-docker-image-name\u003e .\n\n# run\ndocker run --rm -p 8000:8000 -p 9000:9000 -v \u003c/path/to/your/configs\u003e:/data/conf \u003cyour-docker-image-name\u003e\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozeer%2Fwarehouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozeer%2Fwarehouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozeer%2Fwarehouse/lists"}