psqlutils

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: MIT Imports: 9 Imported by: ? 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDSN

func BuildDSN(
	DbHost string,
	DbPort int,
	DbUsername string,
	DbPassword string,
	DbName string,
	DbSslmode bool,
) string

BuildDSN builds the data source name (DSN) string based on the config struct

func BuildPostgresURL

func BuildPostgresURL(
	DbHost string,
	DbPort int,
	DbUsername string,
	DbPassword string,
	DbName string,
	DbSslmode bool,
) string

func GeneratePopTemplatedMigrations

func GeneratePopTemplatedMigrations(
	sourceFolder string,
	destFolder string,
	options map[string]string,
) error

func MigrateUp

func MigrateUp(details ConnectionDetails, migsFS embed.FS) error

func MigrationsContent

func MigrationsContent(
	p string,
	migsFS fs.FS,
	options map[string]string,
) (map[string]string, error)

Types

type ConnectionDetails

type ConnectionDetails struct {
	MigAppName string
	Host       string
	Port       int
	Username   string
	Password   string
	Dbname     string
	Sslmode    bool
	Options    map[string]string
}

Jump to

Keyboard shortcuts

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