Versions in this module Expand all Collapse all v1 v1.0.2 Feb 18, 2026 v1.0.1 Feb 18, 2026 Changes in this version + var ErrInvalidCleanupBatchSize = errors.New("postgres: CleanupBatchSize must be >= 0") + var ErrInvalidDB = errors.New("postgres: DB must not be nil") + var ErrInvalidDSN = errors.New("postgres: DSN must not be empty") + var ErrInvalidMaxIdleConns = errors.New("postgres: MaxIdleConns must be >= 0") + var ErrInvalidMaxOpenConns = errors.New("postgres: MaxOpenConns must be >= 0") + type Config struct + CleanupBatchSize int + CleanupInterval time.Duration + ConnMaxLifetime time.Duration + DB *sql.DB + DSN string + MaxIdleConns int + MaxOpenConns int + TableName string + type PostgresStore struct + func New(cfg Config) (*PostgresStore, error) + func (s *PostgresStore) Clear(ctx context.Context) error + func (s *PostgresStore) Close() error + func (s *PostgresStore) Delete(ctx context.Context, key string) error + func (s *PostgresStore) Get(ctx context.Context, key string) ([]byte, error) + func (s *PostgresStore) Set(ctx context.Context, key string, value []byte, ttl time.Duration) error