store

package
v0.0.0-...-c7255b3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadCookieByRequest

func ReadCookieByRequest(request *http.Request, name string) (string, bool, error)

Types

type ConfigStore

type ConfigStore interface {
	sessions.Store
	MaxAge(age int)
	MaxLength(length int)
	MinAge(age int)
}

type CookieStore

type CookieStore struct {
	// contains filtered or unexported fields
}

func NewCookieStore

func NewCookieStore(keyPairs ...[]byte) *CookieStore

func (*CookieStore) Get

func (cs *CookieStore) Get(r *http.Request, name string) (*sessions.Session, error)

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) New

func (cs *CookieStore) New(r *http.Request, name string) (*sessions.Session, error)

func (*CookieStore) Save

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) Get

func (rs *RedisStore) Get(r *http.Request, name string) (*sessions.Session, error)

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) New

func (rs *RedisStore) New(r *http.Request, name string) (*sessions.Session, error)

func (*RedisStore) Save

func (*RedisStore) SetPrefix

func (rs *RedisStore) SetPrefix(prefix string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL