Session support for tango
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lunny Xiao b9d4fc3602
add drone
5 月之前
.drone.yml add drone 5 月之前
.gitignore bug fixed 3 年之前
LICENSE license 5 年之前 use go mod & add drone 10 月之前
circle.yml update CI config 2 年之前
generator.go license 5 年之前
go.mod add drone 5 月之前
go.sum add drone 5 月之前
memorystore.go added HeaderTracker 4 年之前
session.go improve the Sessioner and memory usage 2 年之前
session_test.go migrate to 1 年之前
sessions.go migrate to 1 年之前
store.go Revert "Update store.go" 4 年之前
tracker.go added HeaderTracker 4 年之前

session Build Status

Session is a session middleware for Tango.

Backend Supports

Currently session support some backends below:

  • Memory - memory as a session store, this is the default store
  • nodb - nodb as a session store
  • redis - redis server as a session store
  • ledis - ledis server as a session store
  • ssdb - ssdb server as a session store


go get

Simple Example

package main

import (

type SessionAction struct {

func (a *SessionAction) Get() string {
    a.Session.Set("test", "1")
    return a.Session.Get("test").(string)

func main() {
    o := tango.Classic()
        MaxAge:time.Minute * 20,
    o.Get("/", new(SessionAction))

Getting Help


This project is under BSD License. See the LICENSE file for the full license text.