{"id":20991394,"url":"https://github.com/yashmeh/golang-restapi","last_synced_at":"2025-08-02T02:12:11.879Z","repository":{"id":56703353,"uuid":"293828115","full_name":"YashMeh/golang-restAPI","owner":"YashMeh","description":"Just for the sake of learning clean architecture with golang.","archived":false,"fork":false,"pushed_at":"2020-10-24T04:09:31.000Z","size":4216,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T17:57:49.028Z","etag":null,"topics":["golang","hacktoberfest","rest-api"],"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/YashMeh.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":"2020-09-08T14:03:23.000Z","updated_at":"2023-03-04T11:05:14.000Z","dependencies_parsed_at":"2022-08-15T23:40:19.333Z","dependency_job_id":null,"html_url":"https://github.com/YashMeh/golang-restAPI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YashMeh/golang-restAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashMeh%2Fgolang-restAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashMeh%2Fgolang-restAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashMeh%2Fgolang-restAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashMeh%2Fgolang-restAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YashMeh","download_url":"https://codeload.github.com/YashMeh/golang-restAPI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashMeh%2Fgolang-restAPI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268326739,"owners_count":24232496,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["golang","hacktoberfest","rest-api"],"created_at":"2024-11-19T06:38:36.412Z","updated_at":"2025-08-02T02:12:11.847Z","avatar_url":"https://github.com/YashMeh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## RESTful API using golang\n\n\u003cbr\u003e\n\n[![Go Report Card](https://www.goreportcard.com/badge/github.com/YashMeh/golang-restAPI)](https://www.goreportcard.com/badge/github.com/YashMeh/golang-restAPI)\n\n\u003cbr\u003e\nThis is a very simple REST api, made entirely for the sake of learning coding patterns in golang.Any suggestions are welcome :smiley:\n\n### Endpoints\n\n| Method | Endpoint     | Description                        |\n| ------ | ------------ | ---------------------------------- |\n| GET    | /api/books   | returns the list of all books      |\n| GET    | /api/book/id | returns the book with the given id |\n| POST   | /api/books   | creates a book                     |\n| PUT    | /api/book/id | updates the book with the given id |\n| DELETE | /api/book/id | deletes the book with the given id |\n\n### Setup\n\n- Create postgres table using `table.sql`\n\n- Setup environment variables in the root directory using\n\n```\nexport DBHOST=127.0.0.1\nexport DBPORT=5432\nexport DBUSER=parzival\nexport DBPASS=yash123\nexport DBNAME=foo\n```\n\n### Running :running:\n\n```\ngo build -o restapi \u0026\u0026 ./restapi\n```\n\n### Testing :rotating_light:\n\n- Start the API using\n\n```\ngo build -o restapi \u0026\u0026 ./restapi\n```\n\n- Run the tests\n\n```\ngo test\n```\n\n### Todo\n\n- [x] Include route tests\n- [ ] Include integration tests\n- [x] Dockerize\n- [x] Generate go-report\n- [ ] Create CI\n\n### References\n\n- [Clean Architecture by Angad Sharma](https://github.com/L04DB4L4NC3R/clean-architecture-sample)\n\n- [Full stack epic part - 1](https://github.com/morris-ribs/musicstore)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashmeh%2Fgolang-restapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyashmeh%2Fgolang-restapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashmeh%2Fgolang-restapi/lists"}