{"id":20608749,"url":"https://github.com/andeya/rester","last_synced_at":"2025-07-28T05:05:48.984Z","repository":{"id":64302527,"uuid":"272701580","full_name":"andeya/rester","owner":"andeya","description":"Fast and concise RESTful web framework based on fasthttp","archived":false,"fork":false,"pushed_at":"2020-07-15T16:31:12.000Z","size":153,"stargazers_count":27,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-21T23:37:19.610Z","etag":null,"topics":["fasthttp","restful"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andeya.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":"2020-06-16T12:26:04.000Z","updated_at":"2022-04-04T00:11:24.000Z","dependencies_parsed_at":"2023-01-15T09:45:41.113Z","dependency_job_id":null,"html_url":"https://github.com/andeya/rester","commit_stats":null,"previous_names":["henrylee2cn/rester"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/andeya/rester","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andeya%2Frester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andeya%2Frester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andeya%2Frester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andeya%2Frester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andeya","download_url":"https://codeload.github.com/andeya/rester/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andeya%2Frester/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261211682,"owners_count":23125543,"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","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":["fasthttp","restful"],"created_at":"2024-11-16T10:11:44.424Z","updated_at":"2025-06-21T23:37:27.722Z","avatar_url":"https://github.com/andeya.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rester [![report card](https://goreportcard.com/badge/github.com/henrylee2cn/rester?style=flat-square)](http://goreportcard.com/report/henrylee2cn/rester) [![GitHub release](https://img.shields.io/github/release/henrylee2cn/rester.svg?style=flat-square)](https://github.com/henrylee2cn/rester/releases) [![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://pkg.go.dev/github.com/henrylee2cn/rester?tab=doc) [![view Go网络编程群](https://img.shields.io/badge/官方QQ群-Go网络编程(42730308)-27a5ea.svg?style=flat-square)](http://jq.qq.com/?_wv=1027\u0026k=fzi4p1)\n\nFast and concise RESTful web framework based on [fasthttp](https://github.com/valyala/fasthttp).\n\n## Example\n\n```go\npackage main\n\nimport \"github.com/henrylee2cn/rester\"\n\ntype MwCtl struct {\n\trester.BaseCtl\n\tskip bool\n}\n\nfunc (ctl *MwCtl) Any(args struct {\n\tA string `query:\"a\"`\n}) {\n\tctl.Logger().Printf(\"MwCtl: a=%s\", args.A)\n\tif !ctl.skip {\n\t\tctl.SetUserValue(\"a\", args.A)\n\t}\n}\n\ntype EchoCtl struct {\n\tMwCtl\n}\n\nfunc (ctl *EchoCtl) GET(args struct {\n\tB []string `query:\"b\"`\n}) {\n\tctl.Logger().Printf(\"EchoCtl: b=%v\", args.B)\n\tctl.OK(rester.H{\n\t\t\"a\": ctl.UserValue(\"a\"),\n\t\t\"b\": args.B,\n\t})\n}\n\nfunc main() {\n\tengine := rester.New()\n\tengine.DefControl(\"/\", new(EchoCtl))\n\tengine.Control(\"/from\", func() rester.Controller {\n\t\treturn \u0026EchoCtl{\n\t\t\tMwCtl{skip: true},\n\t\t}\n\t})\n\terr := engine.ListenAndServe(\":8080\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\t// request:\n\t//  GET http://localhost:8080/?a=x\u0026b=y\u0026b=z\n\t// log:\n\t//  - MwCtl: a=x\n\t//  - EchoCtl: b=[y z]\n\t// response:\n\t//  {\"a\":\"x\",\"b\":[\"y\",\"z\"]}\n\n\t// request:\n\t//  GET http://localhost:8080/from?a=x\u0026b=y\u0026b=z\n\t// log:\n\t//  - MwCtl: a=x\n\t//  - EchoCtl: b=[y z]\n\t// response:\n\t//  {\"a\":null,\"b\":[\"y\",\"z\"]}\n}\n```\n\n[More examples](https://github.com/henrylee2cn/rester/tree/master/example)\n\n## Binding\n\n[binding doc](https://github.com/henrylee2cn/rester/blob/master/binding/README.md)\n\n## Controller\n\nDesign of method call chain for anonymous field of controller\n\n![Struct Method Chain](https://github.com/henrylee2cn/rester/raw/master/doc/chain.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandeya%2Frester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandeya%2Frester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandeya%2Frester/lists"}