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.Application, 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.
func NewHostDelegate ¶ added in v1.2.0
func NewHostDelegate(layout *constant.ScreenLayout, group *string, log iLogger) *hostDelegate
NewHostDelegate creates a new Delegate object which can be used for customizing the view of a host.
Types ¶
type ListItemHost ¶
ListItemHost is an adaptor between host model and bubbletea list model.
func (ListItemHost) CompareTo ¶ added in v1.4.0
func (l ListItemHost) CompareTo(host ListItemHost) int
CompareTo - compares this listItemHost with another one.
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) ReadOnly ¶ added in v1.4.0
func (l ListItemHost) ReadOnly() bool
ReadOnly - returns boolean. Overall, it is used to determine if user can edit host details.