{"id":36530984,"url":"https://github.com/ibarryyan/beego-requestid","last_synced_at":"2026-01-12T03:01:20.582Z","repository":{"id":196044756,"uuid":"693716762","full_name":"ibarryyan/beego-requestid","owner":"ibarryyan","description":"RequestId middleware for beego","archived":false,"fork":false,"pushed_at":"2023-09-28T13:06:38.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T15:49:12.357Z","etag":null,"topics":["beego","requestid","web"],"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/ibarryyan.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":"2023-09-19T15:11:23.000Z","updated_at":"2023-09-22T08:55:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"992da2a0-ba6b-49a7-a4ec-003ef272339b","html_url":"https://github.com/ibarryyan/beego-requestid","commit_stats":null,"previous_names":["ibarryyan/beego-requestid"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ibarryyan/beego-requestid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibarryyan%2Fbeego-requestid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibarryyan%2Fbeego-requestid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibarryyan%2Fbeego-requestid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibarryyan%2Fbeego-requestid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibarryyan","download_url":"https://codeload.github.com/ibarryyan/beego-requestid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibarryyan%2Fbeego-requestid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28332840,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"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":["beego","requestid","web"],"created_at":"2026-01-12T03:00:52.725Z","updated_at":"2026-01-12T03:01:20.576Z","avatar_url":"https://github.com/ibarryyan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## beego-requestid\n\n### Introduction\n\nThis is RequestId middleware for Beego Framework , It allows you to customize the way to obtain RequestId and generate RequestId.\n\n### Download\n\n```shell\ngo get -u github.com/ibarryyan/beego-requestid\n```\n\n### Example\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"time\"\n\n\t\"github.com/spf13/cast\"\n\t\"github.com/beego/beego\"\n\t\"github.com/beego/beego/context\"\n\tbeego_requestid \"github.com/ibarryyan/beego-requestid\"\n)\n\nfunc example1() {\n\tbeego.InsertFilter(\"/*\", beego.BeforeRouter, beego_requestid.NewFilter())\n\n\tbeego.Get(\"/hello\", func(c *context.Context) {\n\t\treqId := c.Request.Header.Get(\"X-Request-Id\")\n\t\tlog.Printf(\"reqestid = %s\", reqId)\n\n\t\t_, _ = c.ResponseWriter.Write([]byte(\"hello...\"))\n\t\treturn\n\t})\n\n\tbeego.Run(\":9900\")\n}\n\nfunc example2() {\n\tbeego.InsertFilter(\"/*\", beego.BeforeRouter, beego_requestid.NewFilter(\n\t\tbeego_requestid.WithGenRequestIdFunc(func() string {\n\t\t\treturn cast.ToString(time.Now().Unix())\n\t\t}),\n\t\tbeego_requestid.WithHeaderReqIdKey(\"my_header_reqid\"),\n\t\tbeego_requestid.WithCustomReqIdKey(\"my_reqid\"),\n\t))\n\n\tbeego.Get(\"/hello\", func(c *context.Context) {\n\t\treqId := c.Request.Header.Get(\"my_header_reqid\")\n\t\tlog.Printf(\"reqestid = %s\", reqId)\n\n\t\tcReqId := c.Input.GetData(\"my_reqid\")\n\t\tlog.Printf(\"my reqestid = %s\", cReqId)\n\n\t\t_, _ = c.ResponseWriter.Write([]byte(\"hello...\"))\n\t\treturn\n\t})\n\n\tbeego.Run(\":9900\")\n}\n\n```\n\n### LICENSE\n\nMIT LICENSE\n\n---\n\nThanks for your star ~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibarryyan%2Fbeego-requestid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibarryyan%2Fbeego-requestid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibarryyan%2Fbeego-requestid/lists"}