cli

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitSuccess     = 0
	ExitOperational = 1
	ExitUsage       = 2
)

Variables

View Source
var Version = "devel"

Functions

func Main

func Main(ctx context.Context, args []string, stdout, stderr io.Writer, service Service) int

Types

type Dependencies

type Dependencies struct {
	WorkingDirectory string
	Backends         map[string]dialect.Backend
}

type OperationResult

type OperationResult struct {
	ManifestFilename string
	Statistics       Statistics
	Warnings         []string
}

type Runner

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

func New

func New(workingDirectory string) *Runner

func NewWithDependencies

func NewWithDependencies(dependencies Dependencies) *Runner

func (*Runner) Generate

func (s *Runner) Generate(ctx context.Context, dialectName, dsn, outputFolder string, tables []string) (OperationResult, error)

func (*Runner) Inspect

func (s *Runner) Inspect(ctx context.Context, dialectName, dsn string, tables []string) (OperationResult, error)

func (*Runner) Render

func (s *Runner) Render(ctx context.Context, dialectName, manifestFilename, outputFolder string, tables []string) (OperationResult, error)

type Service

type Service interface {
	Inspect(ctx context.Context, dialect, dsn string, tables []string) (OperationResult, error)
	Render(ctx context.Context, dialect, manifestFilename, outputFolder string, tables []string) (OperationResult, error)
	Generate(ctx context.Context, dialect, dsn, outputFolder string, tables []string) (OperationResult, error)
}

type Statistics

type Statistics struct {
	Tables         int
	ManagedTables  int
	RenamedTables  int
	Columns        int
	RenamedColumns int
}

Jump to

Keyboard shortcuts

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