runner

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

ABOUTME: Calculates checksum of migration files for cache invalidation ABOUTME: Uses SHA256 hash of all .go files in migration directory

ABOUTME: Dynamic migration runner that compiles and executes user migrations ABOUTME: Generates temporary Go program in project dir, compiles it, and runs migration commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateChecksum

func CalculateChecksum(dir string) (string, error)

CalculateChecksum calculates a SHA256 checksum of all .go files in the directory. Returns empty string if directory doesn't exist or has no .go files.

func CalculatePathHash

func CalculatePathHash(path string) string

CalculatePathHash calculates a short hash of the project path for unique identification.

Types

type Runner

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

Runner handles dynamic compilation and execution of migrations.

func NewRunner

func NewRunner(verbose, rebuild bool) (*Runner, error)

NewRunner creates a new migration runner.

func (*Runner) Run

func (r *Runner) Run(command string) error

Run executes the migration command.

Jump to

Keyboard shortcuts

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