{"repo":"speakeasy-api/rest-template-go","free":true,"listed":false,"github":"https://github.com/speakeasy-api/rest-template-go","clone":"git clone https://github.com/speakeasy-api/rest-template-go.git","description":"Template go lang service to showcase REST best practices. Built by the Speakeasy team.","language":"Go","stars":263,"topics":["golang","rest","api-documentation","api-server","apiops","best-practices","mux","rest-api","go-api","go-http-middleware"],"license":"Apache-2.0","category":"api-integrations-sdks","readme_excerpt":"Docs Quickstart &nbsp;&nbsp;//&nbsp;&nbsp; Join us on Slack The RESTful API Template Project [Golang] How To Use This Repo This repo is intended to be used by Golang developers seeking to understand the building blocks of a simple and well-constructed REST API service. We have built a simple CRUD API which exhibits the characteristics we expect our own developers to apply to the APIs we build at Speakeasy: - Entity-based : The resources available should represent the domain model. Each resource should have the CRUD methods implemented (even if not all available to API consumers). In our template, we have a single resource defined (users.go). However other resources could be easily added by copying the template and changing the logic of the service layer. - Properly Abstracted : The Transport, service, and data layers are all cleanly abstracted from one another. This makes it easy to make apply updates to the API endpoints - Consistent : It's important that consumers of a service have guaranteed consistency across the entire range of API endpoints and methods. In this service, responses are consistently formatted whether successfully returning a JSON object or responding with an error code. All the service's methods use shared response (http.go) and error (errors.go) handler functions to ensure consistency. - Tested : We believe that a blend of unit and integration testing is important for ensuring that the service maintains its contract with consumers. The service repo theref","default_branch":null,"files":null,"tree":[],"storefront":"/r/speakeasy-api","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/speakeasy-api/rest-template-go/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}