form

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(model *Model) (string, error)

Types

type FormFn

type FormFn func(*config.CloudConfig, *FormResult) error

type FormOption

type FormOption struct {
	Value string
	Label string
}

func (FormOption) Description

func (i FormOption) Description() string

func (FormOption) FilterValue

func (i FormOption) FilterValue() string

func (FormOption) Title

func (i FormOption) Title() string

type FormResult

type FormResult struct {
	Org           string
	Env           string
	AssetType     string
	AssetName     string
	VpcName       string
	Engine        string
	EngineVersion string
	InAsset       string
	OutAsset      string
	Asset         string
	Description   string
}

type LoadOptionsFn

type LoadOptionsFn func(cfg *config.CloudConfig) ([]list.Item, error)

type Model

type Model struct {
	Result string
	Err    error
	// contains filtered or unexported fields
}

func NewModel

func NewModel(cfg *config.CloudConfig, schema *SubSchema) *Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

func (Model) View

func (m Model) View() string

type SubSchema

type SubSchema struct {
	Title       string
	Type        string
	LoadOptions LoadOptionsFn
	Err         error
}

Jump to

Keyboard shortcuts

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