cmd

package
v1.0.1-0...-70948b5 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWritersLimit = 40
)

Variables

This section is empty.

Functions

func CreateDatabaseClient

func CreateDatabaseClient(ctx context.Context, targetProfile profiles.TargetProfile, driver, dbName string, ioHelper utils.IOStreams) (*database.DatabaseAdminClient, *sp.Client, string, error)

CreateDatabaseClient creates new database client and admin client.

func GetSessionFileName

func GetSessionFileName(sessionFileName, filePrefix string) string

func MigrateDatabase

func MigrateDatabase(ctx context.Context, migrationProjectId string, targetProfile profiles.TargetProfile, sourceProfile profiles.SourceProfile, dbName string, ioHelper *utils.IOStreams, cmd interface{}, conv *internal.Conv, migrationError *error) (*writer.BatchWriter, error)

MigrateData creates database and populates data in it.

func PrepareMigrationPrerequisites

func PrepareMigrationPrerequisites(sourceProfileString, targetProfileString, source string, dryRun bool) (profiles.SourceProfile, profiles.TargetProfile, utils.IOStreams, string, error)

PrepareMigrationPrerequisites creates source and target profiles, opens a new IOStream and generates the database name.

Types

type AssessmentCmd

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

AssessmentCmd struct with flags.

func (*AssessmentCmd) Execute

func (cmd *AssessmentCmd) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

func (*AssessmentCmd) Name

func (cmd *AssessmentCmd) Name() string

Name returns the name of operation.

func (*AssessmentCmd) SetFlags

func (cmd *AssessmentCmd) SetFlags(f *flag.FlagSet)

SetFlags sets the flags.

func (*AssessmentCmd) Synopsis

func (cmd *AssessmentCmd) Synopsis() string

Synopsis returns summary of operation.

func (*AssessmentCmd) Usage

func (cmd *AssessmentCmd) Usage() string

Usage returns usage info of the command.

type DataCmd

type DataCmd struct {
	WriteLimit int64

	SkipForeignKeys bool
	// contains filtered or unexported fields
}

DataCmd struct with flags.

func (*DataCmd) Execute

func (cmd *DataCmd) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

func (*DataCmd) Name

func (cmd *DataCmd) Name() string

Name returns the name of operation.

func (*DataCmd) SetFlags

func (cmd *DataCmd) SetFlags(f *flag.FlagSet)

SetFlags sets the flags.

func (*DataCmd) Synopsis

func (cmd *DataCmd) Synopsis() string

Synopsis returns summary of operation.

func (*DataCmd) Usage

func (cmd *DataCmd) Usage() string

Usage returns usage info of the command.

type ImportDataCmd

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

func (*ImportDataCmd) Execute

func (cmd *ImportDataCmd) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

func (*ImportDataCmd) Name

func (cmd *ImportDataCmd) Name() string

func (*ImportDataCmd) SetFlags

func (cmd *ImportDataCmd) SetFlags(set *flag.FlagSet)

func (*ImportDataCmd) Synopsis

func (cmd *ImportDataCmd) Synopsis() string

Synopsis returns summary of operation.

func (*ImportDataCmd) Usage

func (cmd *ImportDataCmd) Usage() string

Usage returns usage info of the command.

type SchemaAndDataCmd

type SchemaAndDataCmd struct {
	SkipForeignKeys bool

	WriteLimit int64
	// contains filtered or unexported fields
}

SchemaAndDataCmd struct with flags.

func (*SchemaAndDataCmd) Execute

func (cmd *SchemaAndDataCmd) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

func (*SchemaAndDataCmd) Name

func (cmd *SchemaAndDataCmd) Name() string

Name returns the name of operation.

func (*SchemaAndDataCmd) SetFlags

func (cmd *SchemaAndDataCmd) SetFlags(f *flag.FlagSet)

SetFlags sets the flags.

func (*SchemaAndDataCmd) Synopsis

func (cmd *SchemaAndDataCmd) Synopsis() string

Synopsis returns summary of operation.

func (*SchemaAndDataCmd) Usage

func (cmd *SchemaAndDataCmd) Usage() string

Usage returns usage info of the command.

type SchemaCmd

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

SchemaCmd struct with flags.

func (*SchemaCmd) Execute

func (cmd *SchemaCmd) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

func (*SchemaCmd) Name

func (cmd *SchemaCmd) Name() string

Name returns the name of operation.

func (*SchemaCmd) SetFlags

func (cmd *SchemaCmd) SetFlags(f *flag.FlagSet)

SetFlags sets the flags.

func (*SchemaCmd) Synopsis

func (cmd *SchemaCmd) Synopsis() string

Synopsis returns summary of operation.

func (*SchemaCmd) Usage

func (cmd *SchemaCmd) Usage() string

Usage returns usage info of the command.

Jump to

Keyboard shortcuts

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