Versions in this module Expand all Collapse all v1 v1.0.0 Jul 30, 2023 Changes in this version + type Config struct + DSN string + MaxIdleConns int + MaxLifetime time.Duration + MaxOpenConns int + func NewConfig(dsn string) *Config + type Option interface + func WithGCTimeInterval(interval int) Option + func WithSQLDialect(dialect gorp.PostgresDialect) Option + func WithTableName(tableName string) Option + type Store struct + func NewDefaultStore(config *Config) *Store + func NewStore(config *Config, tableName string, gcInterval int) *Store + func NewStoreWithDB(db *sql.DB, tableName string, gcInterval int) *Store + func NewStoreWithOpts(db *sql.DB, opts ...Option) *Store + func (s *Store) Close() + func (s *Store) Create(ctx context.Context, info oauth2.TokenInfo) error + func (s *Store) GetByAccess(ctx context.Context, access string) (oauth2.TokenInfo, error) + func (s *Store) GetByCode(ctx context.Context, code string) (oauth2.TokenInfo, error) + func (s *Store) GetByRefresh(ctx context.Context, refresh string) (oauth2.TokenInfo, error) + func (s *Store) RemoveByAccess(ctx context.Context, access string) error + func (s *Store) RemoveByCode(ctx context.Context, code string) error + func (s *Store) RemoveByRefresh(ctx context.Context, refresh string) error + func (s *Store) SetStdout(stdout io.Writer) *Store + type StoreItem struct + Access string + Code string + Data string + ExpiredAt int64 + ID int64 + Refresh string