database

package
v0.0.0-...-02c20aa Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DB_NAME = "flashlight"
View Source
const LOCAL_CONNECTION_STRING = "user=postgres password=postgres dbname=flashlight sslmode=disable"
View Source
const MAIN_SCHEMA = "flashlight"
View Source
const TESTING_SCHEMA = "flashlight_test"

Variables

This section is empty.

Functions

func GetCloudSQLConnectionString

func GetCloudSQLConnectionString(dbUsername, dbPassword, unixSocketPath string) string

https://cloud.google.com/sql/docs/mysql/connect-functions

func GetSchemaName

func GetSchemaName(isTesting bool) string

func NewCloudsqlPostgresDatabase

func NewCloudsqlPostgresDatabase(conf config.Config) (*sqlx.DB, error)

func NewDatabaseMigrator

func NewDatabaseMigrator(db *sqlx.DB, logger *slog.Logger) *migrator

func NewPostgresDatabase

func NewPostgresDatabase(connectionString string) (*sqlx.DB, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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