cmd

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InformationFile = "information.json.gz"
	DumpFileSuffix  = ".sql.gz"

	MySQLFlag      = "mysql"
	PostgreSQLFlag = "postgres"

	LocalFlag = "local"
	S3Flag    = "s3"
)
View Source
const (
	Version = "v0.0.4"
)

Variables

View Source
var (
	AvailableDBMS = map[string]bool{
		MySQLFlag:      true,
		PostgreSQLFlag: true,
	}

	AvailableStorage = map[string]bool{
		LocalFlag: true,
		S3Flag:    true,
	}
)
View Source
var RootCmd = &cobra.Command{
	Use:   "chronicle",
	Short: "Effective CLI for dump/restore/validate to MySQL and PostgreSQL",
	Run: func(cmd *cobra.Command, args []string) {
		_ = cmd.Help()
		os.Exit(1)
	},
}

Functions

Types

type Database

type Database struct {
	Name   string
	Tables Tables
}

type Databases

type Databases struct {
	Databases []*Database
}

type Flags

type Flags struct {
	Host    string
	User    string
	Pass    string
	Port    int
	Thread  int
	Retry   int
	Bucket  string
	Dir     string
	Storage string
	DBMS    string
}

type Table

type Table struct {
	Name      string
	TableRows int
	Checksum  int
	MD5       string
}

type Tables

type Tables []*Table

func (Tables) Len

func (t Tables) Len() int

func (Tables) Less

func (t Tables) Less(i, j int) bool

func (Tables) Swap

func (t Tables) Swap(i, j int)

Jump to

Keyboard shortcuts

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