cli

package
v0.0.6-beta Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT, MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrServicesNotFound = errors.New("unable to retrieve services from context (check if command is running offline)")
	ErrEngineNotFound   = errors.New("migration engine not found in context")
	ErrConfigNotFound   = errors.New("config not found in context")
)
View Source
var (
	ErrFailedToInitLogger   = errors.New("failed to re-initialize logger for mcp")
	ErrFailedToRegister     = errors.New("failed to register examples")
	ErrMCPInitFailed        = errors.New("mcp init failed")
	ErrMCPServerFailure     = errors.New("mcp server failure")
	ErrCouldNotDeterminePth = errors.New("could not determine path")
)
View Source
var (
	ErrMongoClientUnavailable = errors.New("mongo client unavailable")
	ErrInvalidNamespace       = errors.New("invalid namespace")
	ErrUnsupportedOp          = errors.New("unsupported op")
	ErrFailedToQueryOplog     = errors.New("failed to query oplog")
	ErrStreamFailed           = errors.New("stream failed")
	ErrInvalidTimeFormat      = errors.New("invalid time")
	ErrOplogCollection        = errors.New("oplog collection not found (requires replica set)")
	ErrFailedToList           = errors.New("failed to list local collections")
	ErrFollowAndTo            = errors.New("--to is not supported with --follow")
	ErrNamespaceOrRegex       = errors.New("use --namespace or --regex, not both")
)
View Source
var (
	ErrFailedToReadOpsLog = errors.New("failed to read opslog")
	ErrInvalidRegex       = errors.New("invalid regex")
	ErrInvalidTime        = errors.New("invalid time")
)
View Source
var (
	ErrTypeOrTypeField = errors.New("provide --type or --type-field")
	ErrNoRegistered    = errors.New("no registered type")
)
View Source
var (
	ErrShowConfigDisplayed = errors.New("configuration displayed")
	ErrUnreachable         = errors.New("unreachable")
	ErrNoMigrations        = errors.New("no migrations registered")
)
View Source
var (
	ErrFailedToGetStatus = errors.New("failed to get status")
	ErrUnsupportedOutput = errors.New("unsupported output format")
)
View Source
var (
	ErrFailedToDown = errors.New("failed to down")
)
View Source
var ErrFailedToForce = errors.New("failed to force mark migration")
View Source
var ErrFailedToMarshalJSON = errors.New("failed to marshal json")
View Source
var ErrFailedToReleaseLock = errors.New("failed to release migration lock")
View Source
var (
	ErrFailedToRun = errors.New("failed to run")
)
View Source
var ErrRenderConfig = errors.New("failed to render configuration")
View Source
var (
	ErrUnsupportedOutputFormat = errors.New("unsupported output format")
)

Functions

func Execute

func Execute() error

func NewDBCmd

func NewDBCmd() *cobra.Command

func NewMCPCmd

func NewMCPCmd() *cobra.Command

func NewOplogCmd

func NewOplogCmd() *cobra.Command

func RenderHealthTable

func RenderHealthTable(w io.Writer, r HealthReport)

func RenderMigrationTable

func RenderMigrationTable(w io.Writer, status []migration.MigrationStatus)

Types

type HealthReport

type HealthReport = observability.HealthReport

type Services

type Services struct {
	Config      *config.Config
	Engine      *migration.Engine
	MongoClient *mongo.Client
}

Jump to

Keyboard shortcuts

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