message

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package message contains shared messages which are used to communicate between bubbletea components

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TeaCmd

func TeaCmd(msg any) func() tea.Msg

TeaCmd - is a helper function which creates tea.Cmd from tea.Msg object.

func TerminalSizePollingMsg added in v0.2.0

func TerminalSizePollingMsg() tea.Msg

TerminalSizePollingMsg - is a tea.Msg which is used to poll terminal size.

Types

type CloseViewHostEdit added in v1.3.0

type CloseViewHostEdit struct{}

CloseViewHostEdit triggers when users exits from edit form without saving results.

type CloseViewSelectGroup added in v1.3.0

type CloseViewSelectGroup struct{}

CloseViewSelectGroup - dispatched when it's required to close group list view.

type ErrorOccurred added in v1.3.0

type ErrorOccurred struct{ Err error }

ErrorOccurred - is dispatched when an error occurs.

type GroupSelected added in v1.3.0

type GroupSelected struct{ Name string }

GroupSelected - is dispatched when select a group in group list view.

type HostCreated added in v1.2.0

type HostCreated struct{ Host host.Host }

HostCreated - is dispatched when a new host was added to the database.

type HostSSHConfigLoaded added in v1.1.0

type HostSSHConfigLoaded struct {
	HostID int
	Config ssh.Config
}

HostSSHConfigLoaded triggers when app loads a host config using ssh -G <hostname>. The config is stored in main model: m.appState.HostSSHConfig.

type HostSelected added in v1.3.0

type HostSelected struct{ HostID int }

HostSelected is required to let host list know that it's time to update title.

type HostUpdated added in v1.2.0

type HostUpdated struct{ Host host.Host }

HostUpdated - is dispatched when host model is updated.

type InitComplete

type InitComplete struct{}

InitComplete - is a message which is sent when bubbletea models are initialized.

type OpenViewHostEdit added in v1.3.0

type OpenViewHostEdit struct{ HostID int }

OpenViewHostEdit fires when user press edit button on a selected host.

type OpenViewSelectGroup added in v1.3.0

type OpenViewSelectGroup struct{}

OpenViewSelectGroup - dispatched when it's required to open group list view.

type RunProcessErrorOccurred added in v1.1.0

type RunProcessErrorOccurred struct {
	ProcessType constant.ProcessType
	StdOut      string // Even if process fails, it may have some output.
	StdErr      string
}

RunProcessErrorOccurred fires when there is an error executing an external process.

type RunProcessSSHConnect added in v1.2.0

type RunProcessSSHConnect struct{ Host host.Host }

RunProcessSSHConnect is dispatched when user wants to connect to a host.

type RunProcessSSHCopyID added in v1.2.0

type RunProcessSSHCopyID struct{ Host host.Host }

RunProcessSSHCopyID is dispatched when user wants to copy SSH key to a remote host.

type RunProcessSSHLoadConfig added in v1.2.0

type RunProcessSSHLoadConfig struct{ Host host.Host }

RunProcessSSHLoadConfig is dispatched it's required to read .ssh/config file for a certain host.

type RunProcessSuccess added in v1.1.0

type RunProcessSuccess struct {
	ProcessType constant.ProcessType
	StdOut      string
	StdErr      string // Even if process succeeds, it may have some output.
}

RunProcessSuccess fires when external process exits normally.

type TerminalSizePolling added in v0.2.0

type TerminalSizePolling struct{ Width, Height int }

TerminalSizePolling - is a message which is sent when terminal width and/or height changes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳