hostlist

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package hostlist implements the host list view.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(_ context.Context, storage storage.HostStorage, appState *state.ApplicationState, log iLogger) *listModel

New - creates new host list model. context - is not used. storage - is the data layer. appState - is the application state, usually we want to restore previous state when application restarts, for instance focus previously selected host. log - application logger.

Types

type ListItemHost

type ListItemHost struct {
	host.Host
}

ListItemHost is an adaptor between host model and bubbletea list model.

func (ListItemHost) Description

func (l ListItemHost) Description() string

Description - self-explanatory.

func (ListItemHost) FilterValue

func (l ListItemHost) FilterValue() string

FilterValue - returns the field combination which are used when user performs a search in the list.

func (ListItemHost) Title

func (l ListItemHost) Title() string

Title - self-explanatory.

type MsgCopyItem

type MsgCopyItem struct{ HostID int }

MsgCopyItem fires when user press copy button.

type MsgRefreshRepo added in v1.0.0

type MsgRefreshRepo struct{}

MsgRefreshRepo - fires when data layer updated, and it's required to reload the host list.

type OpenEditForm added in v1.1.0

type OpenEditForm struct{ HostID int }

OpenEditForm fires when user press edit button.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL