Versions in this module Expand all Collapse all v0 v0.0.1 Aug 22, 2019 Changes in this version + const DefaultKey + func GorillaSessions(name string, store Store) gin.HandlerFunc + func Sessions(name string, store Store) gin.HandlerFunc + type GormStore struct + Codecs []securecookie.Codec + SessionOpts *gsessions.Options + func NewGormStore(db *gorm.DB, keyPairs ...[]byte) *GormStore + func NewGormStoreWithOptions(db *gorm.DB, opts GormStoreOptions, keyPairs ...[]byte) *GormStore + func (st *GormStore) Cleanup() + func (st *GormStore) Get(r *http.Request, name string) (*gsessions.Session, error) + func (st *GormStore) MaxAge(age int) + func (st *GormStore) MaxLength(l int) + func (st *GormStore) New(r *http.Request, name string) (*gsessions.Session, error) + func (st *GormStore) Options(options Options) + func (st *GormStore) RenewID(r *http.Request, w http.ResponseWriter, session *gsessions.Session) error + func (st *GormStore) Save(r *http.Request, w http.ResponseWriter, session *gsessions.Session) error + type GormStoreOptions struct + SkipCreateTable bool + TableName string + type JSONSerializer struct + func (s JSONSerializer) Deserialize(d []byte, ss *gsessions.Session) error + func (s JSONSerializer) Serialize(ss *gsessions.Session) ([]byte, error) + type Options struct + Domain string + HttpOnly bool + MaxAge int + Path string + Secure bool + type RediStore struct + Codecs []securecookie.Codec + DefaultMaxAge int + RedisClient *redis.Client + SessionOptions *gsessions.Options + func NewRediStore(client *redis.Client, keyPrefix string, keyPairs ...[]byte) *RediStore + func (s *RediStore) Get(r *http.Request, name string) (*gsessions.Session, error) + func (s *RediStore) New(r *http.Request, name string) (*gsessions.Session, error) + func (s *RediStore) Options(options Options) + func (s *RediStore) RenewID(r *http.Request, w http.ResponseWriter, session *gsessions.Session) error + func (s *RediStore) Save(r *http.Request, w http.ResponseWriter, session *gsessions.Session) error + func (s *RediStore) SetMaxAge(v int) + func (s *RediStore) SetMaxLength(l int) + func (s *RediStore) SetSerializer(ss SessionSerializer) + type Session interface + AddFlash func(value interface{}, vars ...string) + Clear func() + Delete func(key interface{}) + Destroy func() + Flashes func(vars ...string) []interface{} + Get func(key interface{}) interface{} + ID func() string + Options func(Options) + RenewID func() (string, error) + Save func() error + Set func(key interface{}, val interface{}) + SetMaxAge func(maxAge int) + func Default(c *gin.Context) Session + type SessionSerializer interface + Deserialize func(d []byte, ss *gsessions.Session) error + Serialize func(ss *gsessions.Session) ([]byte, error) + type Store interface + Options func(Options) + RenewID func(r *http.Request, w http.ResponseWriter, gsession *sessions.Session) error