session

package
v0.0.0-...-d64c4a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2014 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ADDSESSION sessionCommandType = iota
	DELSESSION
	TOUCHSESSION
	UPDATESESSION
	GETSESSION
)

Variables

This section is empty.

Functions

func Go

func Go()

Types

type Session

type Session struct {
	Id         uint64                 `json:"-"`
	ValidUntil int64                  `json:"validuntil"`
	Data       map[string]interface{} `json:"data"`
}

type SessionManager

type SessionManager struct {
	// contains filtered or unexported fields
}

func NewSessionManager

func NewSessionManager() *SessionManager

func (*SessionManager) AddSession

func (ptr *SessionManager) AddSession(data map[string]interface{}) uint64

func (*SessionManager) DelSession

func (ptr *SessionManager) DelSession(id uint64) bool

func (*SessionManager) GetSession

func (ptr *SessionManager) GetSession(id uint64) *Session

func (*SessionManager) TouchSession

func (ptr *SessionManager) TouchSession(id uint64) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL