cmd

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// RootCmd steals and anonymises databases
	RootCmd = &cobra.Command{
		Use:     "klepto",
		Version: version,
		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 RunInit

func RunInit() error

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) error

RunUpdate runs the update command

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