Documentation
¶
Index ¶
- type DefaultRandomKeyGenerator
- type GoRedisV9Client
- func (c *GoRedisV9Client) Close(ctx context.Context) error
- func (c *GoRedisV9Client) Del(ctx context.Context, key *SessionKey) error
- func (c *GoRedisV9Client) Get(ctx context.Context, key *SessionKey) ([]byte, bool, error)
- func (c *GoRedisV9Client) Set(ctx context.Context, key *SessionKey, data []byte, expiration time.Duration) error
- func (c *GoRedisV9Client) SetNX(ctx context.Context, key *SessionKey, data []byte, expiration time.Duration) (bool, error)
- type JSONSerde
- type JSONSerializer
- type KeyGenerator
- type RedisClient
- type Redistore
- func (s *Redistore) Close(ctx context.Context) error
- func (s *Redistore) Get(r *http.Request, name string) (*sessions.Session, error)
- func (s *Redistore) New(r *http.Request, name string) (*sessions.Session, error)
- func (s *Redistore) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
- type Serializer
- type SessionKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultRandomKeyGenerator ¶
type DefaultRandomKeyGenerator struct { }
func (*DefaultRandomKeyGenerator) GenerateKey ¶
func (g *DefaultRandomKeyGenerator) GenerateKey() (string, error)
type GoRedisV9Client ¶
type GoRedisV9Client struct {
Client *redis.Client
}
func (*GoRedisV9Client) Del ¶
func (c *GoRedisV9Client) Del(ctx context.Context, key *SessionKey) error
func (*GoRedisV9Client) Get ¶
func (c *GoRedisV9Client) Get(ctx context.Context, key *SessionKey) ([]byte, bool, error)
func (*GoRedisV9Client) Set ¶
func (c *GoRedisV9Client) Set(ctx context.Context, key *SessionKey, data []byte, expiration time.Duration) error
type JSONSerializer ¶
type JSONSerializer struct {
JSONSerde JSONSerde
}
func (JSONSerializer) Deserialize ¶
type KeyGenerator ¶
type RedisClient ¶
type RedisClient interface { Get(ctx context.Context, key *SessionKey) ([]byte, bool, error) Set(ctx context.Context, key *SessionKey, data []byte, expiration time.Duration) error SetNX(ctx context.Context, key *SessionKey, data []byte, expiration time.Duration) (bool, error) Del(ctx context.Context, key *SessionKey) error Close(ctx context.Context) error }
type Redistore ¶
type Redistore struct { RedisClient RedisClient Options sessions.Options KeyGenerator KeyGenerator KeyPrefix string Serializer Serializer NoWaitWritingMode bool }
func MakeDefaultWithGoRedisV9 ¶
func MakeDefaultWithGoRedisV9(goRedisV9Client *redis.Client) *Redistore
type Serializer ¶
type SessionKey ¶
func (*SessionKey) ToString ¶
func (k *SessionKey) ToString() string
Click to show internal directories.
Click to hide internal directories.