MCPcopy Index your code

hub / github.com/Adembc/lazyssh / functions

Functions299 in github.com/Adembc/lazyssh

↓ 51 callersMethodaddKVNodeIfNotEmpty
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 callersFunctionGetFieldPlaceholder
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 callersMethodaddDropDownWithHelp
addDropDownWithHelp adds a dropdown field with help support
internal/adapters/ui/server_form.go:950
↓ 30 callersMethodfindOptionIndex
findOptionIndex finds the index of a value in options slice
internal/adapters/ui/server_form.go:647
↓ 29 callersFunctioncreateOptionsWithDefault
createOptionsWithDefault creates dropdown options with default value indicated
internal/adapters/ui/server_form.go:616
↓ 21 callersMethodvalidateField
validateField validates a single field and updates the validation state
internal/adapters/ui/server_form.go:908
↓ 19 callersMethodaddValidatedInputField
addValidatedInputField adds an input field with real-time validation
internal/adapters/ui/server_form.go:985
↓ 18 callersMethodaddInputFieldWithHelp
addInputFieldWithHelp adds a regular input field with help support
internal/adapters/ui/server_form.go:965
↓ 15 callersMethodRun
()
internal/adapters/ui/tui.go:26
↓ 12 callersMethodSetError
SetError sets or clears an error for a field
internal/adapters/ui/validation.go:50
↓ 11 callersMethodString
()
internal/adapters/ui/sort.go:34
↓ 11 callersMethodshowStatusTemp
showStatusTemp displays a temporary message in the status bar (default green) and then restores the default text.
internal/adapters/ui/handlers.go:554
↓ 11 callersMethodshowStatusTempColor
showStatusTempColor displays a temporary colored message in the status bar and restores default text after 2s.
internal/adapters/ui/handlers.go:562
↓ 10 callersMethodError
()
internal/adapters/ui/validation_test.go:266
↓ 10 callersMethodGetSelectedServer
()
internal/adapters/ui/server_list.go:79
↓ 10 callersMethodrefreshServerList
============================================================================= Internal Operations (perform actual work) ==============================
internal/adapters/ui/handlers.go:539
↓ 9 callersMethodStat
(name string)
internal/adapters/data/ssh_config_file/file_system.go:26
↓ 9 callersFunctionquoteIfNeeded
quoteIfNeeded returns the value quoted if it contains spaces.
internal/adapters/ui/utils.go:476
↓ 9 callersMethodreturnToMain
()
internal/adapters/ui/handlers.go:549
↓ 8 callersMethodOpen
(name string)
internal/adapters/data/ssh_config_file/file_system.go:24
↓ 8 callersFunctionaddOption
addOption adds an SSH option in the format "-o Key=Value" if value is not empty
internal/adapters/ui/utils.go:210
↓ 7 callersMethodIsNotExist
(err error)
internal/adapters/data/ssh_config_file/file_system.go:27
↓ 7 callersMethodhandleSave
handleSave validates and saves the form, returns true if successful
internal/adapters/ui/server_form.go:1877
↓ 6 callersMethodGetErrorCount
GetErrorCount returns the number of validation errors
internal/adapters/ui/validation.go:75
↓ 6 callersMethodcreateAlgorithmAutocomplete
createAlgorithmAutocomplete creates an autocomplete function for algorithm input fields
internal/adapters/ui/server_form.go:857
↓ 6 callersFunctionescapeForTview
escapeForTview escapes special characters for tview display
internal/adapters/ui/server_form.go:467
↓ 6 callersFunctionremoveNodesByKey
removeNodesByKey removes all nodes with the specified key from the nodes slice
internal/adapters/data/ssh_config_file/crud.go:248
↓ 5 callersMethodListServers
(query string)
internal/core/ports/services.go:24
↓ 5 callersMethodOpenFile
(path string, i int, perms os.FileMode)
internal/adapters/data/ssh_config_file/file_system.go:31
↓ 5 callersMethodUpdateServer
(server domain.Server, newServer domain.Server)
internal/core/ports/services.go:25
↓ 5 callersMethodconvertCLIForwardToConfigFormat
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 callersMethodgetDefaultValues
getDefaultValues returns default form values based on mode
internal/adapters/ui/server_form.go:1066
↓ 5 callersMethodloadAll
()
internal/adapters/data/ssh_config_file/metadata_manager.go:44
↓ 5 callersMethodsetupFormShortcuts
setupFormShortcuts sets up keyboard shortcuts for a form
internal/adapters/ui/server_form.go:575
↓ 5 callersMethodswitchToTab
(tabName string)
internal/adapters/ui/server_form.go:388
↓ 5 callersMethodupdateHelp
updateHelp updates the help panel with information for the given field
internal/adapters/ui/server_form.go:435
↓ 4 callersMethodClear
Clear removes all validation errors
internal/adapters/ui/validation.go:120
↓ 4 callersFunctionNewValidationState
NewValidationState creates a new validation state
internal/adapters/ui/validation.go:43
↓ 4 callersMethodReadDir
(dir string)
internal/adapters/data/ssh_config_file/file_system.go:32
↓ 4 callersMethodUpdateServers
(servers []domain.Server)
internal/adapters/ui/server_list.go:57
↓ 4 callersMethodgetFormData
stripColorTags removes tview color tags from a string e.g., "[red]Port:[-]" becomes "Port:"
internal/adapters/ui/server_form.go:1738
↓ 4 callersMethodhandleModalClose
()
internal/adapters/ui/handlers.go:275
↓ 4 callersMethodloadConfig
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 callersMethodnextTab
()
internal/adapters/ui/server_form.go:406
↓ 4 callersMethodprevTab
()
internal/adapters/ui/server_form.go:420
↓ 4 callersMethodsaveAll
(metadata map[string]ServerMetadata)
internal/adapters/data/ssh_config_file/metadata_manager.go:67
↓ 4 callersFunctionsortServersForUI
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 callersFunctionvalidateBindAddress
validateBindAddress validates a bind address (IP, hostname, or *)
internal/adapters/ui/validation.go:618
↓ 3 callersFunctionBuildSSHCommand
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 callersMethodDeleteServer
(server domain.Server)
internal/core/ports/services.go:27
↓ 3 callersFunctionGetAvailableKnownHostsFiles
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 callersFunctionGetAvailableSSHKeys
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 callersFunctionGetFieldHelp
GetFieldHelp returns help information for a specific field
internal/adapters/ui/field_help.go:39
↓ 3 callersMethodHasErrors
HasErrors checks if there are any validation errors
internal/adapters/ui/validation.go:68
↓ 3 callersFunctionNewAppHeader
(version, gitCommit, repoURL string)
internal/adapters/ui/header.go:32
↓ 3 callersMethodRemove
(file string)
internal/adapters/data/ssh_config_file/file_system.go:28
↓ 3 callersMethodconvertConfigForwardToCLIFormat
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 callersFunctionmatchesSequence
matchesSequence checks if all characters in pattern appear in sequence within text
internal/adapters/ui/server_form.go:679
↓ 3 callersMethodrenderTab
(tab string, isCurrent bool, useAbbrev bool, index int)
internal/adapters/ui/server_form.go:247
↓ 3 callersMethodsaveConfig
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 callersMethodupdateListTitle
()
internal/adapters/ui/tui.go:141
↓ 3 callersMethodupdateTabBar
()
internal/adapters/ui/server_form.go:335
↓ 2 callersMethodAddServer
(server domain.Server)
internal/core/ports/services.go:26
↓ 2 callersFunctionDefaultStatusText
()
internal/adapters/ui/status_bar.go:22
↓ 2 callersMethodGetAllErrors
GetAllErrors returns all validation errors in field order
internal/adapters/ui/validation.go:82
↓ 2 callersFunctionGetFieldValidators
GetFieldValidators returns validation rules for SSH configuration fields
internal/adapters/ui/validation.go:133
↓ 2 callersFunctionGetSSHFieldDefault
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 callersFunctionNewServerForm
(mode ServerFormMode, original *domain.Server)
internal/adapters/ui/server_form.go:70
↓ 2 callersMethodOnCancel
(fn func())
internal/adapters/ui/server_form.go:2266
↓ 2 callersMethodOnSave
(fn func(domain.Server, *domain.Server))
internal/adapters/ui/server_form.go:2261
↓ 2 callersMethodRecordSSH
(alias string)
internal/core/ports/repositories.go:25
↓ 2 callersMethodRename
(file string, path string)
internal/adapters/data/ssh_config_file/file_system.go:29
↓ 2 callersMethodSetApp
(app *tview.Application)
internal/adapters/ui/server_form.go:2271
↓ 2 callersMethodSetPinned
(alias string, pinned bool)
internal/core/ports/services.go:28
↓ 2 callersMethodSetVersionInfo
(version, commit string)
internal/adapters/ui/server_form.go:2276
↓ 2 callersFunctionaddQuotedOption
addQuotedOption adds an SSH option with quoted value if needed
internal/adapters/ui/utils.go:217
↓ 2 callersMethodcalculateTabsWidth
(useAbbrev bool)
internal/adapters/ui/server_form.go:214
↓ 2 callersFunctioncellPad
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 callersMethodcopyFile
copyFile copies a file from src to dst
internal/adapters/data/ssh_config_file/backup.go:71
↓ 2 callersMethoddataToServer
(data ServerFormData)
internal/adapters/ui/server_form.go:2142
↓ 2 callersMethodfindHostByAlias
findHostByAlias finds a host by its alias in the SSH config.
internal/adapters/data/ssh_config_file/crud.go:75
↓ 2 callersMethodhandleCancel
()
internal/adapters/ui/server_form.go:1944
↓ 2 callersMethodhostContainsPattern
hostContainsPattern checks if a host contains a specific pattern.
internal/adapters/data/ssh_config_file/crud.go:85
↓ 2 callersMethodinsertKVNodeAfterLastKV
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 callersFunctionmakeTag
makeTag returns a rectangular-looking colored chip for the given text.
internal/adapters/ui/header.go:126
↓ 2 callersFunctionnewMetadataManager
(filePath string, logger *zap.SugaredLogger)
internal/adapters/data/ssh_config_file/metadata_manager.go:40
↓ 2 callersMethodserverExists
serverExists checks if a server with the given alias already exists in the config.
internal/adapters/data/ssh_config_file/crud.go:70
↓ 2 callersFunctionstripColorTags
stripColorTags removes tview color tags from a string
internal/adapters/ui/validation.go:709
↓ 2 callersMethodtitleForMode
()
internal/adapters/ui/server_form.go:198
↓ 2 callersMethodupdateServer
(server domain.Server, oldAlias string)
internal/adapters/data/ssh_config_file/metadata_manager.go:87
↓ 2 callersFunctionvalidateFilePaths
validateFilePaths validates multiple file paths with a custom separator
internal/adapters/ui/validation.go:397
↓ 2 callersFunctionvalidateHost
validateHost validates a hostname or IP address
internal/adapters/ui/validation.go:451
↓ 2 callersFunctionvalidatePort
validatePort validates port number
internal/adapters/ui/validation.go:231
↓ 2 callersFunctionvalidateServer
validateServer performs core validation of server fields.
internal/core/services/server_service.go:77
↓ 1 callersMethodChmod
(path string, perms os.FileMode)
internal/adapters/data/ssh_config_file/file_system.go:30
↓ 1 callersMethodCreate
(name string)
internal/adapters/data/ssh_config_file/file_system.go:25
↓ 1 callersFunctionGetAllCategories
GetAllCategories returns all available help categories
internal/adapters/ui/field_help.go:703
↓ 1 callersFunctionGetFieldsByCategory
GetFieldsByCategory returns all fields in a specific category
internal/adapters/ui/field_help.go:684
↓ 1 callersFunctionGetNetworkInterfaces
GetNetworkInterfaces returns a list of available network interface names
internal/adapters/ui/network_interfaces.go:23
↓ 1 callersFunctionNew
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