sqlstore

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sqlstore persists tenant extensions in the tenant database.

Index

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) Create

func (s *Store) Create(ctx context.Context, r extension.Registration) error

Create installs a new extension.

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, site, name string) error

Delete removes an extension and its delivery log in one transaction.

func (*Store) List

func (s *Store) List(ctx context.Context, site string) ([]extension.Summary, error)

List returns the site's extensions, newest first.

func (*Store) RotateSecret

func (s *Store) RotateSecret(ctx context.Context, r extension.SecretRotation) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL