Help us shape the future of Go! Take the 2026 Go Developer Survey

urfavecli

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package urfavecli integrates xmigrator with urfave/cli v3 without importing SQL drivers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(cfg Config) (*cli.Command, error)

Command returns a fresh command tree. Results use the caller's urfave writer.

Types

type Config

type Config struct {
	Name          string
	Dialect       string
	Flags         []cli.Flag
	Resolve       func(context.Context, *cli.Command) (Target, error)
	ResolveSource func(context.Context, *cli.Command) (x.Source, error)
	CreateDir     string
	EnableDrop    bool
}

type Runner

type Runner interface {
	Up(context.Context, int) (x.Result, error)
	Down(context.Context, int) (x.Result, error)
	DownAll(context.Context) (x.Result, error)
	Drop(context.Context) error
	Status(context.Context) (x.Status, error)
	PlanRepairDown(context.Context, x.Version) (x.RepairPlan, error)
	RepairDown(context.Context, x.Version) (x.RepairResult, error)
}

type Target

type Target struct {
	Runner  Runner
	Cleanup func(context.Context) error
	Scope   []string
}

Jump to

Keyboard shortcuts

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