Documentation ¶
Index ¶
- Constants
- type CollectionView
- func (v *CollectionView) HelpMsg() string
- func (v *CollectionView) Init() tea.Cmd
- func (v *CollectionView) Items() []list.Item
- func (v *CollectionView) ShowFooter() bool
- func (v *CollectionView) Type() string
- func (v *CollectionView) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (v *CollectionView) UpdateItemsFromCollections()
- func (v *CollectionView) View() string
- type EntityView
- type ErrorView
- type Form
- func (f *Form) Completed() bool
- func (f *Form) FindByKey(key string) *FormField
- func (f *Form) HelpMsg() string
- func (f *Form) Init() tea.Cmd
- func (f *Form) Run(ctx context.Context) error
- func (f *Form) ShowFooter() bool
- func (f *Form) Type() string
- func (f *Form) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (f *Form) ValueMap() map[string]any
- func (f *Form) View() string
- type FormField
- type FormFieldType
- type FrameView
- type LoadingView
- type LogArchiveView
- type MarkdownView
Constants ¶
View Source
const ( LoadingViewType = "loading" DefaultLoading = "loading..." )
View Source
const ErrorViewType = "error"
View Source
const FormViewType = "form"
View Source
const FrameViewType = "frame"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionView ¶
type CollectionView struct {
// contains filtered or unexported fields
}
func NewCollectionView ¶
func NewCollectionView( state *types.RenderState, collection types.Collection, format types.Format, selectedFunc func(header string) error, keys ...types.KeyCallback, ) *CollectionView
func (*CollectionView) HelpMsg ¶
func (v *CollectionView) HelpMsg() string
func (*CollectionView) Init ¶
func (v *CollectionView) Init() tea.Cmd
func (*CollectionView) Items ¶
func (v *CollectionView) Items() []list.Item
func (*CollectionView) ShowFooter ¶
func (v *CollectionView) ShowFooter() bool
func (*CollectionView) Type ¶
func (v *CollectionView) Type() string
func (*CollectionView) UpdateItemsFromCollections ¶
func (v *CollectionView) UpdateItemsFromCollections()
func (*CollectionView) View ¶
func (v *CollectionView) View() string
type EntityView ¶
type EntityView struct {
// contains filtered or unexported fields
}
func NewEntityView ¶
func NewEntityView( state *types.RenderState, entity types.Entity, format types.Format, keys ...types.KeyCallback, ) *EntityView
func (*EntityView) HelpMsg ¶
func (v *EntityView) HelpMsg() string
func (*EntityView) Init ¶
func (v *EntityView) Init() tea.Cmd
func (*EntityView) ShowFooter ¶
func (v *EntityView) ShowFooter() bool
func (*EntityView) Type ¶
func (v *EntityView) Type() string
func (*EntityView) View ¶
func (v *EntityView) View() string
type ErrorView ¶
type ErrorView struct {
// contains filtered or unexported fields
}
func (*ErrorView) ShowFooter ¶
type Form ¶
func NewForm ¶
NewForm creates a new form model that can be run in a Bubble Tea program. It includes some extra handling for reading piped input. This form should NOT be used in a tuikit container. Instead, use NewFormView.
func NewFormView ¶
func NewFormView( state *types.RenderState, fields ...*FormField, ) (*Form, error)
NewFormView creates a new form view that can be used in the tuikit container.
func (*Form) ShowFooter ¶
type FormField ¶
type FormField struct { Group uint Type FormFieldType Key string Default string Required bool ValidationExpr string Title string Description string Placeholder string // contains filtered or unexported fields }
func (*FormField) SetAndValidate ¶
func (*FormField) ValidateConfig ¶
func (*FormField) ValidateValue ¶
type FormFieldType ¶
type FormFieldType uint
const ( PromptTypeText FormFieldType = iota PromptTypeMasked PromptTypeMultiline PromptTypeConfirm )
type FrameView ¶
type FrameView struct {
// contains filtered or unexported fields
}
func NewFrameView ¶
func (*FrameView) ShowFooter ¶
type LoadingView ¶
type LoadingView struct {
// contains filtered or unexported fields
}
func NewLoadingView ¶
func NewLoadingView(msg string, styles styles.Theme) *LoadingView
func (*LoadingView) HelpMsg ¶
func (v *LoadingView) HelpMsg() string
func (*LoadingView) Init ¶
func (v *LoadingView) Init() tea.Cmd
func (*LoadingView) ShowFooter ¶
func (v *LoadingView) ShowFooter() bool
func (*LoadingView) Type ¶
func (v *LoadingView) Type() string
func (*LoadingView) View ¶
func (v *LoadingView) View() string
type LogArchiveView ¶
type LogArchiveView struct {
// contains filtered or unexported fields
}
func NewLogArchiveView ¶
func NewLogArchiveView(state *types.RenderState, archiveDir string, lastEntry bool) *LogArchiveView
func (*LogArchiveView) HelpMsg ¶
func (v *LogArchiveView) HelpMsg() string
func (*LogArchiveView) Init ¶
func (v *LogArchiveView) Init() tea.Cmd
func (*LogArchiveView) ShowFooter ¶
func (v *LogArchiveView) ShowFooter() bool
func (*LogArchiveView) Type ¶
func (v *LogArchiveView) Type() string
func (*LogArchiveView) View ¶
func (v *LogArchiveView) View() string
type MarkdownView ¶
type MarkdownView struct {
// contains filtered or unexported fields
}
func NewMarkdownView ¶
func NewMarkdownView(state *types.RenderState, content string) *MarkdownView
func (*MarkdownView) HelpMsg ¶
func (v *MarkdownView) HelpMsg() string
func (*MarkdownView) Init ¶
func (v *MarkdownView) Init() tea.Cmd
func (*MarkdownView) ShowFooter ¶
func (v *MarkdownView) ShowFooter() bool
func (*MarkdownView) Type ¶
func (v *MarkdownView) Type() string
func (*MarkdownView) View ¶
func (v *MarkdownView) View() string
Click to show internal directories.
Click to hide internal directories.