database

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidSchemaName = fmt.Errorf("invalid schema name: must match ^[a-z0-9][a-z0-9_-]*$")

ErrInvalidSchemaName defines a package-level variable.

Functions

This section is empty.

Types

type DatabaseProvider

type DatabaseProvider = pkgdb.DatabaseProvider

Type aliases for backward compatibility with internal consumers.

type DatabaseResult

type DatabaseResult = pkgdb.DatabaseResult

DatabaseResult represents the configuration or state for this type.

type DatabaseStatus

type DatabaseStatus = pkgdb.DatabaseStatus

DatabaseStatus aliases the public DatabaseStatus type...

type InstrumentedDatabaseProvider

type InstrumentedDatabaseProvider struct {
	Inner DatabaseProvider
	Mode  string
}

InstrumentedDatabaseProvider wraps a DatabaseProvider with Prometheus metrics.

func (*InstrumentedDatabaseProvider) Provision

Provision performs its designated operation.

func (*InstrumentedDatabaseProvider) Status

Status performs its designated operation.

func (*InstrumentedDatabaseProvider) Teardown

Teardown performs its designated operation.

type NoopDatabaseProvider

type NoopDatabaseProvider struct{}

NoopDatabaseProvider represents the configuration or state for this type.

func (*NoopDatabaseProvider) Provision

Provision performs its designated operation.

func (*NoopDatabaseProvider) Status

Status performs its designated operation.

func (*NoopDatabaseProvider) Teardown

Teardown performs its designated operation.

type SQLExecutor

type SQLExecutor interface {
	ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
}

SQLExecutor defines the contract for this component.

type SchemaDatabaseProvider

type SchemaDatabaseProvider struct {
	AdminDSN string
	Executor SQLExecutor
}

SchemaDatabaseProvider represents the configuration or state for this type.

func (*SchemaDatabaseProvider) CreatePreviewRole

func (p *SchemaDatabaseProvider) CreatePreviewRole(ctx context.Context, db *sql.DB, schemaName string) (string, error)

CreatePreviewRole performs its designated operation.

func (*SchemaDatabaseProvider) Provision

Provision performs its designated operation.

func (*SchemaDatabaseProvider) Status

Status performs its designated operation.

func (*SchemaDatabaseProvider) Teardown

Teardown performs its designated operation.

Jump to

Keyboard shortcuts

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