options

package
v0.0.0-...-cb08592 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	BACKUP_DIR            = "backup-dir"
	COMPRESSION_TYPE      = "compression-type"
	COMPRESSION_LEVEL     = "compression-level"
	DATA_ONLY             = "data-only"
	DBNAME                = "dbname"
	DEBUG                 = "debug"
	EXCLUDE_RELATION      = "exclude-table"
	EXCLUDE_RELATION_FILE = "exclude-table-file"
	EXCLUDE_SCHEMA        = "exclude-schema"
	EXCLUDE_SCHEMA_FILE   = "exclude-schema-file"
	FROM_TIMESTAMP        = "from-timestamp"
	INCLUDE_RELATION      = "include-table"
	INCLUDE_RELATION_FILE = "include-table-file"
	INCLUDE_SCHEMA        = "include-schema"
	INCLUDE_SCHEMA_FILE   = "include-schema-file"
	INCREMENTAL           = "incremental"
	JOBS                  = "jobs"
	LEAF_PARTITION_DATA   = "leaf-partition-data"
	METADATA_ONLY         = "metadata-only"
	NO_COMPRESSION        = "no-compression"
	NO_HISTORY            = "no-history"
	PLUGIN_CONFIG         = "plugin-config"
	QUIET                 = "quiet"
	SINGLE_DATA_FILE      = "single-data-file"
	COPY_QUEUE_SIZE       = "copy-queue-size"
	VERBOSE               = "verbose"
	WITH_STATS            = "with-stats"
	CREATE_DB             = "create-db"
	ON_ERROR_CONTINUE     = "on-error-continue"
	REDIRECT_DB           = "redirect-db"
	RUN_ANALYZE           = "run-analyze"
	SINGLE_BACKUP_DIR     = "single-backup-dir"
	TIMESTAMP             = "timestamp"
	WITH_GLOBALS          = "with-globals"
	REDIRECT_SCHEMA       = "redirect-schema"
	TRUNCATE_TABLE        = "truncate-table"
	WITHOUT_GLOBALS       = "without-globals"
	RESIZE_CLUSTER        = "resize-cluster"
	NO_INHERITS           = "no-inherits"
	REPORT_DIR            = "report-dir"

	/*
	 *	ggcheckmigrate-specific flags
	 */
	SOURCE_HOST     = "source-host"
	SOURCE_PORT     = "source-port"
	SOURCE_DATABASE = "source-database"
	SOURCE_USER     = "source-user"
	TARGET_HOST     = "target-host"
	TARGET_PORT     = "target-port"
	TARGET_USER     = "target-user"
)

Variables

This section is empty.

Functions

func CheckExclusiveFlags

func CheckExclusiveFlags(flags *pflag.FlagSet, flagNames ...string)

At most one of the flags passed to this function may be set

func ExtensionFilterClause

func ExtensionFilterClause(namespace string) string

func HandleSingleDashes

func HandleSingleDashes(args []string) []string

* Convert arguments that contain a single dash to double dashes for backward * compatibility.

func MustGetFlagBool

func MustGetFlagBool(cmdFlags *pflag.FlagSet, flagName string) bool

func MustGetFlagInt

func MustGetFlagInt(cmdFlags *pflag.FlagSet, flagName string) int

func MustGetFlagString

func MustGetFlagString(cmdFlags *pflag.FlagSet, flagName string) string

func MustGetFlagStringArray

func MustGetFlagStringArray(cmdFlags *pflag.FlagSet, flagName string) []string

func MustGetFlagStringSlice

func MustGetFlagStringSlice(cmdFlags *pflag.FlagSet, flagName string) []string

func QuoteTableNames

func QuoteTableNames(conn *dbconn.DBConn, tableNames []string) ([]string, error)

func SetBackupFlagDefaults

func SetBackupFlagDefaults(flagSet *pflag.FlagSet)

func SetCheckMigrateFlagDefaults

func SetCheckMigrateFlagDefaults(flagSet *pflag.FlagSet)

func SetRestoreFlagDefaults

func SetRestoreFlagDefaults(flagSet *pflag.FlagSet)

Types

type Options

type Options struct {
	IncludedRelations []string
	ExcludedRelations []string

	ExcludedSchemas []string
	IncludedSchemas []string

	RedirectSchema string
	// contains filtered or unexported fields
}

This is meant to be a read only package. Values inside should only be modified by setters, it's method functions, or initialization function. This package is meant to make mocking flags easier.

func NewOptions

func NewOptions(initialFlags *pflag.FlagSet) (*Options, error)

func (*Options) AddIncludedRelation

func (o *Options) AddIncludedRelation(relation string)

func (Options) GetExcludedSchemas

func (o Options) GetExcludedSchemas() []string

func (Options) GetExcludedTables

func (o Options) GetExcludedTables() []string

func (Options) GetIncludedSchemas

func (o Options) GetIncludedSchemas() []string

func (Options) GetIncludedTables

func (o Options) GetIncludedTables() []string

func (Options) GetOriginalIncludedTables

func (o Options) GetOriginalIncludedTables() []string

func (Options) GetUserTableRelationsWithIncludeFiltering

func (o Options) GetUserTableRelationsWithIncludeFiltering(connectionPool *dbconn.DBConn, includeOids []string, no_inherits bool) ([]Relation, error)

func (Options) IsLeafPartitionData

func (o Options) IsLeafPartitionData() bool

func (*Options) QuoteExcludeRelations

func (o *Options) QuoteExcludeRelations(conn *dbconn.DBConn) error

func (*Options) QuoteIncludeRelations

func (o *Options) QuoteIncludeRelations(conn *dbconn.DBConn) error

type Relation

type Relation struct {
	SchemaOid uint32
	Oid       uint32
	Schema    string
	Name      string
}

func SeparateSchemaAndTable

func SeparateSchemaAndTable(tableNames []string) ([]Relation, error)

Jump to

Keyboard shortcuts

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