Documentation ¶
Overview ¶
package store contains store implementations
Index ¶
- type Memory
- func (s *Memory) Del(_ context.Context, key string) error
- func (s *Memory) GC()
- func (s *Memory) GCEvery(d time.Duration) *Memory
- func (s *Memory) Get(_ context.Context, key string) (session.Data, error)
- func (s *Memory) Set(_ context.Context, key string, value session.Data, opt session.StoreOption) error
- type Redis
- type Retry
- type SQL
- func (s *SQL) Del(ctx context.Context, key string) error
- func (s *SQL) GC() error
- func (s *SQL) GCEvery(d time.Duration) *SQL
- func (s *SQL) GeneratePostgreSQLStatement(table string, initSchema bool) *SQL
- func (s *SQL) Get(ctx context.Context, key string) (session.Data, error)
- func (s *SQL) Set(ctx context.Context, key string, value session.Data, opt session.StoreOption) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Memory ¶
type Memory struct { Coder session.StoreCoder // contains filtered or unexported fields }
Memory stores session data in memory
type Redis ¶ added in v0.18.0
type Redis struct { Client *redis.Client Prefix string Coder session.StoreCoder }
Redis is the redis store implement by using "github.com/redis/go-redis/v9" package
type Retry ¶
Retry reties store operation when failed
type SQL ¶
type SQL struct { DB *sql.DB Coder session.StoreCoder SetStatement string GetStatement string DelStatement string GCStatement string }
SQL is the sql store
func (*SQL) GeneratePostgreSQLStatement ¶
GeneratePostgrSQLStatement generates postgresql statement
Click to show internal directories.
Click to hide internal directories.