Documentation
¶
Index ¶
- Variables
- func Display[M Model[V], V any](ctx context.Context, m M) (V, error)
- func IsRenderable() bool
- func WrapWord(text []byte, width int) []byte
- type ConfigInputModel
- type ConfirmModel
- type ContentModel
- type JSONRenderer
- type MarkdownRender
- type Model
- type Renderer
- type SpinnerModel
- type StreamModel
- type TextAreaModel
- type TextRenderer
- type Viewport
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Stdin io.ReadCloser = os.Stdin Stdout io.Writer = os.Stdout Stderr io.Writer = os.Stderr )
View Source
var SSHAPPMode bool
run as a ssh app
Functions ¶
func IsRenderable ¶
func IsRenderable() bool
Types ¶
type ConfigInputModel ¶
type ConfigInputModel struct {
// contains filtered or unexported fields
}
func NewConfigInputModel ¶
func NewConfigInputModel(prompts ...string) *ConfigInputModel
func (*ConfigInputModel) Error ¶
func (m *ConfigInputModel) Error() error
func (*ConfigInputModel) Init ¶
func (m *ConfigInputModel) Init() tea.Cmd
func (*ConfigInputModel) Value ¶
func (m *ConfigInputModel) Value() []string
func (*ConfigInputModel) View ¶
func (m *ConfigInputModel) View() string
type ConfirmModel ¶
type ConfirmModel struct {
// contains filtered or unexported fields
}
func NewConfimModel ¶
func NewConfimModel(prompt string) *ConfirmModel
func (*ConfirmModel) Error ¶
func (m *ConfirmModel) Error() error
func (*ConfirmModel) Init ¶
func (m *ConfirmModel) Init() tea.Cmd
func (*ConfirmModel) Value ¶
func (m *ConfirmModel) Value() bool
func (*ConfirmModel) View ¶
func (m *ConfirmModel) View() string
type ContentModel ¶ added in v0.2.2
func NewContentModel ¶ added in v0.2.2
func NewContentModel(text string, rendererName string) *ContentModel
func (*ContentModel) Error ¶ added in v0.2.2
func (m *ContentModel) Error() error
func (*ContentModel) Init ¶ added in v0.2.2
func (m *ContentModel) Init() tea.Cmd
func (*ContentModel) Value ¶ added in v0.2.2
func (m *ContentModel) Value() string
func (*ContentModel) View ¶ added in v0.2.2
func (m *ContentModel) View() string
type JSONRenderer ¶
type JSONRenderer struct { }
type MarkdownRender ¶
type MarkdownRender struct { }
type Renderer ¶
func NewRenderer ¶ added in v0.2.2
type SpinnerModel ¶
func NewSpinnerModel ¶
func NewSpinnerModel[V any](hint string, do func() (V, error)) *SpinnerModel[V]
func (*SpinnerModel[V]) Error ¶
func (s *SpinnerModel[V]) Error() error
func (*SpinnerModel[V]) Init ¶
func (s *SpinnerModel[V]) Init() tea.Cmd
func (*SpinnerModel[V]) Value ¶
func (s *SpinnerModel[V]) Value() V
func (*SpinnerModel[V]) View ¶
func (s *SpinnerModel[V]) View() string
type StreamModel ¶
type StreamModel[E any, S chan E] struct { spinner.Model // contains filtered or unexported fields }
func NewStreamModel ¶
func NewStreamModel[E any, S chan E](stream S, rendererName string, onEvent func(event E) (string, error)) *StreamModel[E, S]
func (*StreamModel[E, S]) Error ¶
func (s *StreamModel[E, S]) Error() error
func (*StreamModel[E, S]) Init ¶
func (s *StreamModel[E, S]) Init() tea.Cmd
func (*StreamModel[E, S]) Value ¶
func (s *StreamModel[E, S]) Value() string
func (*StreamModel[E, S]) View ¶
func (s *StreamModel[E, S]) View() string
type TextAreaModel ¶
func NewTextAreaModel ¶
func NewTextAreaModel() *TextAreaModel
func (*TextAreaModel) Error ¶
func (m *TextAreaModel) Error() error
func (*TextAreaModel) Init ¶
func (m *TextAreaModel) Init() tea.Cmd
func (*TextAreaModel) Value ¶
func (m *TextAreaModel) Value() string
func (*TextAreaModel) View ¶
func (m *TextAreaModel) View() string
type TextRenderer ¶
type Viewport ¶
type Viewport struct {
// contains filtered or unexported fields
}
func NewViewport ¶
Click to show internal directories.
Click to hide internal directories.