Documentation
¶
Overview ¶
Package sqlstore persists tenant extensions in the tenant database.
Index ¶
- type Store
- func (s *Store) Create(ctx context.Context, r extension.Registration) error
- func (s *Store) Delete(ctx context.Context, site, name string) error
- func (s *Store) List(ctx context.Context, site string) ([]extension.Summary, error)
- func (s *Store) RotateSecret(ctx context.Context, r extension.SecretRotation) error
- func (s *Store) VerifyAccessToken(ctx context.Context, site, tokenHash string) (extension.Credential, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store reads and writes _kora_extension for one tenant database.
func New ¶
func New(database *sql.DB, dialect db.QueryDialect) *Store
New binds a store to a tenant database. It is cheap; callers may open one per request.
func (*Store) RotateSecret ¶
RotateSecret installs a new signing secret and keeps the previous one until its expiry.
func (*Store) VerifyAccessToken ¶
func (s *Store) VerifyAccessToken(ctx context.Context, site, tokenHash string) (extension.Credential, error)
VerifyAccessToken resolves the active extension owning tokenHash.