internal

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package internal implements the workflow-plugin-migrations plugin. It provides database.migrations and database.migration_driver module types, plus step.migrate_up, step.migrate_down, step.migrate_status, step.migrate_to step types. Drivers: golang-migrate, goose.

Index

Constants

View Source
const (
	ProtoMigrationsModuleConfig = "workflow.plugins.migrations.MigrationsModuleConfig"
	ProtoMigrationDriverConfig  = "workflow.plugins.migrations.MigrationDriverConfig"
	ProtoMigrateUpInput         = "workflow.plugins.migrations.MigrateUpInput"
	ProtoMigrateUpOutput        = "workflow.plugins.migrations.MigrateUpOutput"
	ProtoMigrateDownInput       = "workflow.plugins.migrations.MigrateDownInput"
	ProtoMigrateDownOutput      = "workflow.plugins.migrations.MigrateDownOutput"
	ProtoMigrateStatusInput     = "workflow.plugins.migrations.MigrateStatusInput"
	ProtoMigrateStatusOutput    = "workflow.plugins.migrations.MigrateStatusOutput"
	ProtoMigrateToInput         = "workflow.plugins.migrations.MigrateToInput"
	ProtoMigrateToOutput        = "workflow.plugins.migrations.MigrateToOutput"
)

Proto message names for the wfctl strict-contract descriptors. These are the canonical fully-qualified proto type names referenced by plugin.contracts.json and plugin.atlas.contracts.json. Keeping them here as exported constants gives the drift tests a single source of truth so that renaming a message requires updating contracts.go, the JSON file, and—if the constant is not updated—the test will flag the mismatch immediately.

Variables

View Source
var Version = "0.0.0"

Version is set at build time via -ldflags.

Functions

func NewPlugin

func NewPlugin() sdk.PluginProvider

NewPlugin returns a new plugin instance.

func PluginModuleSchemas added in v0.3.8

func PluginModuleSchemas() []sdk.ModuleSchemaData

PluginModuleSchemas returns the module schema data for all module types provided by this plugin. This is consumed by the Workflow SDK SchemaProvider interface and by wfctl editor schema generation.

func PluginStepSchemas added in v0.3.8

func PluginStepSchemas() []*schema.StepSchema

PluginStepSchemas returns the step schema data for all step types provided by this plugin. These are serialized into plugin.json as stepSchemas and consumed by the wfctl LSP / editor schema registry.

Types

type MigrationsPlugin

type MigrationsPlugin struct{}

MigrationsPlugin implements sdk.PluginProvider, sdk.ModuleProvider, sdk.StepProvider, sdk.SchemaProvider, and the strict ModuleContracts/ StepContracts methods consumed by Workflow contract tooling.

func (*MigrationsPlugin) CreateModule

func (p *MigrationsPlugin) CreateModule(typeName, name string, cfg map[string]any) (sdk.ModuleInstance, error)

CreateModule creates a module instance of the given type.

func (*MigrationsPlugin) CreateStep

func (p *MigrationsPlugin) CreateStep(typeName, name string, cfg map[string]any) (sdk.StepInstance, error)

CreateStep creates a step instance of the given type.

func (*MigrationsPlugin) Manifest

func (p *MigrationsPlugin) Manifest() sdk.PluginManifest

Manifest returns plugin metadata.

func (*MigrationsPlugin) ModuleContracts added in v0.3.8

func (p *MigrationsPlugin) ModuleContracts() map[string]*dynamic.FieldContract

ModuleContracts returns strict field contracts for each module type. These contracts are used by the Workflow engine to validate configurations at startup and by wfctl audit to check for missing descriptors.

func (*MigrationsPlugin) ModuleSchemas added in v0.3.8

func (p *MigrationsPlugin) ModuleSchemas() []sdk.ModuleSchemaData

ModuleSchemas implements sdk.SchemaProvider. It returns schema metadata for each module type provided by this plugin so that the Workflow editor and wfctl tooling can provide field completions and documentation.

func (*MigrationsPlugin) ModuleTypes

func (p *MigrationsPlugin) ModuleTypes() []string

ModuleTypes returns module type names this plugin provides.

func (*MigrationsPlugin) StepContracts added in v0.3.8

func (p *MigrationsPlugin) StepContracts() map[string]*dynamic.FieldContract

StepContracts returns strict field contracts for each step type. These contracts are used by the Workflow engine to validate step inputs at pipeline execution time and by wfctl audit for static analysis.

func (*MigrationsPlugin) StepTypes

func (p *MigrationsPlugin) StepTypes() []string

StepTypes returns step type names this plugin provides.

Directories

Path Synopsis
Package atlas provides a MigrationDriver backed by ariga.io/atlas v1.
Package atlas provides a MigrationDriver backed by ariga.io/atlas v1.
Package atlasplugin provides the Atlas migration driver plugin.
Package atlasplugin provides the Atlas migration driver plugin.
Package golangmigrate provides a MigrationDriver backed by golang-migrate/migrate/v4.
Package golangmigrate provides a MigrationDriver backed by golang-migrate/migrate/v4.
Package goose provides a MigrationDriver backed by pressly/goose/v3.
Package goose provides a MigrationDriver backed by pressly/goose/v3.
Package steps provides pipeline step implementations for database migrations.
Package steps provides pipeline step implementations for database migrations.

Jump to

Keyboard shortcuts

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