Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/Adembc/lazyssh
/ functions
Functions
299 in github.com/Adembc/lazyssh
⨍
Functions
299
◇
Types & classes
26
↓ 51 callers
Method
addKVNodeIfNotEmpty
addKVNodeIfNotEmpty adds a key-value node to the host if the value is not empty.
internal/adapters/data/ssh_config_file/crud.go:192
↓ 37 callers
Function
GetFieldPlaceholder
GetFieldPlaceholder returns an appropriate placeholder for a form field It returns either the default value, an example, or an empty string nolint:go
internal/adapters/ui/defaults.go:134
↓ 30 callers
Method
addDropDownWithHelp
addDropDownWithHelp adds a dropdown field with help support
internal/adapters/ui/server_form.go:950
↓ 30 callers
Method
findOptionIndex
findOptionIndex finds the index of a value in options slice
internal/adapters/ui/server_form.go:647
↓ 29 callers
Function
createOptionsWithDefault
createOptionsWithDefault creates dropdown options with default value indicated
internal/adapters/ui/server_form.go:616
↓ 21 callers
Method
validateField
validateField validates a single field and updates the validation state
internal/adapters/ui/server_form.go:908
↓ 19 callers
Method
addValidatedInputField
addValidatedInputField adds an input field with real-time validation
internal/adapters/ui/server_form.go:985
↓ 18 callers
Method
addInputFieldWithHelp
addInputFieldWithHelp adds a regular input field with help support
internal/adapters/ui/server_form.go:965
↓ 15 callers
Method
Run
()
internal/adapters/ui/tui.go:26
↓ 12 callers
Method
SetError
SetError sets or clears an error for a field
internal/adapters/ui/validation.go:50
↓ 11 callers
Method
String
()
internal/adapters/ui/sort.go:34
↓ 11 callers
Method
showStatusTemp
showStatusTemp displays a temporary message in the status bar (default green) and then restores the default text.
internal/adapters/ui/handlers.go:554
↓ 11 callers
Method
showStatusTempColor
showStatusTempColor displays a temporary colored message in the status bar and restores default text after 2s.
internal/adapters/ui/handlers.go:562
↓ 10 callers
Method
Error
()
internal/adapters/ui/validation_test.go:266
↓ 10 callers
Method
GetSelectedServer
()
internal/adapters/ui/server_list.go:79
↓ 10 callers
Method
refreshServerList
============================================================================= Internal Operations (perform actual work) ==============================
internal/adapters/ui/handlers.go:539
↓ 9 callers
Method
Stat
(name string)
internal/adapters/data/ssh_config_file/file_system.go:26
↓ 9 callers
Function
quoteIfNeeded
quoteIfNeeded returns the value quoted if it contains spaces.
internal/adapters/ui/utils.go:476
↓ 9 callers
Method
returnToMain
()
internal/adapters/ui/handlers.go:549
↓ 8 callers
Method
Open
(name string)
internal/adapters/data/ssh_config_file/file_system.go:24
↓ 8 callers
Function
addOption
addOption adds an SSH option in the format "-o Key=Value" if value is not empty
internal/adapters/ui/utils.go:210
↓ 7 callers
Method
IsNotExist
(err error)
internal/adapters/data/ssh_config_file/file_system.go:27
↓ 7 callers
Method
handleSave
handleSave validates and saves the form, returns true if successful
internal/adapters/ui/server_form.go:1877
↓ 6 callers
Method
GetErrorCount
GetErrorCount returns the number of validation errors
internal/adapters/ui/validation.go:75
↓ 6 callers
Method
createAlgorithmAutocomplete
createAlgorithmAutocomplete creates an autocomplete function for algorithm input fields
internal/adapters/ui/server_form.go:857
↓ 6 callers
Function
escapeForTview
escapeForTview escapes special characters for tview display
internal/adapters/ui/server_form.go:467
↓ 6 callers
Function
removeNodesByKey
removeNodesByKey removes all nodes with the specified key from the nodes slice
internal/adapters/data/ssh_config_file/crud.go:248
↓ 5 callers
Method
ListServers
(query string)
internal/core/ports/services.go:24
↓ 5 callers
Method
OpenFile
(path string, i int, perms os.FileMode)
internal/adapters/data/ssh_config_file/file_system.go:31
↓ 5 callers
Method
UpdateServer
(server domain.Server, newServer domain.Server)
internal/core/ports/services.go:25
↓ 5 callers
Method
convertCLIForwardToConfigFormat
convertCLIForwardToConfigFormat converts CLI format forwarding spec to SSH config format. CLI format: [bind_address:]port:host:hostport Config format:
internal/adapters/data/ssh_config_file/crud.go:497
↓ 5 callers
Method
getDefaultValues
getDefaultValues returns default form values based on mode
internal/adapters/ui/server_form.go:1066
↓ 5 callers
Method
loadAll
()
internal/adapters/data/ssh_config_file/metadata_manager.go:44
↓ 5 callers
Method
setupFormShortcuts
setupFormShortcuts sets up keyboard shortcuts for a form
internal/adapters/ui/server_form.go:575
↓ 5 callers
Method
switchToTab
(tabName string)
internal/adapters/ui/server_form.go:388
↓ 5 callers
Method
updateHelp
updateHelp updates the help panel with information for the given field
internal/adapters/ui/server_form.go:435
↓ 4 callers
Method
Clear
Clear removes all validation errors
internal/adapters/ui/validation.go:120
↓ 4 callers
Function
NewValidationState
NewValidationState creates a new validation state
internal/adapters/ui/validation.go:43
↓ 4 callers
Method
ReadDir
(dir string)
internal/adapters/data/ssh_config_file/file_system.go:32
↓ 4 callers
Method
UpdateServers
(servers []domain.Server)
internal/adapters/ui/server_list.go:57
↓ 4 callers
Method
getFormData
stripColorTags removes tview color tags from a string e.g., "[red]Port:[-]" becomes "Port:"
internal/adapters/ui/server_form.go:1738
↓ 4 callers
Method
handleModalClose
()
internal/adapters/ui/handlers.go:275
↓ 4 callers
Method
loadConfig
loadConfig reads and parses the SSH config file. If the file does not exist, it returns an empty config without error to support first-run behavior.
internal/adapters/data/ssh_config_file/config_io.go:28
↓ 4 callers
Method
nextTab
()
internal/adapters/ui/server_form.go:406
↓ 4 callers
Method
prevTab
()
internal/adapters/ui/server_form.go:420
↓ 4 callers
Method
saveAll
(metadata map[string]ServerMetadata)
internal/adapters/data/ssh_config_file/metadata_manager.go:67
↓ 4 callers
Function
sortServersForUI
sortServersForUI sorts servers according to the rules required by the UI. Pinned servers are always at the top, ordered by pinned date (newest first).
internal/adapters/ui/sort.go:85
↓ 4 callers
Function
validateBindAddress
validateBindAddress validates a bind address (IP, hostname, or *)
internal/adapters/ui/validation.go:618
↓ 3 callers
Function
BuildSSHCommand
BuildSSHCommand constructs a ready-to-run ssh command for the given server. Format: ssh [options] [user@]host [command]
internal/adapters/ui/utils.go:138
↓ 3 callers
Method
DeleteServer
(server domain.Server)
internal/core/ports/services.go:27
↓ 3 callers
Function
GetAvailableKnownHostsFiles
GetAvailableKnownHostsFiles returns a list of available known_hosts files in common locations. It safely handles file permission issues and only retur
internal/adapters/ui/utils.go:575
↓ 3 callers
Function
GetAvailableSSHKeys
GetAvailableSSHKeys returns a list of available SSH private key files in the user's .ssh directory. It safely handles file permission issues and only
internal/adapters/ui/utils.go:485
↓ 3 callers
Function
GetFieldHelp
GetFieldHelp returns help information for a specific field
internal/adapters/ui/field_help.go:39
↓ 3 callers
Method
HasErrors
HasErrors checks if there are any validation errors
internal/adapters/ui/validation.go:68
↓ 3 callers
Function
NewAppHeader
(version, gitCommit, repoURL string)
internal/adapters/ui/header.go:32
↓ 3 callers
Method
Remove
(file string)
internal/adapters/data/ssh_config_file/file_system.go:28
↓ 3 callers
Method
convertConfigForwardToCLIFormat
convertConfigForwardToCLIFormat converts SSH config format forwarding spec to CLI format. Config format: [bind_address:]port host:hostport CLI format:
internal/adapters/data/ssh_config_file/mapper.go:322
↓ 3 callers
Function
matchesSequence
matchesSequence checks if all characters in pattern appear in sequence within text
internal/adapters/ui/server_form.go:679
↓ 3 callers
Method
renderTab
(tab string, isCurrent bool, useAbbrev bool, index int)
internal/adapters/ui/server_form.go:247
↓ 3 callers
Method
saveConfig
saveConfig writes the SSH config back to the file with atomic operations and backup management.
internal/adapters/data/ssh_config_file/config_io.go:51
↓ 3 callers
Method
updateListTitle
()
internal/adapters/ui/tui.go:141
↓ 3 callers
Method
updateTabBar
()
internal/adapters/ui/server_form.go:335
↓ 2 callers
Method
AddServer
(server domain.Server)
internal/core/ports/services.go:26
↓ 2 callers
Function
DefaultStatusText
()
internal/adapters/ui/status_bar.go:22
↓ 2 callers
Method
GetAllErrors
GetAllErrors returns all validation errors in field order
internal/adapters/ui/validation.go:82
↓ 2 callers
Function
GetFieldValidators
GetFieldValidators returns validation rules for SSH configuration fields
internal/adapters/ui/validation.go:133
↓ 2 callers
Function
GetSSHFieldDefault
GetSSHFieldDefault returns the default value for a given SSH field Returns empty string if no default is defined
internal/adapters/ui/defaults.go:114
↓ 2 callers
Function
NewServerForm
(mode ServerFormMode, original *domain.Server)
internal/adapters/ui/server_form.go:70
↓ 2 callers
Method
OnCancel
(fn func())
internal/adapters/ui/server_form.go:2266
↓ 2 callers
Method
OnSave
(fn func(domain.Server, *domain.Server))
internal/adapters/ui/server_form.go:2261
↓ 2 callers
Method
RecordSSH
(alias string)
internal/core/ports/repositories.go:25
↓ 2 callers
Method
Rename
(file string, path string)
internal/adapters/data/ssh_config_file/file_system.go:29
↓ 2 callers
Method
SetApp
(app *tview.Application)
internal/adapters/ui/server_form.go:2271
↓ 2 callers
Method
SetPinned
(alias string, pinned bool)
internal/core/ports/services.go:28
↓ 2 callers
Method
SetVersionInfo
(version, commit string)
internal/adapters/ui/server_form.go:2276
↓ 2 callers
Function
addQuotedOption
addQuotedOption adds an SSH option with quoted value if needed
internal/adapters/ui/utils.go:217
↓ 2 callers
Method
calculateTabsWidth
(useAbbrev bool)
internal/adapters/ui/server_form.go:214
↓ 2 callers
Function
cellPad
cellPad pads a string with spaces so its display width is at least `width` cells. This keeps emoji-based icons from breaking alignment in tview.
internal/adapters/ui/utils.go:68
↓ 2 callers
Method
copyFile
copyFile copies a file from src to dst
internal/adapters/data/ssh_config_file/backup.go:71
↓ 2 callers
Method
dataToServer
(data ServerFormData)
internal/adapters/ui/server_form.go:2142
↓ 2 callers
Method
findHostByAlias
findHostByAlias finds a host by its alias in the SSH config.
internal/adapters/data/ssh_config_file/crud.go:75
↓ 2 callers
Method
handleCancel
()
internal/adapters/ui/server_form.go:1944
↓ 2 callers
Method
hostContainsPattern
hostContainsPattern checks if a host contains a specific pattern.
internal/adapters/data/ssh_config_file/crud.go:85
↓ 2 callers
Method
insertKVNodeAfterLastKV
insertKVNodeAfterLastKV inserts a KV node immediately after the last existing KV node in the host. This preserves any trailing non-KV nodes (blank lin
internal/adapters/data/ssh_config_file/crud.go:212
↓ 2 callers
Function
makeTag
makeTag returns a rectangular-looking colored chip for the given text.
internal/adapters/ui/header.go:126
↓ 2 callers
Function
newMetadataManager
(filePath string, logger *zap.SugaredLogger)
internal/adapters/data/ssh_config_file/metadata_manager.go:40
↓ 2 callers
Method
serverExists
serverExists checks if a server with the given alias already exists in the config.
internal/adapters/data/ssh_config_file/crud.go:70
↓ 2 callers
Function
stripColorTags
stripColorTags removes tview color tags from a string
internal/adapters/ui/validation.go:709
↓ 2 callers
Method
titleForMode
()
internal/adapters/ui/server_form.go:198
↓ 2 callers
Method
updateServer
(server domain.Server, oldAlias string)
internal/adapters/data/ssh_config_file/metadata_manager.go:87
↓ 2 callers
Function
validateFilePaths
validateFilePaths validates multiple file paths with a custom separator
internal/adapters/ui/validation.go:397
↓ 2 callers
Function
validateHost
validateHost validates a hostname or IP address
internal/adapters/ui/validation.go:451
↓ 2 callers
Function
validatePort
validatePort validates port number
internal/adapters/ui/validation.go:231
↓ 2 callers
Function
validateServer
validateServer performs core validation of server fields.
internal/core/services/server_service.go:77
↓ 1 callers
Method
Chmod
(path string, perms os.FileMode)
internal/adapters/data/ssh_config_file/file_system.go:30
↓ 1 callers
Method
Create
(name string)
internal/adapters/data/ssh_config_file/file_system.go:25
↓ 1 callers
Function
GetAllCategories
GetAllCategories returns all available help categories
internal/adapters/ui/field_help.go:703
↓ 1 callers
Function
GetFieldsByCategory
GetFieldsByCategory returns all fields in a specific category
internal/adapters/ui/field_help.go:684
↓ 1 callers
Function
GetNetworkInterfaces
GetNetworkInterfaces returns a list of available network interface names
internal/adapters/ui/network_interfaces.go:23
↓ 1 callers
Function
New
New constructs a Sugared Logger that writes to a file and provides human-readable timestamps.
internal/logger/logger.go:27
next →
1–100 of 299, ranked by callers