{"id":21724843,"url":"https://github.com/melihmucuk/monkeys","last_synced_at":"2026-04-30T07:43:00.401Z","repository":{"id":57609776,"uuid":"121307490","full_name":"melihmucuk/monkeys","owner":"melihmucuk","description":"tiny rest framework for golang","archived":false,"fork":false,"pushed_at":"2018-02-14T09:35:59.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-12T20:34:37.873Z","etag":null,"topics":["framework","golang","httprouter","rest"],"latest_commit_sha":null,"homepage":null,"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/melihmucuk.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":"2018-02-12T22:00:32.000Z","updated_at":"2018-02-14T09:24:35.000Z","dependencies_parsed_at":"2022-08-27T11:32:45.876Z","dependency_job_id":null,"html_url":"https://github.com/melihmucuk/monkeys","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/melihmucuk/monkeys","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melihmucuk%2Fmonkeys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melihmucuk%2Fmonkeys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melihmucuk%2Fmonkeys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melihmucuk%2Fmonkeys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/melihmucuk","download_url":"https://codeload.github.com/melihmucuk/monkeys/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melihmucuk%2Fmonkeys/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32458237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","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":["framework","golang","httprouter","rest"],"created_at":"2024-11-26T03:13:43.681Z","updated_at":"2026-04-30T07:43:00.382Z","avatar_url":"https://github.com/melihmucuk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![monkeys team](http://i64.tinypic.com/24ewfwh.jpg)\n\n# monkeys\ntiny rest framework for golang\n\n## Install\n\n```\ngo get -u github.com/melihmucuk/monkeys\n```\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/julienschmidt/httprouter\"\n\t\"github.com/melihmucuk/monkeys\"\n)\n\ntype ItemController struct{}\n\nfunc (ic ItemController) Get() *monkeys.Response {\n\titems := []string{\"item1\", \"item2\"}\n\tdata := map[string][]string{\"items\": items}\n\treturn \u0026monkeys.Response{StatusCode: 200, Data: data}\n}\n\nfunc (ic ItemController) GetByID(ID string) *monkeys.Response {\n\treturn \u0026monkeys.Response{StatusCode: 200, Data: ID}\n}\n\nfunc (ic ItemController) Post(body monkeys.Request) *monkeys.Response {\n\treturn \u0026monkeys.Response{StatusCode: 200, Data: body}\n}\n\n\ntype PingController struct{}\n\nfunc (pc PingController) Get() *monkeys.Response {\n\tdata := make(map[string]interface{})\n\tdata[\"respond\"] = \"pong\"\n\treturn \u0026monkeys.Response{StatusCode: 200, Data: data}\n}\n\n// HostMiddleware custom middleware\nfunc HostMiddleware(next httprouter.Handle) httprouter.Handle {\n\treturn func(w http.ResponseWriter, r *http.Request, p httprouter.Params) {\n\t\tlog.Printf(\"%s\", r.Host)\n\t\tif r.Host == \"localhost:5000\" {\n\t\t\tnext(w, r, p)\n\t\t\treturn\n\t\t}\n\t\tmonkeys.ErrorResponse(http.StatusForbidden, 4, \"Host not allowed!\", w)\n\t}\n}\n\nfunc main() {\n\tapi := monkeys.NewAPI()\n\tapi.Use(monkeys.Logger)\n\tapi.Use(HostMiddleware)\n\tapi.NewEndpointGroup(\"/item\", ItemController{})\n\tapi.NewEndpoint(\"GET\", \"/ping\", PingController{})\n\tapi.Start(5000)\n}\n\n```\n\n## TODO\n\n- [ ] Integrate all http methods (PUT, PATCH etc.)\n- [ ] Create documentation\n- [ ] Write tests\n- [ ] Add benchmark result\n- [ ] Create built-in middleware for CORS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelihmucuk%2Fmonkeys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelihmucuk%2Fmonkeys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelihmucuk%2Fmonkeys/lists"}