cmd

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2018 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// RootCmd steals and anonymises databases
	RootCmd = &cobra.Command{
		Use:   "klepto",
		Short: "Steals and anonymises databases",
		Long: `Klepto by HelloFresh.
		Takes the structure and data from one (mysql) database (--from),
		anonymises the data according to the provided configuration file,
		and inserts that data into another mysql database (--to).
	
		Perfect for bringing your live data to staging!`,
		Example: "klepto steal -c .klepto.toml|yaml|json --from root:root@localhost:3306/fromDb --to root:root@localhost:3306/toDb",
	}
)

Functions

func NewInitCmd

func NewInitCmd() *cobra.Command

NewInitCmd creates a new init command

func NewStealCmd

func NewStealCmd() *cobra.Command

NewStealCmd creates a new steal command

func NewUpdateCmd

func NewUpdateCmd() *cobra.Command

NewUpdateCmd creates a new update command

func NewVersionCmd

func NewVersionCmd() *cobra.Command

NewVersionCmd creates a new version command

func RunInit

func RunInit()

RunInit runs the init command

func RunSteal

func RunSteal(opts *StealOptions) (err error)

RunSteal is the handler for the rootCmd.

func RunUpdate

func RunUpdate(opts *UpdateOptions)

RunUpdate runs the update command

func RunVersion

func RunVersion()

RunVersion runs the command to print the current version

Types

type StealOptions

type StealOptions struct {
	// contains filtered or unexported fields
}

StealOptions represents the command options

type UpdateOptions

type UpdateOptions struct {
	// contains filtered or unexported fields
}

UpdateOptions are the command flags

Jump to

Keyboard shortcuts

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