adapter

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 12 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 adapter provides service adapters for database operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoConfigureDatabase

func AutoConfigureDatabase() error

AutoConfigureDatabase configures database from environment variables.

func GetDB

func GetDB() (*sql.DB, error)

GetDB returns a *sql.DB for compatibility with existing code.

func GetDatabase

func GetDatabase() (database.DatabaseService, error)

GetDatabase returns the primary database service.

func GetDatabaseForApp

func GetDatabaseForApp(appID string, purpose string) (database.DatabaseService, error)

GetDatabaseForApp returns a database service bound to a specific application.

func GetDirectDB

func GetDirectDB() *sql.DB

GetDirectDB creates a direct database connection using environment variables.

func InitializeServiceRegistry

func InitializeServiceRegistry() (*registry.ServiceRegistry, error)

InitializeServiceRegistry initializes the global service registry.

func MigrateDatabase

func MigrateDatabase(fromServiceID, toServiceID string, strategy registry.MigrationStrategy) error

MigrateDatabase migrates from one database to another.

func RegisterDatabaseService

func RegisterDatabaseService(config *registry.ServiceConfig) error

RegisterDatabaseService registers a custom database service.

Types

This section is empty.

Jump to

Keyboard shortcuts

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