analysis

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigKey = "config"

Variables

This section is empty.

Functions

func DoSimpleAnalysis

func DoSimpleAnalysis(
	input types.ParsedMigrationsSummary,
	simpleAnalyzer SimpleOneMigrationAnalyzer,
	reportText string,
	actions []string,
) types.AnalyzedMigrationsSummary

Runs a typical very simple analysis: - run a given SimpleAnalyzer for each migration's Up contents - store any resulting diagnostic - run a given SimpleAnalyzer for each migration's Down contents - store any resulting diagnostic - if any diagnostic is produced, store a Report for that migration file - eventually, return all Reports generated

func GetConfigValue

func GetConfigValue(ctx context.Context, key string) (string, bool)

func PadDownMigration

func PadDownMigration(up string, down string) string

Types

type SimpleOneMigrationAnalyzer

type SimpleOneMigrationAnalyzer interface {
	Analyze(ctx context.Context, migration string, options map[string]string) []types.Diagnostic
}

Jump to

Keyboard shortcuts

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