{"id":19143812,"url":"https://github.com/ashwin-rajeev/golang-simple-api-server","last_synced_at":"2026-04-28T12:34:57.357Z","repository":{"id":64881044,"uuid":"397295529","full_name":"Ashwin-Rajeev/golang-simple-api-server","owner":"Ashwin-Rajeev","description":"A simple Dockerised API server using Golang and PostgreSQL.","archived":false,"fork":false,"pushed_at":"2021-08-17T15:00:31.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T19:30:27.301Z","etag":null,"topics":["api","docker","docker-compose","golang","pgweb","postgresql","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ashwin-Rajeev.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}},"created_at":"2021-08-17T14:55:47.000Z","updated_at":"2022-12-16T21:47:01.000Z","dependencies_parsed_at":"2022-12-19T02:51:04.998Z","dependency_job_id":null,"html_url":"https://github.com/Ashwin-Rajeev/golang-simple-api-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ashwin-Rajeev/golang-simple-api-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashwin-Rajeev%2Fgolang-simple-api-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashwin-Rajeev%2Fgolang-simple-api-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashwin-Rajeev%2Fgolang-simple-api-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashwin-Rajeev%2Fgolang-simple-api-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ashwin-Rajeev","download_url":"https://codeload.github.com/Ashwin-Rajeev/golang-simple-api-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashwin-Rajeev%2Fgolang-simple-api-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32381686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T11:25:28.583Z","status":"ssl_error","status_checked_at":"2026-04-28T11:25:05.435Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","docker","docker-compose","golang","pgweb","postgresql","rest-api"],"created_at":"2024-11-09T07:32:54.413Z","updated_at":"2026-04-28T12:34:57.339Z","avatar_url":"https://github.com/Ashwin-Rajeev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Golang simple API server\n\nA simple Dockerised API server using Golang and PostgreSQL.\n\n\n### Project Structure\n```\n    - internal\n            |\n            /app\n                /api_helper.go\n                /api.go\n                /dal.go\n                /models.go\n                /repo.go\n                /router.go\n                /server.go\n    - migration\n            |\n            /initial_migration.sql\n    - docker-compose.yml\n    - go.mod\n    - go.sum\n    - main.go\n\n```\n\n### Dependencies\n\u003e docker-compose == 1.29.2 \\\nGolang == 1.16\n\n### Steps to Execute \n#### 1. Git clone golang-simple-api-server \n```bash\ngit clone {github url here} golang-simple-api-server\n```\n#### 2. goto golang-simple-api-server \n```bash\ncd golang-simple-api-server\n```\n#### 3. start the postgres and pgweb docker \n```bash\ndocker-compose up -d\n```\n#### 4. Build the Application\n```bash\ngo build -o app \n```\n#### 5. Run the application\n```bash\n./app\n```\n\nGo to your browser : http://127.0.0.1:3000/api/\n\n### Available API End Points\n\n\u003e GET   : http://127.0.0.1:3000/api/status \u003cbr\u003e\n\n\u003e POST  : http://127.0.0.1:3000/api/category\n#### Sample Body\n```bash\n{\n    \"name\": \"category1\",\n    \"parent_category\": 3\n}\n```\n\n\u003e GET   : http://127.0.0.1:3000/api/categories \u003cbr\u003e\n\n\u003e POST  : http://127.0.0.1:3000/api/product\n#### Sample Body\n```bash\n{\n    \"name\": \"product1\",\n    \"price\": 100,\n    \"category_ids\": [\n        1,\n        2\n    ]\n}\n```\n\u003e PUT   : http://127.0.0.1:3000/api/product\n#### Sample Body\n```bash\n{\n    \"id\": 1,\n    \"name\": \"Product1\",\n    \"price\": 1200\n}\n```\n\u003e GET   : http://127.0.0.1:3000/api//products/{category}","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashwin-rajeev%2Fgolang-simple-api-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashwin-rajeev%2Fgolang-simple-api-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashwin-rajeev%2Fgolang-simple-api-server/lists"}