Documentation
¶
Index ¶
- Constants
- Variables
- func ExecuteTeaCmdWithTimeout(cmd tea.Cmd, timeout time.Duration) tea.Msg
- func InitialModel(firstPanelPaths []string, firstUseCheck bool) tea.Model
- func IsTeaQuit(cmd tea.Cmd) bool
- func TeaUpdate(m *model, msg tea.Msg) tea.Cmd
- type BaseMessage
- type CompressOperationMsg
- type DeleteOperationMsg
- type ExtractOperationMsg
- type IgnorerWriter
- type MetadataMsg
- type ModelUpdateMessage
- type NotifyModalUpdateMsg
- type PasteOperationMsg
- type ProcessBarUpdateMsg
- type TeaProg
Constants ¶
View Source
const DefaultTestModelHeight = 2 * common.MinimumHeight
View Source
const DefaultTestModelWidth = 2 * common.MinimumWidth
View Source
const DefaultTestTick = 10 * time.Millisecond
View Source
const DefaultTestTimeout = time.Second
Variables ¶
View Source
var (
LastTimeCursorMove = [2]int{int(time.Now().UnixMicro()), 0} //nolint: gochecknoglobals // TODO: Move to model struct
)
These represent model's state information, its not a global preperty
Functions ¶
func ExecuteTeaCmdWithTimeout ¶ added in v1.4.0
func InitialModel ¶
Initialize and return model with default configs It returns only tea.Model because when it used in main, the return value is passed to tea.NewProgram() which accepts tea.Model Either way type 'model' is not exported, so there is not way main package can be aware of it, and use it directly
Types ¶
type BaseMessage ¶ added in v1.4.0
type BaseMessage struct {
// contains filtered or unexported fields
}
func (BaseMessage) GetReqID ¶ added in v1.4.0
func (msg BaseMessage) GetReqID() int
type CompressOperationMsg ¶ added in v1.4.0
type CompressOperationMsg struct {
BaseMessage
// contains filtered or unexported fields
}
func NewCompressOperationMsg ¶ added in v1.4.0
func NewCompressOperationMsg(state processbar.ProcessState, reqID int) CompressOperationMsg
func (CompressOperationMsg) ApplyToModel ¶ added in v1.4.0
func (msg CompressOperationMsg) ApplyToModel(_ *model) tea.Cmd
type DeleteOperationMsg ¶ added in v1.4.0
type DeleteOperationMsg struct {
BaseMessage
// contains filtered or unexported fields
}
func NewDeleteOperationMsg ¶ added in v1.4.0
func NewDeleteOperationMsg(state processbar.ProcessState, reqID int) DeleteOperationMsg
func (DeleteOperationMsg) ApplyToModel ¶ added in v1.4.0
func (msg DeleteOperationMsg) ApplyToModel(m *model) tea.Cmd
type ExtractOperationMsg ¶ added in v1.4.0
type ExtractOperationMsg struct {
BaseMessage
// contains filtered or unexported fields
}
func NewExtractOperationMsg ¶ added in v1.4.0
func NewExtractOperationMsg(state processbar.ProcessState, reqID int) ExtractOperationMsg
func (ExtractOperationMsg) ApplyToModel ¶ added in v1.4.0
func (msg ExtractOperationMsg) ApplyToModel(_ *model) tea.Cmd
type IgnorerWriter ¶ added in v1.4.0
type IgnorerWriter struct{}
type MetadataMsg ¶ added in v1.3.3
type MetadataMsg struct {
BaseMessage
// contains filtered or unexported fields
}
func NewMetadataMsg ¶ added in v1.4.0
func NewMetadataMsg(meta metadata.Metadata, metadataFocused bool, reqID int) MetadataMsg
func (MetadataMsg) ApplyToModel ¶ added in v1.4.0
func (msg MetadataMsg) ApplyToModel(m *model) tea.Cmd
type ModelUpdateMessage ¶ added in v1.4.0
type NotifyModalUpdateMsg ¶ added in v1.4.0
type NotifyModalUpdateMsg struct {
BaseMessage
// contains filtered or unexported fields
}
func NewNotifyModalMsg ¶ added in v1.4.0
func NewNotifyModalMsg(m notify.Model, reqID int) NotifyModalUpdateMsg
func (NotifyModalUpdateMsg) ApplyToModel ¶ added in v1.4.0
func (msg NotifyModalUpdateMsg) ApplyToModel(m *model) tea.Cmd
type PasteOperationMsg ¶ added in v1.4.0
type PasteOperationMsg struct {
BaseMessage
// contains filtered or unexported fields
}
func NewPasteOperationMsg ¶ added in v1.4.0
func NewPasteOperationMsg(state processbar.ProcessState, reqID int) PasteOperationMsg
func (PasteOperationMsg) ApplyToModel ¶ added in v1.4.0
func (msg PasteOperationMsg) ApplyToModel(m *model) tea.Cmd
type ProcessBarUpdateMsg ¶ added in v1.4.0
type ProcessBarUpdateMsg struct {
BaseMessage
// contains filtered or unexported fields
}
func (ProcessBarUpdateMsg) ApplyToModel ¶ added in v1.4.0
func (msg ProcessBarUpdateMsg) ApplyToModel(m *model) tea.Cmd
type TeaProg ¶ added in v1.4.0
type TeaProg struct {
// contains filtered or unexported fields
}
func NewTeaProg ¶ added in v1.4.0
If you use this, make sure to handle cleanup
func NewTestTeaProgWithEventLoop ¶ added in v1.4.0
func (*TeaProg) SendDirectly ¶ added in v1.4.0
Dont use eventloop and dont care about the tea.Cmd returned by Update()
func (*TeaProg) SendKeyDirectly ¶ added in v1.4.0
func (*TeaProg) StartEventLoop ¶ added in v1.4.0
func (p *TeaProg) StartEventLoop()
Source Files
¶
- config_function.go
- default_config.go
- file_operations.go
- file_operations_compress.go
- file_operations_extract.go
- function.go
- handle_file_operations.go
- handle_modal.go
- handle_panel_movement.go
- handle_panel_navigation.go
- key_function.go
- model.go
- model_msg.go
- model_render.go
- test_utils.go
- test_utils_teaprog.go
- type.go
- type_utils.go
- validation.go
- wheel_function.go
Click to show internal directories.
Click to hide internal directories.