Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClosePostgresDB ¶
func ClosePostgresDB() error
ClosePostgresDB closes the PostgreSQL database connection
func GetPostgresDB ¶
GetPostgresDB returns a singleton PostgreSQL database connection
func GetRedisClient ¶
func GetRedisClient() (*redis.Client, error)
GetRedisClient returns a singleton Redis client
func GetSQLiteDB ¶
GetSQLiteDB returns a singleton SQLite database connection
Types ¶
type DatabaseType ¶
type DatabaseType string
DatabaseType represents the type of database
const ( // PostgreSQL database type PostgreSQL DatabaseType = "postgres" // SQLite database type SQLite DatabaseType = "sqlite" // Redis database type (not SQL) Redis DatabaseType = "redis" )
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides a unified interface for database operations
func NewService ¶
func NewService(dbType DatabaseType) (*Service, error)
NewService creates a new database service
Click to show internal directories.
Click to hide internal directories.