{"id":50749946,"url":"https://github.com/whalelogic/restgo","last_synced_at":"2026-06-11T00:30:57.064Z","repository":{"id":363129278,"uuid":"1262030285","full_name":"whalelogic/restgo","owner":"whalelogic","description":"A lightweight, production-ready RESTful Employee API built with Go using the native standard library and backed by Redis/Valkey.","archived":false,"fork":false,"pushed_at":"2026-06-07T15:09:04.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-07T16:20:03.005Z","etag":null,"topics":["api","employees","golang","json","redis","restful","starter-kit","template","valkey","yaml"],"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/whalelogic.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-07T13:34:10.000Z","updated_at":"2026-06-07T15:11:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/whalelogic/restgo","commit_stats":null,"previous_names":["whalelogic/restgo"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/whalelogic/restgo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whalelogic%2Frestgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whalelogic%2Frestgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whalelogic%2Frestgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whalelogic%2Frestgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whalelogic","download_url":"https://codeload.github.com/whalelogic/restgo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whalelogic%2Frestgo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34177445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"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":["api","employees","golang","json","redis","restful","starter-kit","template","valkey","yaml"],"created_at":"2026-06-11T00:30:55.273Z","updated_at":"2026-06-11T00:30:57.053Z","avatar_url":"https://github.com/whalelogic.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Employee API 👨‍💼👩‍⚕️👨🏽‍🏭\n\nA lightweight RESTful API for managing employee records built with **Go** (standard library `net/http`) and **Redis**.\n\nRepository: `github.com/whalelogic/restgo`\n\n## Environment Variables\n\n| Variable | Description | Default Value |\n| :--- | :--- | :--- |\n| `REDIS_ADDR` | Network address (host:port) of the Redis instance | `localhost:6379` |\n\n### Setting the Environment Variable (macOS \u0026 Linux)\n```bash\n# Inline execution\nREDIS_ADDR=\"127.0.0.1:6379\" go run main.go\n\n# Session-wide export\nexport REDIS_ADDR=\"127.0.0.1:6379\"\n\n```\n\n## API Endpoints Reference\n\nThe service listens on port `:8080`.\n\n| Method | Endpoint | Description |\n| :--- | :--- | :--- |\n| `GET` | `/employees` | List all employees |\n| `GET` | `/employees/{id}` | Get employee by ID |\n| `POST` | `/employees` | Create a new employee |\n| `PUT` | `/employees/{id}` | Fully update/replace an employee |\n| `PATCH` | `/employees/{id}` | Partially update an employee |\n| `DELETE` | `/employees/{id}` | Delete an employee |\n\n\n## cURL Examples\n\n### 1. Get All Employees\n\nBash\n\n```\ncurl -X GET http://localhost:8080/employees\n\n```\n\n### 2. Get Employee by ID\n\nBash\n\n```\ncurl -X GET http://localhost:8080/employees/emp_01J8\n\n```\n\n### 3. Create Employee\n\nBash\n\n```\ncurl -X POST http://localhost:8080/employees \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"Alex Smith\", \"role\": \"DevOps\", \"email\": \"alex@example.com\"}'\n\n```\n\n### 4. Update Employee (Full Replacement)\n\nBash\n\n```\ncurl -X PUT http://localhost:8080/employees/emp_01J8 \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"Alex Smith\", \"role\": \"Lead DevOps\", \"email\": \"alex@example.com\"}'\n\n```\n\n### 5. Patch Employee (Partial Update)\n\nBash\n\n```\ncurl -X PATCH http://localhost:8080/employees/emp_01J8 \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"role\": \"Principal DevOps\"}'\n\n```\n\n### 6. Delete Employee\n\nBash\n\n```\ncurl -X DELETE http://localhost:8080/employees/emp_01J8\n\n```\n\n## Internal Routing Architecture\n\nThe routing maps directly to the `employee.EmployeeHandler` struct via Go's native standard library routing:\n\nGo\n\n```\nmux := http.NewServeMux()\nmux.HandleFunc(\"GET /employees\", h.List)\nmux.HandleFunc(\"GET /employees/{id}\", h.Get)\nmux.HandleFunc(\"POST /employees\", h.Create)\nmux.HandleFunc(\"PUT /employees/{id}\", h.Update)\nmux.HandleFunc(\"PATCH /employees/{id}\", h.Patch)\nmux.HandleFunc(\"DELETE /employees/{id}\", h.Delete)\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhalelogic%2Frestgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhalelogic%2Frestgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhalelogic%2Frestgo/lists"}