{"id":48270901,"url":"https://github.com/no-src/gin-session-redis","last_synced_at":"2026-04-04T22:14:39.187Z","repository":{"id":173075527,"uuid":"650213403","full_name":"no-src/gin-session-redis","owner":"no-src","description":"Gin middleware for session management","archived":false,"fork":false,"pushed_at":"2024-10-21T05:16:34.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-21T08:12:25.625Z","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/no-src.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-06-06T15:29:03.000Z","updated_at":"2024-10-21T05:16:32.000Z","dependencies_parsed_at":"2023-12-11T06:53:10.417Z","dependency_job_id":"2e75517f-95d2-4fa1-81e5-51788f014f07","html_url":"https://github.com/no-src/gin-session-redis","commit_stats":null,"previous_names":["no-src/gin-session-redis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/no-src/gin-session-redis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/no-src%2Fgin-session-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/no-src%2Fgin-session-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/no-src%2Fgin-session-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/no-src%2Fgin-session-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/no-src","download_url":"https://codeload.github.com/no-src/gin-session-redis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/no-src%2Fgin-session-redis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31416761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: 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-04-04T22:14:37.791Z","updated_at":"2026-04-04T22:14:39.176Z","avatar_url":"https://github.com/no-src.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gin-session-redis\n\n[![Build](https://img.shields.io/github/actions/workflow/status/no-src/gin-session-redis/go.yml?branch=main)](https://github.com/no-src/gin-session-redis/actions)\n[![License](https://img.shields.io/github/license/no-src/gin-session-redis)](https://github.com/no-src/gin-session-redis/blob/main/LICENSE)\n[![Go Reference](https://pkg.go.dev/badge/github.com/no-src/gin-session-redis.svg)](https://pkg.go.dev/github.com/no-src/gin-session-redis)\n[![Go Report Card](https://goreportcard.com/badge/github.com/no-src/gin-session-redis)](https://goreportcard.com/report/github.com/no-src/gin-session-redis)\n[![codecov](https://codecov.io/gh/no-src/gin-session-redis/branch/main/graph/badge.svg?token=8KyEH2gGtv)](https://codecov.io/gh/no-src/gin-session-redis)\n[![Release](https://img.shields.io/github/v/release/no-src/gin-session-redis)](https://github.com/no-src/gin-session-redis/releases)\n\nGin middleware for session management with redis store.\n\nThe gin-session-redis project is a fork\nof [gin-contrib/sessions/redis](https://github.com/gin-contrib/sessions/tree/master/redis).\nThe purpose of this fork is to replace the [redigo](https://github.com/gomodule/redigo)\nwith [go-redis](https://github.com/redis/go-redis) as the driver of redis store.\n\n## Usage\n\nDownload and install it:\n\n```bash\ngo get -u github.com/no-src/gin-session-redis\n```\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"github.com/gin-contrib/sessions\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/no-src/gin-session-redis/redis\"\n)\n\nfunc main() {\n\tr := gin.Default()\n\tstore, _ := redis.NewStore(10, \"tcp\", \"localhost:6379\", \"\", []byte(\"secret\"))\n\tr.Use(sessions.Sessions(\"mysession\", store))\n\n\tr.GET(\"/incr\", func(c *gin.Context) {\n\t\tsession := sessions.Default(c)\n\t\tvar count int\n\t\tv := session.Get(\"count\")\n\t\tif v == nil {\n\t\t\tcount = 0\n\t\t} else {\n\t\t\tcount = v.(int)\n\t\t\tcount++\n\t\t}\n\t\tsession.Set(\"count\", count)\n\t\tsession.Save()\n\t\tc.JSON(200, gin.H{\"count\": count})\n\t})\n\tr.Run(\":8000\")\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fno-src%2Fgin-session-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fno-src%2Fgin-session-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fno-src%2Fgin-session-redis/lists"}