Documentation ¶
Index ¶
- Constants
- type Config
- type Provider
- func (sp *Provider) Count() int
- func (sp *Provider) Destroy(sessionId string) error
- func (sp *Provider) GC()
- func (sp *Provider) Init(lifeTime int64, sqlite3Config fasthttpsession.ProviderConfig) error
- func (sp *Provider) NeedGC() bool
- func (sp *Provider) ReadStore(sessionId string) (fasthttpsession.SessionStore, error)
- func (sp *Provider) Regenerate(oldSessionId string, sessionId string) (fasthttpsession.SessionStore, error)
- type Store
Constants ¶
View Source
const ProviderName = "sqlite3"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // sqlite3 db file path DBPath string // session table name TableName string // sqlite3 max free idle SetMaxIdleConn int // sqlite3 max open idle SetMaxOpenConn int // session value serialize func SerializeFunc func(data map[string]interface{}) ([]byte, error) // session value unSerialize func UnSerializeFunc func(data []byte) (map[string]interface{}, error) }
func NewConfigWith ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) Init ¶
func (sp *Provider) Init(lifeTime int64, sqlite3Config fasthttpsession.ProviderConfig) error
init provider config
func (*Provider) ReadStore ¶
func (sp *Provider) ReadStore(sessionId string) (fasthttpsession.SessionStore, error)
read session store by session id
func (*Provider) Regenerate ¶
func (sp *Provider) Regenerate(oldSessionId string, sessionId string) (fasthttpsession.SessionStore, error)
regenerate session
type Store ¶
type Store struct {
fasthttpsession.Store
}
func NewSqLite3StoreData ¶
new sqlite3 store data
Click to show internal directories.
Click to hide internal directories.