model

package
v0.0.0-...-18da6ed Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewModel

func NewModel(items []list.Item) list.Model

NewModel returns a new model with sensible defaults.

Types

type LangOptionsView

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

LangOptionsView

A selectable list for language choice.

func NewLangOptionsView

func NewLangOptionsView(project *ProjectSetup) LangOptionsView

NewLangOptionsView

Construct a new LangOptionsView

func (LangOptionsView) Init

func (o LangOptionsView) Init() tea.Cmd

Init

Initial state for the bubble-tea cli

func (LangOptionsView) Update

func (o LangOptionsView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update

Render update for bubble-tea

func (LangOptionsView) View

func (o LangOptionsView) View() string

View

Render TextField as string

type LoadingView

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

LoadingView

Progress indicator that wait for a process to finish

func NewLoadingView

func NewLoadingView(op func()) LoadingView

NewLoadingView

Construct a new LoadingView

func (LoadingView) Init

func (m LoadingView) Init() tea.Cmd

Init

Initial state for the bubble-tea cli

func (LoadingView) Update

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

Update

Render update for bubble-tea

func (LoadingView) View

func (m LoadingView) View() string

View

Render TextField as string

type ProjectSetup

type ProjectSetup struct {
	Lang     string
	Template string
	Name     string
}

ProjectSetup

State over multiple Bubble-tea CLI

func NewProject

func NewProject() *ProjectSetup

NewProject

Construct a Project

func (*ProjectSetup) Setup

func (p *ProjectSetup) Setup()

Setup

Set up the finished project

type TemplatesView

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

TemplatesView

Multi-item list select rendered by Bubbles-tea.

func NewTemplateView

func NewTemplateView(project *ProjectSetup) TemplatesView

NewTemplateView

Construct a new Template

func (TemplatesView) Init

func (g TemplatesView) Init() tea.Cmd

Init

Initial state for the bubble-tea cli

func (TemplatesView) Update

func (g TemplatesView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update

Render update for bubble-tea

func (TemplatesView) View

func (g TemplatesView) View() string

View

Render TextFieldView as string

type TextFieldView

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

TextFieldView

CLI TextFieldView

func NewTextFieldView

func NewTextFieldView(project *ProjectSetup) TextFieldView

NewTextFieldView

Create a new TextFieldView

func (TextFieldView) Init

func (t TextFieldView) Init() tea.Cmd

Init

Initial state for the bubble-tea cli

func (TextFieldView) Update

func (t TextFieldView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update

Render update for bubble-tea

func (TextFieldView) View

func (t TextFieldView) View() string

View

Render TextFieldView as string

Jump to

Keyboard shortcuts

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