modulemigration

package
v29.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsensusVersion

func ConsensusVersion(content string) (uint64, error)

ConsensusVersion returns the current module consensus version from module.go content.

func NewGenerator

func NewGenerator(opts *Options) (*genny.Generator, error)

NewGenerator returns the generator to scaffold a new module migration.

Types

type Options

type Options struct {
	ModuleName  string
	ModulePath  string
	FromVersion uint64
	ToVersion   uint64
}

Options represents the options to scaffold a module migration.

func (Options) MigrationDir

func (opts Options) MigrationDir() string

MigrationDir returns the path to the migration folder.

func (Options) MigrationFile

func (opts Options) MigrationFile() string

MigrationFile returns the path to the migration source file.

func (Options) MigrationFunc

func (opts Options) MigrationFunc() string

MigrationFunc returns the migration handler function name.

func (Options) MigrationImportAlias

func (opts Options) MigrationImportAlias() string

MigrationImportAlias returns the import alias used by module.go.

func (Options) MigrationImportPath

func (opts Options) MigrationImportPath() string

MigrationImportPath returns the migration import path used by module.go.

func (Options) MigrationVersion

func (opts Options) MigrationVersion() string

MigrationVersion returns the migration package name.

func (Options) ModuleFile

func (opts Options) ModuleFile() string

ModuleFile returns the path to the module definition file.

Jump to

Keyboard shortcuts

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