Documentation ¶
Index ¶
Constants ¶
View Source
const DDL = "CREATE TABLE IF NOT EXISTS %s (" +
" `id` char(64) NOT NULL," +
" `data` longblob NOT NULL," +
" `created` int(11) unsigned NOT NULL DEFAULT '0'," +
" `modified` int(11) unsigned NOT NULL DEFAULT '0'," +
" `expires` int(11) unsigned NOT NULL DEFAULT '0'," +
" PRIMARY KEY (`id`)" +
" ) ENGINE=InnoDB;"
Variables ¶
View Source
var DefaultMaxReconnect = 5
Functions ¶
Types ¶
type MySQLStore ¶
func NewMySQLStore ¶
func NewMySQLStore(cfg *Options) (*MySQLStore, error)
NewMySQLStore takes the following paramaters endpoint - A sql.Open style endpoint tableName - table where sessions are to be saved. Required fields are created automatically if the table doesnot exist. path - path for Set-Cookie header maxAge codecs
func NewMySQLStoreFromConnection ¶
func NewMySQLStoreFromConnection(db *sql.DB, cfg *Options) (*MySQLStore, error)
NewMySQLStoreFromConnection .
Click to show internal directories.
Click to hide internal directories.