Documentation ¶
Index ¶
- func ReadCookieByRequest(request *http.Request, name string) (string, bool, error)
- type ConfigStore
- type CookieStore
- func (cs *CookieStore) Get(r *http.Request, name string) (*sessions.Session, error)
- func (cs *CookieStore) MaxAge(age int)
- func (cs *CookieStore) MaxLength(length int)
- func (cs *CookieStore) MinAge(age int)
- func (cs *CookieStore) New(r *http.Request, name string) (*sessions.Session, error)
- func (cs *CookieStore) Save(r *http.Request, w http.ResponseWriter, s *sessions.Session) error
- type RedisStore
- func (rs *RedisStore) Get(r *http.Request, name string) (*sessions.Session, error)
- func (rs *RedisStore) MaxAge(age int)
- func (rs *RedisStore) MaxLength(length int)
- func (rs *RedisStore) MinAge(age int)
- func (rs *RedisStore) New(r *http.Request, name string) (*sessions.Session, error)
- func (rs *RedisStore) Save(r *http.Request, w http.ResponseWriter, s *sessions.Session) error
- func (rs *RedisStore) SetPrefix(prefix string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigStore ¶
type CookieStore ¶
type CookieStore struct {
// contains filtered or unexported fields
}
func NewCookieStore ¶
func NewCookieStore(keyPairs ...[]byte) *CookieStore
func (*CookieStore) MaxAge ¶
func (cs *CookieStore) MaxAge(age int)
func (*CookieStore) MaxLength ¶
func (cs *CookieStore) MaxLength(length int)
func (*CookieStore) MinAge ¶
func (cs *CookieStore) MinAge(age int)
func (*CookieStore) Save ¶
func (cs *CookieStore) Save(r *http.Request, w http.ResponseWriter, s *sessions.Session) error
type RedisStore ¶
type RedisStore struct { Options *sessions.Options Codecs []securecookie.Codec // contains filtered or unexported fields }
func NewRedisStore ¶
func NewRedisStore(rdb redis.UniversalClient, keyPairs ...[]byte) *RedisStore
func (*RedisStore) MaxAge ¶
func (rs *RedisStore) MaxAge(age int)
func (*RedisStore) MaxLength ¶
func (rs *RedisStore) MaxLength(length int)
func (*RedisStore) MinAge ¶
func (rs *RedisStore) MinAge(age int)
func (*RedisStore) Save ¶
func (rs *RedisStore) Save(r *http.Request, w http.ResponseWriter, s *sessions.Session) error
func (*RedisStore) SetPrefix ¶
func (rs *RedisStore) SetPrefix(prefix string)
Click to show internal directories.
Click to hide internal directories.