{"id":19793958,"url":"https://github.com/ymichael/sessions","last_synced_at":"2025-10-14T21:06:15.232Z","repository":{"id":32429024,"uuid":"36006738","full_name":"ymichael/sessions","owner":"ymichael","description":"Simple Server-Side Sessions for Goji","archived":false,"fork":false,"pushed_at":"2015-05-21T11:27:45.000Z","size":150,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T07:52:51.564Z","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/ymichael.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":"2015-05-21T10:32:36.000Z","updated_at":"2018-04-09T04:05:20.000Z","dependencies_parsed_at":"2022-08-26T21:19:34.530Z","dependency_job_id":null,"html_url":"https://github.com/ymichael/sessions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymichael%2Fsessions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymichael%2Fsessions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymichael%2Fsessions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymichael%2Fsessions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ymichael","download_url":"https://codeload.github.com/ymichael/sessions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251812295,"owners_count":21647882,"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-11-12T07:11:44.636Z","updated_at":"2025-10-14T21:06:10.209Z","avatar_url":"https://github.com/ymichael.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sessions\n\nSimple server-side sessions for [goji](goji.io).\n\n```go\ngoji.Use(Sessions.Middleware())\n```\n\n## Dependencies\n- [github.com/fzzy/radix](https://github.com/fzzy/radix) _If using RedisStore_.\n\n\n## Usage\nIn-memory session store:\n\n```go\nvar secret               = \"thisismysecret\"\nvar inMemorySessionStore = sessions.MemoryStore{}\nvar Sessions             = sessions.NewSessionOptions(secret, \u0026inMemorySessionStore)\n```\n\nUsing Redis (using fzzy/radix):\n\n```go\nvar redisSessionStore = sessions.NewRedisStore(\"tcp\", \"localhost:6379\")\nvar Sessions          = sessions.NewSessionOptions(secret, redisSessionStore)\n```\n\nUse middleware:\n\n```go\ngoji.Use(Sessions.Middleware())\n```\n\nAccessing session variable:\n\n```go\nfunc handler(c web.C, w http.ResponseWriter, r *http.Request) {\n    sessionObj := Sessions.GetSessionObject(\u0026c)\n\n    // Regnerate session..\n    Sessions.RegenerateSession(\u0026c)\n\n    // Delete session\n    Sessions.DeleteSession(\u0026c)\n}\n```\n\nSee examples folder for full example.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymichael%2Fsessions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fymichael%2Fsessions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymichael%2Fsessions/lists"}