2016-05-30 16:08:09 +02:00
|
|
|
// Package store the package is in diffent folder to reduce the import cycles from the ./context/context.go *
|
|
|
|
package store
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
// IStore is the interface which all session stores should implement
|
|
|
|
type IStore interface {
|
2016-07-01 16:00:24 +02:00
|
|
|
Get(string) interface{}
|
|
|
|
GetString(string) string
|
|
|
|
GetInt(string) int
|
|
|
|
Set(string, interface{}) error
|
|
|
|
Delete(string) error
|
2016-05-30 16:08:09 +02:00
|
|
|
Clear() error
|
2016-07-01 16:00:24 +02:00
|
|
|
VisitAll(func(string, interface{}))
|
|
|
|
GetAll() map[string]interface{}
|
2016-05-30 16:08:09 +02:00
|
|
|
ID() string
|
|
|
|
LastAccessedTime() time.Time
|
|
|
|
SetLastAccessedTime(time.Time)
|
|
|
|
Destroy()
|
|
|
|
}
|