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 ¶
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.
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.