tui

package
v0.1.0-alpha.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Application struct {
		Template struct {
			Name           string `yaml:"name"`
			DeploymentName string `yaml:"deploymentName"`
			RegistryLogin  struct {
				Registry            string `yaml:"registry"`
				Username            string `yaml:"username"`
				PersonalAccessToken string `yaml:"personalAccessToken"`
			} `yaml:"registryLogin"`
			Pods []struct {
				Type       string `yaml:"type"`
				ExposeHttp bool   `yaml:"exposeHttp"`
				Name       string `yaml:"name"`
				Tag        string `yaml:"tag"`
				PrivateTag bool   `yaml:"privateTag"`
				Vars       []struct {
					Key   string `yaml:"key"`
					Value string `yaml:"value"`
				} `yaml:"vars"`
			} `yaml:"pods"`
		} `yaml:"template"`
	} `yaml:"application"`
}

type DeploymentConfig

type DeploymentConfig struct {
	AppName        string
	DeploymentName string
	DatabaseType   string
	BackendType    string
	FrontendType   string
	GithubUsername string
	GithubToken    string
}

DeploymentConfig holds the configuration for deployment

type DeploymentWizard

type DeploymentWizard struct {
	// contains filtered or unexported fields
}

DeploymentWizard handles the interactive deployment creation process

func NewDeploymentWizard

func NewDeploymentWizard() *DeploymentWizard

NewDeploymentWizard creates a new deployment wizard

func (*DeploymentWizard) GetDeploymentConfig

func (w *DeploymentWizard) GetDeploymentConfig() (map[string]interface{}, error)

GetDeploymentConfig returns the deployment configuration

func (*DeploymentWizard) Run

func (w *DeploymentWizard) Run() error

Run starts the deployment wizard

func (*DeploymentWizard) SaveDeploymentConfig

func (w *DeploymentWizard) SaveDeploymentConfig(config map[string]interface{}) error

SaveDeploymentConfig saves the deployment configuration to disk

type Editor

type Editor struct {
	// contains filtered or unexported fields
}

Editor represents the YAML editor component

func NewEditor

func NewEditor(content string) Editor

NewEditor creates a new YAML editor

func (Editor) GetContent

func (e Editor) GetContent() string

GetContent returns the editor content

func (Editor) Init

func (e Editor) Init() tea.Cmd

Init initializes the editor

func (*Editor) SetContent

func (e *Editor) SetContent(content string)

SetContent sets the editor content

func (Editor) Update

func (e Editor) Update(msg tea.Msg) (Editor, tea.Cmd)

Update handles editor updates

func (Editor) View

func (e Editor) View() string

View renders the editor

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model represents the TUI state

func NewModel

func NewModel() Model

NewModel creates a new TUI model

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles model updates

func (Model) View

func (m Model) View() string

View renders the model

type Spinner

type Spinner struct {
	// contains filtered or unexported fields
}

func NewSpinner

func NewSpinner(message string) *Spinner

func (*Spinner) Start

func (s *Spinner) Start()

func (*Spinner) Stop

func (s *Spinner) Stop()

type Step

type Step struct {
	Title       string
	Description string
	InputLabel  string
	Completed   bool
	Error       error
}

Step represents a wizard step

Jump to

Keyboard shortcuts

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