{"id":17958679,"url":"https://github.com/cookiey/yee","last_synced_at":"2025-04-07T22:11:41.591Z","repository":{"id":37346591,"uuid":"261980916","full_name":"cookieY/yee","owner":"cookieY","description":"🦄 Web frameworks for Go, easier \u0026 faster.","archived":false,"fork":false,"pushed_at":"2025-03-13T00:31:07.000Z","size":5974,"stargazers_count":71,"open_issues_count":4,"forks_count":27,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-31T19:37:32.619Z","etag":null,"topics":[],"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/cookieY.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-07T07:31:07.000Z","updated_at":"2025-02-06T07:28:50.000Z","dependencies_parsed_at":"2023-12-18T03:31:37.567Z","dependency_job_id":"ed6abbf8-041f-4e92-9956-dc0fccdadde8","html_url":"https://github.com/cookieY/yee","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cookieY%2Fyee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cookieY%2Fyee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cookieY%2Fyee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cookieY%2Fyee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cookieY","download_url":"https://codeload.github.com/cookieY/yee/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247737788,"owners_count":20987721,"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":[],"created_at":"2024-10-29T11:00:45.995Z","updated_at":"2025-04-07T22:11:41.564Z","avatar_url":"https://github.com/cookieY.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yee\n\n![](https://img.shields.io/badge/build-alpha-brightgreen.svg)  \n![](https://img.shields.io/badge/version-v0.0.1-brightgreen.svg)\n\n🦄 Web frameworks for Go, easier \u0026 faster.\n \nThis is a framework for learning purposes. Refer to the code for Echo and Gin\n\n-   Faster HTTP router\n-   Build RESTful APIs\n-   Group APIs\n-   Extensible middleware framework\n-   Define middleware at root, group or route level\n-   Data binding for URI Query, JSON, XML, Protocol Buffer3 and form payload\n-   HTTP/2(H2C)/Http3(QUIC) support\n\n# Supported Go versions\n\nYee is available as a Go module. You need to use Go 1.13 +\n\n## Example\n\n#### Quick start\n\n```go\n\tfile, err := os.OpenFile(\"logrus.log\", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)\n\t\n\tif err != nil {\n\t    return\n\t}\n\t\n\ty := yee.New()\n\t\n\ty.SetLogLevel(logger.Warning)\n\t\n\ty.SetLogOut(file)\n\t \n\ty.Use(Logger())\n\t \n \ty.Static(\"/assets\", \"dist/assets\")\n\n\ty.GET(\"/\", func(c yee.Context) (err error) {\n\t\treturn c.HTMLTml(http.StatusOK, \"dist/index.html\")\n\t})\n\n \ty.GET(\"/hello\", func(c yee.Context) error {\n\t\treturn c.String(http.StatusOK, \"\u003ch1\u003eHello Gee\u003c/h1\u003e\")\n\t})\n\n\ty.POST(\"/test\", func(c yee.Context) (err error) {\n\t\tu := new(p)\n\t\tif err := c.Bind(u); err != nil {\n\t\t\treturn c.JSON(http.StatusOK, err.Error())\n\t\t}\n\t\treturn c.JSON(http.StatusOK, u.Test)\n\t})\n\n        y.Run(\":9000\")\n```\n\n#### API \n    \nProvide GET POST PUT DELETE HEAD OPTIONS TRACE PATCH\n    \n```go\n    \n  y := yee.New()\n    \n  y.GET(\"/someGet\", handler)\n  y.POST(\"/somePost\", handler)\n  y.PUT(\"/somePut\", handler)\n  y.DELETE(\"/someDelete\", handler)\n  y.PATCH(\"/somePatch\", handler)\n  y.HEAD(\"/someHead\", handler)\n  y.OPTIONS(\"/someOptions\", handler)\n    \n  y.Run(\":8000\")\n    \n```\n    \n#### Restful\n\nYou can use Any \u0026 Restful method to implement your restful api\n\n+ Any\n\n```go\n  y := yee.New()\n    \n  y.Any(\"/any\", handler)\n    \n  y.Run(\":8000\")\n\n  // All request methods for the same URL use the same handler\n\n```\n\n+ Restful\n\n```go\n\n  func userUpdate(c Context) (err error) {\n  \treturn c.String(http.StatusOK, \"updated\")\n  }\n  \n  func userFetch(c Context) (err error) {\n  \treturn c.String(http.StatusOK, \"get it\")\n  }\n  \n  func RestfulApi() yee.RestfulApi {\n  \treturn RestfulApi{\n  \t\tGet:  userFetch,\n  \t\tPost: userUpdate,\n  \t}\n  }\n  \n  y := New()\n  \n  y.Restful(\"/\", testRestfulApi())\n  \n  y.Run(\":8000\")\n \n// All request methods for the same URL use the different handler\n\n \n```\n\n## Middleware\n\n   - basic auth\n   - cors\n   - crfs\n   - gzip\n   - jwt\n   - logger\n   - rate limit\n   - recovery\n   - secure\n   - request id\n   \n## Benchmark\n  \n  Resource\n  - CPU: i7-9750H\n  - Memory: 16G \n  - OS: macOS 10.15.5\n  \n  Date: 2020/06/17\n    \n  ![](img/benchmark.png)\n  \n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcookiey%2Fyee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcookiey%2Fyee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcookiey%2Fyee/lists"}