gnidump

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: MIT Imports: 7 Imported by: 0

README

gnidump

Migrates MySQL data of previous version of GNI to PostgreSQL

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Build = "n/a"
View Source
var Version = "v0.0.1-dev"

Functions

This section is empty.

Types

type GNIdump

type GNIdump struct {
	// MyDB is needed for dumping data from previous version of GNI.
	dump.MyDB
	// PyDB is needed for loading data to PostgreSQL DB.
	rebuild.PgDB
	// InputDir contains dump data and key-values stores.
	InputDir string
	// JobsNum is a number of goroutines for parallel executions.
	JobsNum int
}

GNIdump is an coordinator of all gnidump functionality. It contains complete set of configuration variable necessary for dump and restore of the data.

func NewGNIdump

func NewGNIdump(opts ...Option) GNIdump

NewGNIdump creates GNIdump instance.

func (GNIdump) CSVdump

func (gnd GNIdump) CSVdump() error

func (GNIdump) PopulatePG

func (gnd GNIdump) PopulatePG() error

type Option

type Option func(*GNIdump)

Option type allows to change settings for GNIdump.

func OptInputDir

func OptInputDir(d string) Option

OptInputDir sets a directory for temporary files and key-value stores.

func OptJobsNum

func OptJobsNum(j int) Option

OptJobsNum sets parallelism number for concurrent goroutines.

func OptMyDB

func OptMyDB(d string) Option

OptMyDB sets database name for MySQL

func OptMyHost

func OptMyHost(h string) Option

OptMyHost sets host for MySQL

func OptMyPass

func OptMyPass(p string) Option

OptMyPass sets password for MySQL

func OptMyUser

func OptMyUser(u string) Option

OptMyUser sets user for MySQL

func OptPgDB

func OptPgDB(d string) Option

OptPgDB sets database name for PostgreSQL

func OptPgHost

func OptPgHost(h string) Option

OptPgHost sets host name for PostgreSQL

func OptPgPass

func OptPgPass(p string) Option

OptPgPass sets password for PostgreSQL

func OptPgUser

func OptPgUser(u string) Option

OptPgUser sets user for PostgreSQL

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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