viewtypes

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalysisCompleteMsg

type AnalysisCompleteMsg struct {
	Stats *AnalysisStats
}

AnalysisCompleteMsg sent when analysis completes

type AnalysisStats

type AnalysisStats struct {
	TotalMigrations   int
	ObjectsCreated    int
	TablesCreated     int
	FunctionsCreated  int
	IndexesCreated    int
	PotentialSavings  float64
	FileReduction     int
	LifecyclePatterns []LifecyclePattern
	Dependencies      []DependencyInfo
	Warnings          []string
	Errors            []string
}

AnalysisStats contains analysis results

type BaseView

type BaseView struct {
	Width  int
	Height int
}

BaseView provides common functionality for all views

func (*BaseView) OnEnter

func (b *BaseView) OnEnter() tea.Cmd

func (*BaseView) OnExit

func (b *BaseView) OnExit() tea.Cmd

func (*BaseView) SetSize

func (b *BaseView) SetSize(width, height int)

type ConfigSavedMsg

type ConfigSavedMsg struct {
	Path string
}

ConfigSavedMsg sent when configuration is saved

type DependencyInfo

type DependencyInfo struct {
	Source string
	Target string
	Type   string
}

DependencyInfo represents a dependency relationship

type ErrorMsg

type ErrorMsg struct {
	Err error
}

ErrorMsg represents an error message

type LifecyclePattern

type LifecyclePattern struct {
	ObjectName  string
	ObjectType  string
	Operations  []string
	Optimizable bool
	Warning     string
}

LifecyclePattern represents an object's lifecycle

type LoadedMsg

type LoadedMsg struct {
	Data any
}

LoadedMsg indicates loading completed

type LoadingMsg

type LoadingMsg struct {
	Message string
}

LoadingMsg indicates loading state

type NavigateMsg struct {
	View ViewType
	Data any
}

NavigateMsg requests navigation to a different view

type SquashCompleteMsg

type SquashCompleteMsg struct {
	OutputPath string
	Stats      *SquashStats
}

SquashCompleteMsg sent when squashing completes

type SquashStats

type SquashStats struct {
	OriginalFiles    int
	SquashedFiles    int
	BytesSaved       int64
	ObjectsOptimized int
	Duration         float64
}

SquashStats contains squashing operation statistics

type SuccessMsg

type SuccessMsg struct {
	Message string
}

SuccessMsg represents a success message

type ValidationResultMsg

type ValidationResultMsg struct {
	Result   any // Use interface{} to avoid circular dependency with pkg/validation
	Success  bool
	Errors   []string
	Warnings []string
}

ValidationResultMsg contains validation results

type View

type View interface {
	// Init initializes the view
	Init() tea.Cmd

	// Update handles messages and updates view state
	Update(msg tea.Msg) (View, tea.Cmd)

	// View renders the view
	View() string

	// Type returns the view type
	Type() ViewType

	// SetSize sets the view dimensions
	SetSize(width, height int)

	// OnEnter is called when the view becomes active
	OnEnter() tea.Cmd

	// OnExit is called when leaving the view
	OnExit() tea.Cmd
}

View interface that all views must implement

type ViewType

type ViewType int

ViewType represents different views in the TUI

const (
	ViewDashboard ViewType = iota
	ViewAnalysis
	ViewConfig
	ViewDependencyGraph
	ViewProgress
	ViewHelp
	ViewValidation
)

Jump to

Keyboard shortcuts

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