migrate

package
v0.0.0-...-e629376 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPostFlight            = errors.New("postflight_error")
	ErrPostFlightMissingDB   = fmt.Errorf("%w - missing database in target cloudsql instance", ErrPostFlight)
	ErrPostFlightMissingUser = fmt.Errorf("%w - missing user in target cloudsql instance", ErrPostFlight)
)
View Source
var (
	ErrPreflight                = errors.New("preflight_error")
	ErrPreflightVersionMismatch = fmt.Errorf("%w - mismatch database version", ErrPreflight)
	ErrPreflightStatus          = fmt.Errorf("%w - instance is not running", ErrPreflight)
)

Functions

func WaitSQLAdminOp

func WaitSQLAdminOp(ctx context.Context, sql *sqladmin.Service, project string, operation string, interval time.Duration) error

Types

type Op

func NewOp

func NewOp(ctx context.Context, srcProject, srcInstance, dstProject, dstInstance string, opts ...option.ClientOption) (*Op, error)

func (*Op) PostFlight

func (op *Op) PostFlight(ctx context.Context, postflight []PostFlight) []error

func (*Op) Preflight

func (op *Op) Preflight(ctx context.Context, preflight []Preflight) []error

func (*Op) Prepopulate

func (op *Op) Prepopulate(ctx context.Context, postflight []PostFlight) []error

func (*Op) Run

func (op *Op) Run(ctx context.Context, preflight []Preflight, postflight []PostFlight) []error

type PostFlight

type PostFlight interface {
	Name() string
	Prepopulate(op *Op) error
	Check(op *Op) error
}

type PostFlightSQLAdmin

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

func (*PostFlightSQLAdmin) Check

func (p *PostFlightSQLAdmin) Check(op *Op) error

func (*PostFlightSQLAdmin) Name

func (p *PostFlightSQLAdmin) Name() string

func (*PostFlightSQLAdmin) Prepopulate

func (p *PostFlightSQLAdmin) Prepopulate(op *Op) error

type Preflight

type Preflight interface {
	Name() string
	Check(op *Op) error
}

type PreflightStatus

type PreflightStatus struct{}

func (PreflightStatus) Check

func (p PreflightStatus) Check(op *Op) error

func (PreflightStatus) Name

func (p PreflightStatus) Name() string

type PreflightVersion

type PreflightVersion struct{}

func (PreflightVersion) Check

func (p PreflightVersion) Check(op *Op) error

func (PreflightVersion) Name

func (p PreflightVersion) Name() string

Jump to

Keyboard shortcuts

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