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: 0

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