{"id":37188142,"url":"https://github.com/luffyke/beegoapix","last_synced_at":"2026-01-14T21:52:50.026Z","repository":{"id":57528770,"uuid":"76517501","full_name":"luffyke/beegoapix","owner":"luffyke","description":"Beego api extension framework","archived":false,"fork":false,"pushed_at":"2017-04-10T06:24:22.000Z","size":23,"stargazers_count":29,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-07-10T09:09:30.657Z","etag":null,"topics":["api","beego","go","golang"],"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/luffyke.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":"2016-12-15T02:45:39.000Z","updated_at":"2023-07-10T09:09:30.658Z","dependencies_parsed_at":"2022-09-10T20:31:24.019Z","dependency_job_id":null,"html_url":"https://github.com/luffyke/beegoapix","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"purl":"pkg:github/luffyke/beegoapix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luffyke%2Fbeegoapix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luffyke%2Fbeegoapix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luffyke%2Fbeegoapix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luffyke%2Fbeegoapix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luffyke","download_url":"https://codeload.github.com/luffyke/beegoapix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luffyke%2Fbeegoapix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T21:32:52.117Z","status":"ssl_error","status_checked_at":"2026-01-14T21:32:33.442Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","beego","go","golang"],"created_at":"2026-01-14T21:52:49.237Z","updated_at":"2026-01-14T21:52:50.019Z","avatar_url":"https://github.com/luffyke.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[中文文档](./README.zh-cn.md)\n\n## beegoapix\nbeegoapix is beego api extension framework, to develop more faster api service.\n\n## Install\n```\ngo get github.com/luffyke/beegoapix\n```\n\n## Function\n1. Http API handling, accept all client http request, reflect and call sub-controller to handle request(v0.1)\n2. Logging, log request and response(v0.1)\n3. Error handling(v0.1)\n4. [API version control(v0.2)](https://github.com/luffyke/beegoapix/wiki/API-version-control)\n5. API authority control(v0.2)\n6. Combine controller\n7. Cache(etag)\n\n## Demo\n#### Setup environment\n```bash\ngo get github.com/astaxie/beego\ngo get github.com/luffyke/beegoapix\ngo get github.com/beego/bee\n```\n\n#### New api project\n```\nbee api hello\n```\n\n#### Edit router.go\n```\npackage routers\n\nimport (\n\t\"hello/controllers\"\n\t\"github.com/luffyke/beegoapix\"\n)\n\nfunc init() {\n\tbeegoapix.Router()\n\t// add your business path mapping\n\tbeegoapix.RegController(\"app\", controllers.AppController{})\n}\n```\n\n#### Business controller\n```\npackage controllers\n\nimport (\n\t\"github.com/luffyke/beegoapix/api\"\n\n\t\"github.com/astaxie/beego/logs\"\n)\n\ntype AppController struct {\n}\n\nfunc (this *AppController) CheckVersion(request api.ApiRequest) (response api.ApiResponse) {\n\tlogs.Debug(request.Id)\n\tlogs.Debug(request.Data[\"versionCode\"])\n\tresponse.Data = make(map[string]interface{})\n\tresponse.Data[\"versionName\"] = \"version name 1.0\"\n\treturn response\n}\n```\n\n#### Run the server\n```\nbee run\n```\n\n#### Post the request\n```\nhttp://localhost:8080/v1/app/check-version\n```\n\n#### Request\n```\n{\n  \"id\":\"12345678\",\n  \"sign\":\"abc\",\n  \"client\":{\n    \"caller\":\"app\",\n    \"os\":\"android\",\n    \"ver\":\"1.0\",\n    \"platform\":\"android\",\n    \"ch\":\"offical\",\n    \"ex\":{\n      \"imei\":\"1a2b3c\"\n    }\n  },\n  \"page\":{\n  \t\"page\":1,\n  \t\"size\":10\n  },\n  \"user\":{\n    \"uid\":\"123\",\n    \"sid\":\"abc\"\n  },\n  \"data\":{\n    \"versionCode\":\"v1.0.0\"\n  }\n}\n```\n\n##### Response\n```\n{\n    \"state\": {\n        \"code\": 0,\n        \"msg\": \"\"\n    },\n    \"data\": {\n        \"versionName\": \"version name 1.0\"\n    }\n}\n```\n\n## Deploy\n1. setup go environment\n2. install beego and beegoapix\n```\ngo get github.com/astaxie/beego\ngo get github.com/luffyke/beegoapix\n```\n3. download and run [beego deploy shell](https://gist.github.com/luffyke/790154ec5142abd9fd6245a5fd8b9427)\n\n## Android demo\nplease reference to project [beegoapix-android-demo](https://github.com/luffyke/beegoapix-android-demo)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluffyke%2Fbeegoapix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluffyke%2Fbeegoapix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluffyke%2Fbeegoapix/lists"}