stdmageatlas

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package stdmageatlas provides mage commands for working with Atlas-based projects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(name string) error

Diff generates a named migration for the local environment.

func Hash

func Hash() error

Hash runs the logic for re-hashing the Atlas sum file.

func Init

func Init(
	atlasInspectEnv,
	atlasLocalEnv,
	atlasMigrationsDir string,
	hook PatchFunc,
	_ ...[]string,
)

Init inits the mage targets. The weird signature is to make Mage ignore this when importing.

func Inspect

func Inspect() error

Inspect visualizes the schema.

func Iterate

func Iterate(name string) error

Iterate replaces the latest migration file with the same name, for quicker development.

Types

type PatchFunc

type PatchFunc = func(latestName, latestFilename string) error

PatchFunc allows users of the mage targets to patch any migration that is generated.

Jump to

Keyboard shortcuts

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