db

package
v0.0.0-...-3273997 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PostgresSchema     string `envconfig:"POSTGRES_SCHEMA" default:"public"`
	PostgresConnection string `envconfig:"POSTGRES_CONNECTION" default:""`
	SqliteConnection   string `envconfig:"SQLITE_CONNECTION" default:"feed.db"`
}

type DB

type DB struct {
	*gorm.DB
}

func NewDatabase

func NewDatabase(logger *logger.GormLogger, config *Config) (*DB, error)

func NewPostgresDatabase

func NewPostgresDatabase(logger *logger.GormLogger, config *Config) (*DB, error)

func NewSqliteDatabase

func NewSqliteDatabase(logger *logger.GormLogger, config *Config) (*DB, error)

Jump to

Keyboard shortcuts

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