Documentation
¶
Index ¶
- Variables
- func ExecuteTeaCmdWithTimeout(cmd tea.Cmd, timeout time.Duration) tea.Msg
- func InitialModel(firstFilePanelDirs []string, firstUseCheck, hasTrashCheck bool) tea.Model
- func IsTeaQuit(cmd tea.Cmd) bool
- func TeaUpdate(m *model, msg tea.Msg) (tea.Cmd, error)
- func TeaUpdateWithErrCheck(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 ¶
This section is empty.
Variables ¶
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
var SampleDataBytes = []byte("This is sample") //nolint: gochecknoglobals // Effectively const
Functions ¶
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
func TeaUpdate ¶
TeaUpdate : Utility to send update to model , majorly used in tests Not using pointer receiver as this is more like a utility, than a member function of model TODO : Should we validate that returned value is of type *model ? and equal to m ? We are assuming that to be true as of now
Types ¶
type BaseMessage ¶
type BaseMessage struct {
// contains filtered or unexported fields
}
func (BaseMessage) GetReqID ¶
func (msg BaseMessage) GetReqID() int
type CompressOperationMsg ¶
type CompressOperationMsg struct {
BaseMessage
// contains filtered or unexported fields
}
func NewCompressOperationMsg ¶
func NewCompressOperationMsg(state processbar.ProcessState, reqID int) CompressOperationMsg
func (CompressOperationMsg) ApplyToModel ¶
func (msg CompressOperationMsg) ApplyToModel(m *model) tea.Cmd
type DeleteOperationMsg ¶
type DeleteOperationMsg struct {
BaseMessage
// contains filtered or unexported fields
}
func NewDeleteOperationMsg ¶
func NewDeleteOperationMsg(state processbar.ProcessState, reqID int) DeleteOperationMsg
func (DeleteOperationMsg) ApplyToModel ¶
func (msg DeleteOperationMsg) ApplyToModel(m *model) tea.Cmd
type ExtractOperationMsg ¶
type ExtractOperationMsg struct {
BaseMessage
// contains filtered or unexported fields
}
func NewExtractOperationMsg ¶
func NewExtractOperationMsg(state processbar.ProcessState, reqID int) ExtractOperationMsg
func (ExtractOperationMsg) ApplyToModel ¶
func (msg ExtractOperationMsg) ApplyToModel(m *model) tea.Cmd
type IgnorerWriter ¶
type IgnorerWriter struct{}
type MetadataMsg ¶
type MetadataMsg struct {
BaseMessage
// contains filtered or unexported fields
}
func NewMetadataMsg ¶
func NewMetadataMsg(meta metadata.Metadata, reqID int) MetadataMsg
func (MetadataMsg) ApplyToModel ¶
func (msg MetadataMsg) ApplyToModel(m *model) tea.Cmd
type ModelUpdateMessage ¶
type NotifyModalUpdateMsg ¶
type NotifyModalUpdateMsg struct {
BaseMessage
// contains filtered or unexported fields
}
func NewNotifyModalMsg ¶
func NewNotifyModalMsg(m notify.Model, reqID int) NotifyModalUpdateMsg
func (NotifyModalUpdateMsg) ApplyToModel ¶
func (msg NotifyModalUpdateMsg) ApplyToModel(m *model) tea.Cmd
type PasteOperationMsg ¶
type PasteOperationMsg struct {
BaseMessage
// contains filtered or unexported fields
}
func NewPasteOperationMsg ¶
func NewPasteOperationMsg(state processbar.ProcessState, reqID int) PasteOperationMsg
func (PasteOperationMsg) ApplyToModel ¶
func (msg PasteOperationMsg) ApplyToModel(m *model) tea.Cmd
type ProcessBarUpdateMsg ¶
type ProcessBarUpdateMsg struct {
BaseMessage
// contains filtered or unexported fields
}
func (ProcessBarUpdateMsg) ApplyToModel ¶
func (msg ProcessBarUpdateMsg) ApplyToModel(m *model) tea.Cmd
type TeaProg ¶
type TeaProg struct {
// contains filtered or unexported fields
}
func NewTeaProg ¶
If you use this, make sure to handle cleanup
func (*TeaProg) SendDirectly ¶
Dont use eventloop and dont care about the tea.Cmd returned by Update()
func (*TeaProg) StartEventLoop ¶
func (p *TeaProg) StartEventLoop()
Source Files
¶
- config_function.go
- default_config.go
- file_operations.go
- file_operations_compress.go
- file_operations_extract.go
- file_panel.go
- function.go
- handle_file_operations.go
- handle_modal.go
- handle_panel_movement.go
- handle_panel_navigation.go
- handle_panel_up_down.go
- handle_tree_panel.go
- key_function.go
- model.go
- model_msg.go
- model_render.go
- test_utils.go
- test_utils_teaprog.go
- tree_panel.go
- tree_panel_render.go
- type.go
- type_utils.go
- wheel_function.go