plugins

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDriverNotSelected = errors.New("driver not selected")

Functions

This section is empty.

Types

type NullDriver

type NullDriver struct {
	plugin.Driver
}

func NewNullDriver

func NewNullDriver() *NullDriver

func (*NullDriver) Connect

func (*NullDriver) Disconnect

func (d *NullDriver) Disconnect(ctx context.Context, conn plugin.DriverConnection) error

type NullDriverConnection

type NullDriverConnection struct {
	plugin.DriverConnection
}

func (*NullDriverConnection) AppendAuditLog

func (*NullDriverConnection) LockAuditLog

func (*NullDriverConnection) Query

func (*NullDriverConnection) ReadAuditLogs

func (*NullDriverConnection) UnlockAuditLog

func (*NullDriverConnection) UpsertAuditLockTable

func (c *NullDriverConnection) UpsertAuditLockTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error

func (*NullDriverConnection) UpsertAuditLogTable

func (c *NullDriverConnection) UpsertAuditLogTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error

type NullDriverQuery

type NullDriverQuery struct{}

func (*NullDriverQuery) Begin

func (*NullDriverQuery) Commit

func (q *NullDriverQuery) Commit(ctx context.Context) error

func (*NullDriverQuery) Exec

func (q *NullDriverQuery) Exec(ctx context.Context, query string, args ...any) error

func (*NullDriverQuery) Query

func (q *NullDriverQuery) Query(ctx context.Context, query string, args ...any) (*plugin.DriverQueryResult, error)

func (*NullDriverQuery) Rollback

func (q *NullDriverQuery) Rollback(ctx context.Context) error

type PostgreSQLBrowser

type PostgreSQLBrowser struct {
	// contains filtered or unexported fields
}

func NewPostgreSQLBrowser

func NewPostgreSQLBrowser(driver *PostgreSQLDriver) *PostgreSQLBrowser

func (*PostgreSQLBrowser) Connect

func (b *PostgreSQLBrowser) Connect(ctx context.Context, dsn string) error

func (*PostgreSQLBrowser) Disconnect

func (b *PostgreSQLBrowser) Disconnect(ctx context.Context) error

func (*PostgreSQLBrowser) List

func (b *PostgreSQLBrowser) List(ctx context.Context, ids []string) ([]plugin.BrowserItem, error)

func (*PostgreSQLBrowser) ParseExplain

func (*PostgreSQLBrowser) Query

func (*PostgreSQLBrowser) Show

func (b *PostgreSQLBrowser) Show(ctx context.Context, ids []string) (string, error)

type PostgreSQLDriver

type PostgreSQLDriver struct {
}

func NewPostgreSQLDriver

func NewPostgreSQLDriver() *PostgreSQLDriver

func (*PostgreSQLDriver) Connect

func (*PostgreSQLDriver) Disconnect

func (d *PostgreSQLDriver) Disconnect(ctx context.Context, conn plugin.DriverConnection) error

type PostgreSQLDriverConnection

type PostgreSQLDriverConnection struct {
	Conn *pgx.Conn
}

func (*PostgreSQLDriverConnection) AppendAuditLog

func (*PostgreSQLDriverConnection) LockAuditLog

func (*PostgreSQLDriverConnection) Query

func (*PostgreSQLDriverConnection) ReadAuditLogs

func (*PostgreSQLDriverConnection) UnlockAuditLog

func (*PostgreSQLDriverConnection) UpsertAuditLockTable

func (c *PostgreSQLDriverConnection) UpsertAuditLockTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error

func (*PostgreSQLDriverConnection) UpsertAuditLogTable

func (c *PostgreSQLDriverConnection) UpsertAuditLogTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error

type PostgreSQLQuery

type PostgreSQLQuery struct {
	// contains filtered or unexported fields
}

func (*PostgreSQLQuery) Begin

func (*PostgreSQLQuery) Commit

func (q *PostgreSQLQuery) Commit(ctx context.Context) error

func (*PostgreSQLQuery) Exec

func (q *PostgreSQLQuery) Exec(ctx context.Context, query string, args ...any) error

func (*PostgreSQLQuery) Query

func (q *PostgreSQLQuery) Query(ctx context.Context, query string, args ...any) (*plugin.DriverQueryResult, error)

func (*PostgreSQLQuery) Rollback

func (q *PostgreSQLQuery) Rollback(ctx context.Context) error

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func New

func New() *Registry

func (*Registry) Get

func (r *Registry) Get(name string) (plugin.Driver, error)

func (*Registry) GetBrowser

func (r *Registry) GetBrowser(name string) (plugin.Browser, error)

func (*Registry) Register

func (r *Registry) Register(name string, driver plugin.Driver)

func (*Registry) RegisterAll

func (r *Registry) RegisterAll()

func (*Registry) RegisterBrowser

func (r *Registry) RegisterBrowser(name string, browser plugin.Browser)

type SQLiteDriver

type SQLiteDriver struct {
}

func NewSQLiteDriver

func NewSQLiteDriver() *SQLiteDriver

func (*SQLiteDriver) Connect

func (*SQLiteDriver) Disconnect

func (d *SQLiteDriver) Disconnect(ctx context.Context, conn plugin.DriverConnection) error

type SQLiteDriverConnection

type SQLiteDriverConnection struct {
}

func (*SQLiteDriverConnection) AppendAuditLog

func (*SQLiteDriverConnection) LockAuditLog

func (*SQLiteDriverConnection) Query

func (*SQLiteDriverConnection) ReadAuditLogs

func (*SQLiteDriverConnection) UnlockAuditLog

func (*SQLiteDriverConnection) UpsertAuditLockTable

func (c *SQLiteDriverConnection) UpsertAuditLockTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error

func (*SQLiteDriverConnection) UpsertAuditLogTable

func (c *SQLiteDriverConnection) UpsertAuditLogTable(ctx context.Context, execCtx plugin.DriverExecutionContext) error

type SQLiteDriverQuery

type SQLiteDriverQuery struct{}

func (*SQLiteDriverQuery) Begin

func (*SQLiteDriverQuery) Commit

func (q *SQLiteDriverQuery) Commit(ctx context.Context) error

func (*SQLiteDriverQuery) Exec

func (q *SQLiteDriverQuery) Exec(ctx context.Context, query string, args ...any) error

func (*SQLiteDriverQuery) Query

func (q *SQLiteDriverQuery) Query(ctx context.Context, query string, args ...any) (*plugin.DriverQueryResult, error)

func (*SQLiteDriverQuery) Rollback

func (q *SQLiteDriverQuery) Rollback(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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