{"id":15664190,"url":"https://github.com/deep-diver/test1","last_synced_at":"2025-03-30T04:13:21.029Z","repository":{"id":50134918,"uuid":"373375957","full_name":"deep-diver/test1","owner":"deep-diver","description":null,"archived":false,"fork":false,"pushed_at":"2021-06-03T04:04:10.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-05T06:25:14.979Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deep-diver.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}},"created_at":"2021-06-03T04:03:25.000Z","updated_at":"2021-06-03T04:04:13.000Z","dependencies_parsed_at":"2022-09-06T23:23:11.217Z","dependency_job_id":null,"html_url":"https://github.com/deep-diver/test1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"codingpot/server-client-template-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep-diver%2Ftest1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep-diver%2Ftest1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep-diver%2Ftest1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep-diver%2Ftest1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deep-diver","download_url":"https://codeload.github.com/deep-diver/test1/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246273554,"owners_count":20750906,"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":[],"created_at":"2024-10-03T13:41:33.399Z","updated_at":"2025-03-30T04:13:21.014Z","avatar_url":"https://github.com/deep-diver.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/deep-diver/test1/actions/workflows/ci.yml/badge.svg)](https://github.com/deep-diver/test1/actions/workflows/ci.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/deep-diver/test1)](https://goreportcard.com/report/github.com/deep-diver/test1)\n\n# Server \u0026 Client Template in Golang (gRPC/protobuf)\n\nThis repository provides server \u0026 client boilerplate codes written in golang. The server \u0026 client communicated via gRPC/protobuf interface. It's boring to fork the repo and replace all the placeholders to fit your own environment. Instead, this repository give an easy way to **\"copy\"**.\n\n# Initial Setup\n\n1. Click **\"Use this template\"** button.\n2. Fill up the name of repository that you want to create.\n3. When the repository is copied over to your place, a `setup` GitHub Action gets triggered. It essentially leaves a `PR` when it is done.\n4. Merge the `PR` named `Initial Setup`.\n5. When the `PR` is done merged, it triggers another `ci` GitHub Action. Wait until it ends.\n6. Run `make install`. You can also specify PROTOC_VERSION if needed like this:\n   ```shell\n   PROTOC_VERSION=3.17.0 make install\n   ```\n\n# What can you do with initial setup?\n\nYou can simply ping from a client to server with a dummy message via `DummyService`.\n\n# What should you do after initial setup?\n\n1. Simply define your own protocol buffer services and messages in `/pkg/pbs/`.\n2. Generate `*.pb.go` files via `make clean install all`.\n3. Implement your message receiving logic in `/pkg/serv/`.\n4. Write your own business logic to leverage your own gRPC/protobuf services and messages.\n\n# Directory Structure\n\n```\n|-- .github    -- (D)(0)\n|\n|-- cmd\n|   |-- client -- (D)(1)\n|   |\n|   |-- server -- (D)(2)\n|   |\n|   `-- tools  -- (D)(3)\n|\n|\n|-- internal   -- (D)(4)\n|\n|-- model      -- (D)(5)\n|\n|-- pkg\n|   |-- pbs    -- (D)(6)\n|   |\n|   `-- serv   -- (D)(7)\n|\n`-- Makefile   -- (F)(8)\n```\n\n_(D) indicates `Directory`, and (F) indicated `File`_\n\n0. Any GitHub Action should go into `.github`. Basic CI workflow is provided. It simply builds `cmd/client/main.go` and `cmd/server/main.go` to check if there is any errors.\n\n1. `cmd/client` is for launching Client application. Boilerplate codes for sending out `DummyService`'s `GetHello` rpc is provided.\n\n2. `cmd/server` is for launching Server application. Boilerplate codes for set Server and listening on a specific port is provided.\n\n3. `cmd/tools` is for listing up any go packages to be included. Boilerplate codes list up `protoc-gen-go-grpc` and `protoc-gen-go`.\n\n4. `internal` is an empty as in the initial setup. You can store any business logics for any internal use here.\n\n5. `model` is an empty as in the initial setup. You can store any models to work with internal business logics here.\n\n6. `pkg/pbs` contains protocol buffer related stuff. Usually files with the extensions of `*.proto`, `*.pb.go` should be stored in here.\n\n7. `pkg/serv` is there to handle incoming messages from client to server.\n\n8. `Makefile` mainly provides two rules, installing gRPC/protobuf environment via `make install` and generating protobuf into the appropriate folder `pkg/pbs` via `make all`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeep-diver%2Ftest1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeep-diver%2Ftest1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeep-diver%2Ftest1/lists"}