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 87f6e468e4
2 years ago
.drone.yml add drone 3 years ago
.gitignore bug fixed 7 years ago
LICENSE license 8 years ago use go mod & add drone 4 years ago
circle.yml update CI config 6 years ago
generator.go license 8 years ago
go.mod add drone 3 years ago
go.sum add drone 3 years ago
memorystore.go Session新增Keys方法,返回所有的Keys 2 years ago
session.go Session新增Keys方法,返回所有的Keys 2 years ago
session_test.go Session新增Keys方法,返回所有的Keys 2 years ago
sessions.go migrate to 4 years ago
store.go Session新增Keys方法,返回所有的Keys 2 years ago
tracker.go added HeaderTracker 7 years ago

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.