Documentation
¶
Index ¶
- Constants
- type Config
- type DBRow
- type Dao
- type Provider
- func (mp *Provider) Count() int
- func (mp *Provider) Destroy(sessionID []byte) error
- func (mp *Provider) GC()
- func (mp *Provider) Get(sessionID []byte) (session.Storer, error)
- func (mp *Provider) Init(expiration time.Duration, cfg session.ProviderConfig) error
- func (mp *Provider) NeedGC() bool
- func (mp *Provider) Put(store session.Storer)
- func (mp *Provider) Regenerate(oldID, newID []byte) (session.Storer, error)
- type Store
Constants ¶
View Source
const ProviderName = "mysql"
ProviderName mysql provider name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// mysql server host
Host string
// mysql server port
Port int
// mysql username
Username string
// mysql password
Password string
// mysql conn charset
Charset string
// mysql Collate
Collate string
// database name
Database string
// session table name
TableName string
// mysql conn timeout(s)
Timeout int
// mysql read timeout(s)
ReadTimeout int
// mysql write timeout(s)
WriteTimeout int
// mysql max free idle
SetMaxIdleConn int
// mysql 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 mysql configuration
func NewConfigWith ¶
NewConfigWith return 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.