Documentation ¶
Index ¶
- Constants
- func RunMarkdownView(theme styles.Theme, appName, ctxKey, ctxValue, content string) error
- type CollectionView
- func (v *CollectionView) HelpMsg() string
- func (v *CollectionView) Init() tea.Cmd
- func (v *CollectionView) Interactive() bool
- func (v *CollectionView) Items() []list.Item
- 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 ContainerView
- func (a *ContainerView) FullHeight() int
- func (a *ContainerView) HandleError(err error)
- func (a *ContainerView) Height() int
- func (a *ContainerView) Init() tea.Cmd
- func (a *ContainerView) Ready() bool
- func (a *ContainerView) SetContext(ctx string)
- func (a *ContainerView) SetNotice(notice string, lvl styles.NoticeLevel)
- func (a *ContainerView) SetView(model TeaModel)
- func (a *ContainerView) Shutdown()
- func (a *ContainerView) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (a *ContainerView) View() string
- func (a *ContainerView) Width() int
- type EntityView
- type ErrorView
- type Format
- type FrameView
- type KeyCallback
- type LoadingView
- type LogArchiveView
- type MarkdownView
- type NoticeLevel
- type TeaModel
- func NewCollectionView(state *TerminalState, collection types.Collection, format Format, ...) TeaModel
- func NewEntityView(state *TerminalState, entity types.Entity, format Format, keys ...KeyCallback) TeaModel
- func NewErrorView(err error, styles styles.Theme) TeaModel
- func NewFrameView(model tea.Model) TeaModel
- func NewLoadingView(msg string, styles styles.Theme) TeaModel
- func NewLogArchiveView(state *TerminalState, archiveDir string, lastEntry bool) TeaModel
- type TerminalState
- type TextInput
- func (t *TextInput) HelpMsg() string
- func (t *TextInput) Init() tea.Cmd
- func (t *TextInput) Interactive() bool
- func (t *TextInput) RunProgram(styles styles.Theme) (string, error)
- func (t *TextInput) Type() string
- func (t *TextInput) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (t *TextInput) Value() string
- func (t *TextInput) View() string
- type TextInputList
- type TickMsg
Constants ¶
View Source
const ErrorViewType = "error"
View Source
const FrameViewType = "frame"
View Source
const LoadingViewType = "loading"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CollectionView ¶
type CollectionView struct {
// contains filtered or unexported fields
}
func (*CollectionView) HelpMsg ¶
func (v *CollectionView) HelpMsg() string
func (*CollectionView) Init ¶
func (v *CollectionView) Init() tea.Cmd
func (*CollectionView) Interactive ¶
func (v *CollectionView) Interactive() bool
func (*CollectionView) Items ¶
func (v *CollectionView) Items() []list.Item
func (*CollectionView) Type ¶
func (v *CollectionView) Type() string
func (*CollectionView) UpdateItemsFromCollections ¶
func (v *CollectionView) UpdateItemsFromCollections()
func (*CollectionView) View ¶
func (v *CollectionView) View() string
type ContainerView ¶
type ContainerView struct {
// contains filtered or unexported fields
}
func InitalizeContainer ¶
func InitalizeContainer( ctx context.Context, cancel context.CancelFunc, appName, headerCtxKey, headerCtxVal string, styles styles.Theme, ) *ContainerView
func (*ContainerView) FullHeight ¶ added in v0.0.14
func (a *ContainerView) FullHeight() int
FullHeight returns the full height of the terminal window including the header and footer
func (*ContainerView) HandleError ¶
func (a *ContainerView) HandleError(err error)
func (*ContainerView) Height ¶
func (a *ContainerView) Height() int
func (*ContainerView) Init ¶
func (a *ContainerView) Init() tea.Cmd
func (*ContainerView) Ready ¶
func (a *ContainerView) Ready() bool
func (*ContainerView) SetContext ¶
func (a *ContainerView) SetContext(ctx string)
func (*ContainerView) SetNotice ¶
func (a *ContainerView) SetNotice(notice string, lvl styles.NoticeLevel)
func (*ContainerView) SetView ¶
func (a *ContainerView) SetView(model TeaModel)
func (*ContainerView) Shutdown ¶ added in v0.0.13
func (a *ContainerView) Shutdown()
func (*ContainerView) View ¶
func (a *ContainerView) View() string
func (*ContainerView) Width ¶
func (a *ContainerView) Width() int
type EntityView ¶
type EntityView struct {
// contains filtered or unexported fields
}
func (*EntityView) HelpMsg ¶
func (v *EntityView) HelpMsg() string
func (*EntityView) Init ¶
func (v *EntityView) Init() tea.Cmd
func (*EntityView) Interactive ¶
func (v *EntityView) Interactive() 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) Interactive ¶
type FrameView ¶ added in v0.0.13
type FrameView struct {
// contains filtered or unexported fields
}
func (*FrameView) Interactive ¶ added in v0.0.13
type KeyCallback ¶
type LoadingView ¶
type LoadingView struct {
// contains filtered or unexported fields
}
func (*LoadingView) HelpMsg ¶
func (v *LoadingView) HelpMsg() string
func (*LoadingView) Init ¶
func (v *LoadingView) Init() tea.Cmd
func (*LoadingView) Interactive ¶
func (v *LoadingView) Interactive() bool
func (*LoadingView) Type ¶
func (v *LoadingView) Type() string
func (*LoadingView) View ¶
func (v *LoadingView) View() string
type LogArchiveView ¶ added in v0.0.4
type LogArchiveView struct {
// contains filtered or unexported fields
}
func (*LogArchiveView) HelpMsg ¶ added in v0.0.4
func (v *LogArchiveView) HelpMsg() string
func (*LogArchiveView) Init ¶ added in v0.0.4
func (v *LogArchiveView) Init() tea.Cmd
func (*LogArchiveView) Interactive ¶ added in v0.0.4
func (v *LogArchiveView) Interactive() bool
func (*LogArchiveView) Type ¶ added in v0.0.4
func (v *LogArchiveView) Type() string
func (*LogArchiveView) View ¶ added in v0.0.4
func (v *LogArchiveView) View() string
type MarkdownView ¶
type MarkdownView struct {
// contains filtered or unexported fields
}
func (*MarkdownView) HelpMsg ¶
func (v *MarkdownView) HelpMsg() string
func (*MarkdownView) Init ¶
func (v *MarkdownView) Init() tea.Cmd
func (*MarkdownView) Interactive ¶
func (v *MarkdownView) Interactive() bool
func (*MarkdownView) RunProgram ¶ added in v0.0.4
func (v *MarkdownView) RunProgram() error
func (*MarkdownView) Type ¶
func (v *MarkdownView) Type() string
func (*MarkdownView) View ¶
func (v *MarkdownView) View() string
type NoticeLevel ¶
type NoticeLevel string
type TeaModel ¶
func NewCollectionView ¶
func NewCollectionView( state *TerminalState, collection types.Collection, format Format, selectedFunc func(header string) error, keys ...KeyCallback, ) TeaModel
func NewEntityView ¶
func NewEntityView( state *TerminalState, entity types.Entity, format Format, keys ...KeyCallback, ) TeaModel
func NewFrameView ¶ added in v0.0.13
func NewLogArchiveView ¶ added in v0.0.4
func NewLogArchiveView(state *TerminalState, archiveDir string, lastEntry bool) TeaModel
type TextInput ¶
type TextInput struct { Key string Prompt string Placeholder string Hidden bool // contains filtered or unexported fields }
func (*TextInput) Interactive ¶
type TextInputList ¶
type TextInputList []*TextInput
func ProcessInputs ¶
func ProcessInputs(styles styles.Theme, inputs ...*TextInput) (TextInputList, error)
func (TextInputList) FindByKey ¶
func (t TextInputList) FindByKey(key string) *TextInput
func (TextInputList) ValueMap ¶
func (t TextInputList) ValueMap() map[string]string
Click to show internal directories.
Click to hide internal directories.