Documentation
¶
Index ¶
- Constants
- type Config
- type DBRow
- type Dao
- type Provider
- func (sp *Provider) Count() int
- func (sp *Provider) Destroy(sessionID []byte) error
- func (sp *Provider) GC()
- func (sp *Provider) Get(sessionID []byte) (session.Storer, error)
- func (sp *Provider) Init(expiration time.Duration, cfg session.ProviderConfig) error
- func (sp *Provider) NeedGC() bool
- func (sp *Provider) Put(store session.Storer)
- func (sp *Provider) Regenerate(oldID, newID []byte) (session.Storer, error)
- type Store
Constants ¶
View Source
const ProviderName = "sqlite3"
ProviderName sqlite3 provider name
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(src session.Dict) ([]byte, error)
// session value unSerialize func
UnSerializeFunc func(dst *session.Dict, src []byte) error
}
Config session sqlite3 configuration
func NewConfigWith ¶
NewConfigWith instance new configuration with especific paremters
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
NewDefaultConfig return default configuration
type DBRow ¶
type DBRow struct {
// contains filtered or unexported fields
}
DBRow database row definition
Click to show internal directories.
Click to hide internal directories.