{"id":36454862,"url":"https://github.com/go-session/beego-session","last_synced_at":"2026-01-11T23:02:04.442Z","repository":{"id":57560666,"uuid":"133235932","full_name":"go-session/beego-session","owner":"go-session","description":"Session middleware for Beego.","archived":false,"fork":false,"pushed_at":"2018-10-29T01:33:28.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T16:11:18.944Z","etag":null,"topics":[],"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/go-session.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-05-13T12:41:05.000Z","updated_at":"2019-01-17T03:25:48.000Z","dependencies_parsed_at":"2022-08-27T10:22:36.553Z","dependency_job_id":null,"html_url":"https://github.com/go-session/beego-session","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/go-session/beego-session","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-session%2Fbeego-session","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-session%2Fbeego-session/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-session%2Fbeego-session/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-session%2Fbeego-session/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-session","download_url":"https://codeload.github.com/go-session/beego-session/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-session%2Fbeego-session/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28326166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T22:11:01.104Z","status":"ssl_error","status_checked_at":"2026-01-11T22:10:58.990Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2026-01-11T23:02:03.858Z","updated_at":"2026-01-11T23:02:04.437Z","avatar_url":"https://github.com/go-session.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Session middleware for [Beego](https://github.com/astaxie/beego)\n\n[![Build][Build-Status-Image]][Build-Status-Url] [![Codecov][codecov-image]][codecov-url] [![ReportCard][reportcard-image]][reportcard-url] [![GoDoc][godoc-image]][godoc-url] [![License][license-image]][license-url]\n\n## Quick Start\n\n### Download and install\n\n```bash\n$ go get -u -v github.com/go-session/beego-session\n```\n\n### Create file `server.go`\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/astaxie/beego\"\n\t\"github.com/astaxie/beego/context\"\n\t\"github.com/go-session/beego-session\"\n)\n\nfunc main() {\n\tapp := beego.NewApp()\n\n\tapp.Handlers.InsertFilter(\"*\", beego.BeforeRouter, beegosession.New())\n\n\tapp.Handlers.Get(\"/\", func(ctx *context.Context) {\n\t\tstore := beegosession.FromContext(ctx)\n\t\tstore.Set(\"foo\", \"bar\")\n\t\terr := store.Save()\n\t\tif err != nil {\n\t\t\tctx.Abort(500, err.Error())\n\t\t\treturn\n\t\t}\n\t\tctx.Redirect(302, \"/foo\")\n\t})\n\n\tapp.Handlers.Get(\"/foo\", func(ctx *context.Context) {\n\t\tstore := beegosession.FromContext(ctx)\n\t\tfoo, ok := store.Get(\"foo\")\n\t\tif !ok {\n\t\t\tctx.Abort(404, \"not found\")\n\t\t\treturn\n\t\t}\n\t\tctx.WriteString(fmt.Sprintf(\"foo:%s\", foo))\n\t})\n\n\tbeego.BConfig.Listen.HTTPPort = 8080\n\tapp.Run()\n}\n```\n\n### Build and run\n\n```bash\n$ go build server.go\n$ ./server\n```\n\n### Open in your web browser\n\n\u003chttp://localhost:8080\u003e\n\n    foo:bar\n\n\n## MIT License\n\n    Copyright (c) 2018 Lyric\n\n[Build-Status-Url]: https://travis-ci.org/go-session/beego-session\n[Build-Status-Image]: https://travis-ci.org/go-session/beego-session.svg?branch=master\n[codecov-url]: https://codecov.io/gh/go-session/beego-session\n[codecov-image]: https://codecov.io/gh/go-session/beego-session/branch/master/graph/badge.svg\n[reportcard-url]: https://goreportcard.com/report/github.com/go-session/beego-session\n[reportcard-image]: https://goreportcard.com/badge/github.com/go-session/beego-session\n[godoc-url]: https://godoc.org/github.com/go-session/beego-session\n[godoc-image]: https://godoc.org/github.com/go-session/beego-session?status.svg\n[license-url]: http://opensource.org/licenses/MIT\n[license-image]: https://img.shields.io/npm/l/express.svg","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-session%2Fbeego-session","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-session%2Fbeego-session","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-session%2Fbeego-session/lists"}