{"id":30134732,"url":"https://github.com/suvidsahay/gorestapi","last_synced_at":"2026-05-14T20:33:22.001Z","repository":{"id":126651717,"uuid":"279493473","full_name":"suvidsahay/GoRestAPI","owner":"suvidsahay","description":"A user CRUD API written in Golang","archived":false,"fork":false,"pushed_at":"2020-08-19T11:07:52.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-03T05:38:37.130Z","etag":null,"topics":["golang","postgres","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/suvidsahay.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,"zenodo":null}},"created_at":"2020-07-14T05:42:41.000Z","updated_at":"2020-08-19T11:07:54.000Z","dependencies_parsed_at":"2023-06-17T13:15:09.641Z","dependency_job_id":null,"html_url":"https://github.com/suvidsahay/GoRestAPI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/suvidsahay/GoRestAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suvidsahay%2FGoRestAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suvidsahay%2FGoRestAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suvidsahay%2FGoRestAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suvidsahay%2FGoRestAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suvidsahay","download_url":"https://codeload.github.com/suvidsahay/GoRestAPI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suvidsahay%2FGoRestAPI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33042212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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","postgres","rest-api"],"created_at":"2025-08-10T21:20:34.441Z","updated_at":"2026-05-14T20:33:21.996Z","avatar_url":"https://github.com/suvidsahay.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rest API Written in Golang\n\n## Setting up a development environment\n\n```bash\n# Get the code\ngit clone https://github.com/suvidsahay/GoRestAPI Factly\ncd Factly\n```\n\n## Configuration\n\n### Postgres database setup\nAssuming that Postgres(v12 or later) is installed:\n* Create role:\n  ```bash\n  sudo -u postgres createuser -P factly     # prompts for password\n  ```\n* Create database:\n  ```bash\n  sudo -u postgres createdb -O factly factly\n  ```\n  \n### Configuration\n  Create .env file based in sample.env and change the password provided while creating the factly user\n  \n ## Starting the web server\n \n The web server can be started as shown below(assuming Go 1.13 is installed. By default it listens for\n HTTP connections on port 5000, so point your client at\n `localhost:5000`.\n \n ```bash\n go run main.go\n```\n\n## Consuming the REST API endpoints\n\n* GET /users\n```bash\ncurl -XGET localhost:5000/users\n```\n\n* POST /user\n```bash\ncurl -XPOST -d '{\"name\":\"Something\"}' -H 'Content-Type: application/json' localhost:5000/user\n```\n\n* PUT /user/{id}\n```bash\ncurl -XPUT -d '{\"name\":\"New Name\"}' -H 'Content-Type: application/json' localhost:5000/user/1\n```\n\n* DELETE /user/{id}\n```bash\ncurl -XDELETE localhost:5000/user/1\n```\n\n## Unit Testing using Go testing package \n\nRun the following to command to test your application\n```bash\ngo test -v\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuvidsahay%2Fgorestapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuvidsahay%2Fgorestapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuvidsahay%2Fgorestapi/lists"}