MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / keyBindingsToMap

Function keyBindingsToMap

internal/config/config.go:270–291  ·  view source on GitHub ↗

keyBindingsToMap converts a KeyBindings struct to a map for validation.

(kb KeyBindings)

Source from the content-addressed store, hash-verified

268
269// keyBindingsToMap converts a KeyBindings struct to a map for validation.
270func keyBindingsToMap(kb KeyBindings) map[string]string {
271 return map[string]string{
272 "switch_view": kb.SwitchView,
273 "switch_view_reverse": kb.SwitchViewReverse,
274 "nodes_page": kb.NodesPage,
275 "guests_page": kb.GuestsPage,
276 "tasks_page": kb.TasksPage,
277 "storage_page": kb.StoragePage,
278 "tasks_toggle_queue": kb.TasksToggleQueue,
279 "task_stop_cancel": kb.TaskStopCancel,
280 "menu": kb.Menu,
281 "global_menu": kb.GlobalMenu,
282 "shell": kb.Shell,
283 "vnc": kb.VNC,
284 "refresh": kb.Refresh,
285 "auto_refresh": kb.AutoRefresh,
286 "search": kb.Search,
287 "advanced_guest_filter": kb.AdvancedGuestFilter,
288 "help": kb.Help,
289 "quit": kb.Quit,
290 }
291}
292
293// ValidateKeyBindings checks if all key specifications are valid.
294func ValidateKeyBindings(kb KeyBindings) error {

Callers 1

ValidateKeyBindingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected