hostlist

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2025 License: MIT Imports: 18 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.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

type ListItemHost struct {
	host.Host
}

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.

func (ListItemHost) Title

func (l ListItemHost) Title() string

Title - self-explanatory.

Jump to

Keyboard shortcuts

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