ui

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run() error

Run 运行交互式界面

Types

type FormModel

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

FormModel 表单模型

func NewFormModel

func NewFormModel(editingServer *config.Server, onSave func(config.Server) error, onCancel func()) FormModel

NewFormModel 创建表单模型

func (FormModel) Init

func (m FormModel) Init() tea.Cmd

Init 初始化表单

func (FormModel) Update

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

Update 更新表单

func (FormModel) View

func (m FormModel) View() string

View 渲染表单

type Model

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

Model UI模型

func NewModel

func NewModel() (*Model, error)

NewModel 创建新的UI模型

func (Model) Init

func (m Model) Init() tea.Cmd

Init 初始化

func (Model) Update

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

Update 更新模型

func (Model) View

func (m Model) View() string

View 渲染视图

Jump to

Keyboard shortcuts

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