{"id":25384030,"url":"https://github.com/gomatic/go-kit-phases","last_synced_at":"2025-04-09T14:43:09.276Z","repository":{"id":78668481,"uuid":"324621240","full_name":"gomatic/go-kit-phases","owner":"gomatic","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-25T22:23:20.000Z","size":2714,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"00-init","last_synced_at":"2025-03-25T07:01:56.639Z","etag":null,"topics":["go","go-kit","go-kit-template","go-kit-transport","golang","kit","tutorial","tutorial-code","tutorial-exercises"],"latest_commit_sha":null,"homepage":"https://github.com/gomatic/go-kit-phases#readme","language":"Makefile","has_issues":false,"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/gomatic.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":"2020-12-26T19:26:24.000Z","updated_at":"2021-11-08T04:03:20.000Z","dependencies_parsed_at":"2024-06-21T17:57:03.789Z","dependency_job_id":"e6797a7e-581c-48a4-a50a-7db76840ef9e","html_url":"https://github.com/gomatic/go-kit-phases","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gomatic%2Fgo-kit-phases","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gomatic%2Fgo-kit-phases/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gomatic%2Fgo-kit-phases/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gomatic%2Fgo-kit-phases/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gomatic","download_url":"https://codeload.github.com/gomatic/go-kit-phases/tar.gz/refs/heads/00-init","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055275,"owners_count":21040151,"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":["go","go-kit","go-kit-template","go-kit-transport","golang","kit","tutorial","tutorial-code","tutorial-exercises"],"created_at":"2025-02-15T08:35:33.237Z","updated_at":"2025-04-09T14:43:09.258Z","avatar_url":"https://github.com/gomatic.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\n\u003e “Namespaces are one honking great idea–let’s do more of those!”\n\u003e - [The Zen of Python](https://www.python.org/dev/peps/pep-0020/), Item 19\n\n\u003e A good package starts with a good name\n\u003e - [The Zen of ~Python~ Go](https://dave.cheney.net/2020/02/23/the-zen-of-go#_a_good_package_starts_with_a_good_name)\n\nThis project began as just an attempt to refresh my understanding of [go-kit](https://gokit.io/) while thinking through\nthe organization and how to iteratively add features to a go-kit project. It evolved into a specialized layout designed\nfor **iterative development** of transports and endpoints, **isolation of implementation details**, and to be **a clear\nreflection of protobuf** service definitions to make navigating and implementing the code more obvious and\nstraightforward based mostly on the folder hierarchy.\n\nA primary design principle of this project is centered around exposing the specifics of the service, its methods, and\nits types while retaining the great concepts and separation of concerns introduced by [go-kit](https://gokit.io/).\n\nAdditionally, within the package layout, import-aliases are utilized to standardize packages, making the code for the\npackages highly similar even though the types being referenced are incompatible. This technique was chosen over using\ninterface types or reflection to keep the code more easily navigable and explicit.\n\n```go\nimport (\n  in \"github.com/gomatic/go-kit-phases/internal/api/moody/transform/feeling\"\n  out \"github.com/gomatic/go-kit-phases/internal/api/moody/transform/overall\"\n)\n\nfunc Request(_ context.Context, q interface{}) (interface{}, error)  { return in.To(q) }\nfunc Response(_ context.Context, p interface{}) (interface{}, error) { return out.To(p) }\n```\n\nThis design allows each folder to be highly standardized and allowing patterns to standout, making this layout suitable\nfor code generation based entirely on the protobuf and the transport requirements of the service. And allowing for\nthe `endpoint` package to be almost the only code requiring domain-specific customizations. That is, a generation\ncommand can take the protobuf and transport type(s) as input and fully generate everything except the implementations of\nthe endpoints.\n\n# Getting started\n\nEach branch documentation links to comparisons with the prior branch and explains the changes made.\n\n[Start here](docs/) and follow along using the branches.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgomatic%2Fgo-kit-phases","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgomatic%2Fgo-kit-phases","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgomatic%2Fgo-kit-phases/lists"}