appui

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 31 Imported by: 3

Documentation

Index

Constants

View Source
const (
	//Running is the color used to identify a running element (e.g container, task)
	Running = termui.Attribute(ui.Color108)
	//NotRunning is the color used to identify a non-running element
	NotRunning = termui.Attribute(ui.Color161)
)
View Source
const (
	//DownArrow character
	DownArrow = string('\U00002193')
	//DownArrowLength is the length of the DownArrow string
	DownArrowLength = len(DownArrow)
	//RightArrow character
	RightArrow = string('\U00002192')

	//MainScreenHeaderSize is the number of lines the header of the main screen uses
	MainScreenHeaderSize = 5
	//MainScreenFooterLength is the number of lines the footer of the main screen uses
	MainScreenFooterLength = 1
	//DefaultColumnSpacing defines the minimun space between columns in pixels
	DefaultColumnSpacing = 1
	//IDColumnWidth defines a fixed width for ID columns
	IDColumnWidth = docker.ShortLen
)
View Source
const (
	// RFC3339NanoFixed is our own version of RFC339Nano because we want one
	// that pads the nano seconds part with zeros to ensure
	// the timestamps are aligned in the logs.
	RFC3339NanoFixed = "2006-01-02T15:04:05.000000000Z07:00"
)

Variables

View Source
var Black256 = &ui.ColorTheme{
	Fg:           ui.Color255,
	Bg:           ui.ColorBlack,
	DarkBg:       ui.ColorBlack,
	Prompt:       ui.Color110,
	Key:          ui.Color108,
	Current:      ui.Color254,
	CurrentMatch: ui.Color151,
	Spinner:      ui.Color148,
	Info:         ui.Color144,
	Cursor:       ui.Color161,
	Selected:     ui.Color168,
	Header:       ui.Color25,
	Footer:       ui.Color25}

Black256 black bg theme for 256-color mode

View Source
var ColorThemes = []*ui.ColorTheme{Black256, Dark256}

ColorThemes holds the list of dry color themes

View Source
var Dark256 = &ui.ColorTheme{
	Fg:           ui.Color255,
	Bg:           ui.Color234,
	DarkBg:       ui.ColorBlack,
	Prompt:       ui.Color110,
	Key:          ui.Color108,
	Current:      ui.Color254,
	CurrentMatch: ui.Color151,
	Spinner:      ui.Color148,
	Info:         ui.Color144,
	Cursor:       ui.Color161,
	Selected:     ui.Color168,
	Header:       ui.Color25,
	Footer:       ui.Color25,
	ListItem:     ui.Color181,
	CursorLineBg: ui.Color25}

Dark256 dark theme for 256-color mode

View Source
var Default16 = &ui.ColorTheme{
	Fg:           ui.ColorWhite,
	Bg:           ui.ColorBlack,
	DarkBg:       ui.ColorBlack,
	Prompt:       ui.ColorBlue,
	Key:          ui.ColorGreen,
	Current:      ui.ColorYellow,
	CurrentMatch: ui.ColorGreen,
	Spinner:      ui.ColorGreen,
	Info:         ui.ColorWhite,
	Cursor:       ui.ColorRed,
	Selected:     ui.ColorPurple,
	Header:       ui.ColorLime,
	Footer:       ui.ColorLime}

Default16 default theme for 16-color mode

View Source
var DryTheme = Dark256

DryTheme is the active theme for dry

View Source
var Light256 = &ui.ColorTheme{
	Fg:           ui.Color241,
	Bg:           ui.Color231,
	DarkBg:       ui.Color251,
	Prompt:       ui.Color25,
	Key:          ui.Color66,
	Current:      ui.Color237,
	CurrentMatch: ui.Color23,
	Spinner:      ui.Color65,
	Info:         ui.Color101,
	Cursor:       ui.Color161,
	Selected:     ui.Color168,
	Header:       ui.Color31,
	Footer:       ui.Color31}

Light256 light theme for 256-color mode

Functions

func CalcItemWidth

func CalcItemWidth(width, items int) int

CalcItemWidth calculates the width of each item for the given total width and item count

func Input

func Input(done chan<- struct{})

Input reads input

func Less

func Less(s string, screen *ui.Screen, events <-chan *tcell.EventKey, onDone func())

Less renders the given renderer output in a "less" buffer

func NewContainerInfo

func NewContainerInfo(container *docker.Container) (string, int)

NewContainerInfo returns detailed container information. Returned int value is the number of lines.

func NewDockerEventsRenderer

func NewDockerEventsRenderer(events []events.Message) fmt.Stringer

NewDockerEventsRenderer creates a renderer for docker events

func NewDockerImageHistoryRenderer

func NewDockerImageHistoryRenderer(imageHistory []image.HistoryResponseItem) fmt.Stringer

NewDockerImageHistoryRenderer creates a renderer for the history of an image

func NewDockerInfoRenderer

func NewDockerInfoRenderer(env system.Info) fmt.Stringer

NewDockerInfoRenderer creates renderer for for docker info

func NewDockerTop

func NewDockerTop(processList *container.ContainerTopOKBody, x, y, height, width int) (termui.Bufferer, int)

NewDockerTop creates termui bufferer for docker top

func NewDockerTopRenderer

func NewDockerTopRenderer(processList *container.ContainerTopOKBody) fmt.Stringer

NewDockerTopRenderer creates renderer for docker top result

func NewJSONRenderer

func NewJSONRenderer(data interface{}) fmt.Stringer

NewJSONRenderer creates a renderer that renders the given data as a JSON

func RotateColorTheme

func RotateColorTheme()

RotateColorTheme changes the color theme to the next one in the rotation order.

func Stream

func Stream(stream io.ReadCloser, keyboardQueue <-chan *tcell.EventKey, done func())

Stream shows the content of the given stream on screen

Types

type AppWidget

AppWidget groups common behaviour for appui widgets

type ContainerAPI added in v0.11.2

type ContainerAPI interface {
	ContainerByID(string) *docker.Container
}

type ContainerDetailsWidget

type ContainerDetailsWidget struct {
	drytermui.SizableBufferer
}

ContainerDetailsWidget shows service information

func NewContainerDetailsWidget

func NewContainerDetailsWidget(container *docker.Container, y int) *ContainerDetailsWidget

NewContainerDetailsWidget creates ContainerDetailsWidget with information about the service with the given ID

type ContainerMenuWidget

type ContainerMenuWidget struct {
	OnUnmount func() error

	sync.RWMutex
	// contains filtered or unexported fields
}

ContainerMenuWidget shows the actions menu of a container

func NewContainerMenuWidget

func NewContainerMenuWidget(containerAPI ContainerAPI, s Screen) *ContainerMenuWidget

NewContainerMenuWidget creates a TasksWidget

func (*ContainerMenuWidget) Buffer

Buffer returns the content of this widget as a termui.Buffer

func (*ContainerMenuWidget) Filter

func (s *ContainerMenuWidget) Filter(_ string)

Filter is a noop for this widget

func (*ContainerMenuWidget) ForContainer

func (s *ContainerMenuWidget) ForContainer(cID string)

ForContainer sets the container for which this widget is showing tasks

func (*ContainerMenuWidget) Mount

func (s *ContainerMenuWidget) Mount() error

Mount prepares this widget for rendering

func (*ContainerMenuWidget) Name

func (s *ContainerMenuWidget) Name() string

Name returns this widget name

func (*ContainerMenuWidget) OnEvent

func (s *ContainerMenuWidget) OnEvent(event EventCommand) error

OnEvent runs the given command

func (*ContainerMenuWidget) RowCount

func (s *ContainerMenuWidget) RowCount() int

RowCount returns the number of rows of this widget.

func (*ContainerMenuWidget) Sort

func (s *ContainerMenuWidget) Sort()

Sort is a noop for this widget

func (*ContainerMenuWidget) Unmount

func (s *ContainerMenuWidget) Unmount() error

Unmount this widget

type ContainerRow

type ContainerRow struct {
	Indicator *drytermui.ParColumn
	ID        *drytermui.ParColumn
	Image     *drytermui.ParColumn
	Command   *drytermui.ParColumn
	Status    *drytermui.ParColumn
	Ports     *drytermui.ParColumn
	Names     *drytermui.ParColumn

	drytermui.Row
	// contains filtered or unexported fields
}

ContainerRow is a Grid row showing runtime information about a container

func NewContainerRow

func NewContainerRow(container *docker.Container, table drytermui.Table) *ContainerRow

NewContainerRow creates a new ContainerRow widget

func (*ContainerRow) Buffer

func (row *ContainerRow) Buffer() termui.Buffer

Buffer returns this Row data as a termui.Buffer

func (*ContainerRow) ColumnsForFilter

func (row *ContainerRow) ColumnsForFilter() []*drytermui.ParColumn

ColumnsForFilter returns the columns that are used to filter

func (*ContainerRow) Highlighted

func (row *ContainerRow) Highlighted()

Highlighted marks this rows as being highlighted

func (*ContainerRow) NotHighlighted

func (row *ContainerRow) NotHighlighted()

NotHighlighted marks this rows as being not highlighted

type ContainerStatsRow

type ContainerStatsRow struct {
	Status    *drytermui.ParColumn
	Name      *drytermui.ParColumn
	ID        *drytermui.ParColumn
	CPU       *drytermui.GaugeColumn
	Memory    *drytermui.GaugeColumn
	Net       *drytermui.ParColumn
	Block     *drytermui.ParColumn
	Pids      *drytermui.ParColumn
	Uptime    *drytermui.ParColumn
	PidsVal   uint64
	UptimeVal time.Time

	drytermui.Row
	sync.RWMutex
	// contains filtered or unexported fields
}

ContainerStatsRow is a Grid row showing runtime information about a container

func NewContainerStatsRow

func NewContainerStatsRow(container *docker.Container, table drytermui.Table) *ContainerStatsRow

NewContainerStatsRow creats a new ContainerStatsRow widget

func (*ContainerStatsRow) Buffer

func (row *ContainerStatsRow) Buffer() termui.Buffer

Buffer returns this Row data as a termui.Buffer

func (*ContainerStatsRow) Highlighted

func (row *ContainerStatsRow) Highlighted()

Highlighted marks this rows as being highlighted

func (*ContainerStatsRow) NotHighlighted

func (row *ContainerStatsRow) NotHighlighted()

NotHighlighted marks this rows as being not highlighted

func (*ContainerStatsRow) Reset

func (row *ContainerStatsRow) Reset()

Reset resets row content

func (*ContainerStatsRow) Update

func (row *ContainerStatsRow) Update(stat *docker.Stats)

Update updates the content of this row with the given stats

type ContainersWidget

type ContainersWidget struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

ContainersWidget shows information containers

func NewContainersWidget

func NewContainersWidget(dockerDaemon docker.ContainerAPI, s Screen) *ContainersWidget

NewContainersWidget creates a ContainersWidget

func (*ContainersWidget) Buffer

func (s *ContainersWidget) Buffer() gizaktermui.Buffer

Buffer returns the content of this widget as a termui.Buffer

func (*ContainersWidget) Filter

func (s *ContainersWidget) Filter(filter string)

Filter applies the given filter to the container list

func (*ContainersWidget) Mount

func (s *ContainersWidget) Mount() error

Mount tells this widget to be ready for rendering

func (*ContainersWidget) Name

func (s *ContainersWidget) Name() string

Name returns this widget name

func (*ContainersWidget) OnEvent

func (s *ContainersWidget) OnEvent(event EventCommand) error

OnEvent runs the given command

func (*ContainersWidget) RowCount

func (s *ContainersWidget) RowCount() int

RowCount returns the number of rows of this widget.

func (*ContainersWidget) Sort

func (s *ContainersWidget) Sort()

Sort rotates to the next sort mode. SortByContainerID -> SortByImage -> SortByStatus -> SortByName -> SortByContainerID

func (*ContainersWidget) ToggleShowAllContainers

func (s *ContainersWidget) ToggleShowAllContainers()

ToggleShowAllContainers toggles the show-all-containers state

func (*ContainersWidget) Unmount

func (s *ContainersWidget) Unmount() error

Unmount this widget

type DockerDiskUsageRenderer

type DockerDiskUsageRenderer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

DockerDiskUsageRenderer renderer for Docker disk usage

func NewDockerDiskUsageRenderer

func NewDockerDiskUsageRenderer(screenHeight int) *DockerDiskUsageRenderer

NewDockerDiskUsageRenderer creates a DockerDiskUsageRenderer

func (*DockerDiskUsageRenderer) PrepareToRender

func (r *DockerDiskUsageRenderer) PrepareToRender(diskUsage *types.DiskUsage, report *docker.PruneReport)

PrepareToRender passes the data to be rendered

func (*DockerDiskUsageRenderer) String

func (r *DockerDiskUsageRenderer) String() string

Render returns the result of docker system df

type DockerImageHistoryRenderer

type DockerImageHistoryRenderer struct {
	// contains filtered or unexported fields
}

DockerImageHistoryRenderer knows how render history image

func (*DockerImageHistoryRenderer) String

func (r *DockerImageHistoryRenderer) String() string

Render docker ps

type DockerImagesWidget

type DockerImagesWidget struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

DockerImagesWidget knows how render a container list

func NewDockerImagesWidget

func NewDockerImagesWidget(images func() ([]image.Summary, error), s Screen) *DockerImagesWidget

NewDockerImagesWidget creates a widget to show Docker images.

func (*DockerImagesWidget) Buffer

Buffer returns the content of this widget as a termui.Buffer

func (*DockerImagesWidget) Filter

func (s *DockerImagesWidget) Filter(filter string)

Filter filters the image list by the given filter

func (*DockerImagesWidget) Mount

func (s *DockerImagesWidget) Mount() error

Mount tells this widget to be ready for rendering

func (*DockerImagesWidget) Name

func (s *DockerImagesWidget) Name() string

Name returns this widget name

func (*DockerImagesWidget) OnEvent

func (s *DockerImagesWidget) OnEvent(event EventCommand) error

OnEvent runs the given command

func (*DockerImagesWidget) RowCount

func (s *DockerImagesWidget) RowCount() int

RowCount returns the number of rows of this widget.

func (*DockerImagesWidget) Sort

func (s *DockerImagesWidget) Sort()

Sort rotates to the next sort mode. SortImagesByRepo -> SortImagesByID -> SortImagesByCreationDate -> SortImagesBySize -> SortImagesByRepo

func (*DockerImagesWidget) Unmount

func (s *DockerImagesWidget) Unmount() error

Unmount tells this widget that it will not be rendering anymore

type DockerInfo

type DockerInfo struct {
	drytermui.SizableBufferer
}

DockerInfo is a widget to show Docker info

func NewDockerInfo

func NewDockerInfo(daemon docker.ContainerDaemon) *DockerInfo

NewDockerInfo creates a DockerInfo widget

type DockerMonitor

type DockerMonitor interface {
	Containers(filters []docker.ContainerFilter, mode docker.SortMode) []*docker.Container
	StatsChannel(container *docker.Container) (*docker.StatsChannel, error)
}

DockerMonitor interface.

type DockerNetworksWidget

type DockerNetworksWidget struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

DockerNetworksWidget knows how render a container list

func NewDockerNetworksWidget

func NewDockerNetworksWidget(dockerDaemon docker.NetworkAPI, s Screen) *DockerNetworksWidget

NewDockerNetworksWidget creates a renderer for a network list

func (*DockerNetworksWidget) Buffer

Buffer returns the content of this widget as a termui.Buffer

func (*DockerNetworksWidget) Filter

func (s *DockerNetworksWidget) Filter(filter string)

Filter filters the network list by the given filter

func (*DockerNetworksWidget) Mount

func (s *DockerNetworksWidget) Mount() error

Mount tells this widget to be ready for rendering

func (*DockerNetworksWidget) Name

func (s *DockerNetworksWidget) Name() string

Name returns this widget name

func (*DockerNetworksWidget) OnEvent

func (s *DockerNetworksWidget) OnEvent(event EventCommand) error

OnEvent runs the given command

func (*DockerNetworksWidget) RowCount

func (s *DockerNetworksWidget) RowCount() int

RowCount returns the number of rows of this widget.

func (*DockerNetworksWidget) Sort

func (s *DockerNetworksWidget) Sort()

Sort rotates to the next sort mode. SortNetworksByID -> SortNetworksByName -> SortNetworksByDriver

func (*DockerNetworksWidget) Unmount

func (s *DockerNetworksWidget) Unmount() error

Unmount tells this widget that it will not be rendering anymore

type EventCommand

type EventCommand func(string) error

EventCommand type alias for a func to be run by an EventableWidget

type EventableWidget

type EventableWidget interface {
	OnEvent(EventCommand) error
}

EventableWidget interface defines how widgets receive events

type FilterableRow

type FilterableRow interface {
	ColumnsForFilter() []*termui.ParColumn
}

FilterableRow is the interface for filterable columns

type FilterableWidget

type FilterableWidget interface {
	Filter(filter string)
}

FilterableWidget interface defines how widgets filter

type ImageRow

type ImageRow struct {
	Repository        *drytermui.ParColumn
	Tag               *drytermui.ParColumn
	ID                *drytermui.ParColumn
	CreatedSinceValue int64
	CreatedSince      *drytermui.ParColumn
	SizeValue         int64
	Size              *drytermui.ParColumn

	Row
	// contains filtered or unexported fields
}

ImageRow is a Grid row showing information about a Docker image

func NewImageRow

func NewImageRow(image types.ImageSummary, table drytermui.Table) *ImageRow

NewImageRow creates a new ImageRow widget

func (*ImageRow) ColumnsForFilter

func (row *ImageRow) ColumnsForFilter() []*drytermui.ParColumn

ColumnsForFilter returns the columns that are used to filter

type ImageRunWidget

type ImageRunWidget struct {
	termui.TextInput
	// contains filtered or unexported fields
}

ImageRunWidget is an input widget to run images

func NewImageRunWidget

func NewImageRunWidget(image types.ImageSummary) *ImageRunWidget

NewImageRunWidget creates a new ImageRunWidget for the given image

func (*ImageRunWidget) Mount

func (w *ImageRunWidget) Mount() error

Mount callback

func (*ImageRunWidget) Name

func (w *ImageRunWidget) Name() string

Name returns the widget name

func (*ImageRunWidget) Unmount

func (w *ImageRunWidget) Unmount() error

Unmount callback

type Monitor

type Monitor struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Monitor is a self-refreshing ui component that shows monitoring information about docker containers.

func NewMonitor

func NewMonitor(daemon DockerMonitor, s ScreenBuffererRender) *Monitor

NewMonitor creates a new Monitor component that will render itself on the given screen at the given position and with the given width.

func (*Monitor) Buffer

func (m *Monitor) Buffer() gizaktermui.Buffer

Buffer returns the content of this monitor as a termui.Buffer

func (*Monitor) Filter

func (m *Monitor) Filter(_ string)

Filter filters the container list by the given filter

func (*Monitor) Mount

func (m *Monitor) Mount() error

Mount prepares this widget for rendering

func (*Monitor) Name

func (m *Monitor) Name() string

Name returns the name of this widget

func (*Monitor) OnEvent

func (m *Monitor) OnEvent(event EventCommand) error

OnEvent refreshes the monitor widget and runs the given command on the highlighted row. It can be used to refresh the widget.

func (*Monitor) RefreshRate

func (m *Monitor) RefreshRate(millis int)

RefreshRate sets the refresh rate of this monitor to the given amount in milliseconds.

func (*Monitor) RowCount

func (m *Monitor) RowCount() int

RowCount returns the number of rows of this Monitor.

func (*Monitor) Sort

func (m *Monitor) Sort()

Sort sorts the container list

func (*Monitor) Unmount

func (m *Monitor) Unmount() error

Unmount tells this widget that it will not be rendering anymore

type MonitorTableHeader

type MonitorTableHeader struct {
	*termui.TableHeader
}

MonitorTableHeader is the header for container monitor tables

func NewMonitorTableHeader

func NewMonitorTableHeader() *MonitorTableHeader

NewMonitorTableHeader creates a table header for the monitor screen

type NetworkRow

type NetworkRow struct {
	ID         *drytermui.ParColumn
	Name       *drytermui.ParColumn
	Driver     *drytermui.ParColumn
	Containers *drytermui.ParColumn
	Services   *drytermui.ParColumn
	Scope      *drytermui.ParColumn
	Subnet     *drytermui.ParColumn
	Gateway    *drytermui.ParColumn
	Row
	// contains filtered or unexported fields
}

NetworkRow is a Grid row showing information about a Docker image

func NewNetworkRow

func NewNetworkRow(network types.NetworkResource, table drytermui.Table) *NetworkRow

NewNetworkRow creates a new NetworkRow widget

func (*NetworkRow) ColumnsForFilter

func (row *NetworkRow) ColumnsForFilter() []*drytermui.ParColumn

ColumnsForFilter returns the columns that are used to filter

type Prompt

type Prompt struct {
	termui.TextInput
}

Prompt is a prompt widget

func NewPrompt

func NewPrompt(title string) *Prompt

NewPrompt creates a new Prompt with the given title

func (*Prompt) Mount

func (w *Prompt) Mount() error

Mount callback

func (*Prompt) Name

func (w *Prompt) Name() string

Name returns the widget name

func (*Prompt) Unmount

func (w *Prompt) Unmount() error

Unmount callback

type Row

type Row struct {
	ParColumns []*drytermui.ParColumn
	drytermui.Row
}

Row is a base row implementation

func (*Row) Buffer

func (row *Row) Buffer() termui.Buffer

Buffer returns this Row data as a termui.Buffer

func (*Row) Highlighted

func (row *Row) Highlighted()

Highlighted marks this rows as being highlighted

func (*Row) NotHighlighted

func (row *Row) NotHighlighted()

NotHighlighted marks this rows as being not highlighted

type RowFilter

type RowFilter func(FilterableRow) bool

RowFilter function for filtering rows

var RowFilters RowFilter

RowFilters holds the existing RowFilter

func (RowFilter) ByPattern

func (rf RowFilter) ByPattern(pattern string) RowFilter

ByPattern filters row by the given pattern

type Screen

type Screen interface {
	Bounds() image.Rectangle
	Cursor() *ui.Cursor
}

Screen is a representation of a terminal screen, limited by its bounds and having an active cursor.

type ScreenBuffererRender

type ScreenBuffererRender interface {
	Screen
	Flush() *ui.Screen
	RenderBufferer(bs ...termui.Bufferer)
}

ScreenBuffererRender is a rendering device for termui Bufferers.

type SortMode

type SortMode int

SortMode sort mode for widgets

type SortableColumnHeader

type SortableColumnHeader struct {
	Title string // Title to display in the tableHeader.
	Mode  SortMode
}

SortableColumnHeader is a column header associated to a sort mode

type SortableWidget

type SortableWidget interface {
	Sort()
}

SortableWidget interface defines how widgets sort

type VolumeRow

type VolumeRow struct {
	Driver *drytermui.ParColumn
	Name   *drytermui.ParColumn
	Row
	// contains filtered or unexported fields
}

VolumeRow is a Grid row showing information about a Docker volume.

func NewVolumeRow

func NewVolumeRow(volume *volume.Volume, table drytermui.Table) *VolumeRow

NewVolumeRow creates VolumeRow widgets.

func (*VolumeRow) ColumnsForFilter

func (row *VolumeRow) ColumnsForFilter() []*drytermui.ParColumn

ColumnsForFilter returns the columns that are used to filter

type VolumesWidget

type VolumesWidget struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

VolumesWidget shows information containers

func NewVolumesWidget

func NewVolumesWidget(service volumesService, s Screen) *VolumesWidget

NewVolumesWidget creates a VolumesWidget

func (*VolumesWidget) Buffer

func (s *VolumesWidget) Buffer() gizaktermui.Buffer

Buffer returns the content of this widget as a termui.Buffer

func (*VolumesWidget) Filter

func (s *VolumesWidget) Filter(filter string)

Filter applies the given filter to the container list

func (*VolumesWidget) Mount

func (s *VolumesWidget) Mount() error

Mount tells this widget to be ready for rendering

func (*VolumesWidget) Name

func (s *VolumesWidget) Name() string

Name returns this widget name

func (*VolumesWidget) OnEvent

func (s *VolumesWidget) OnEvent(event EventCommand) error

OnEvent runs the given command

func (*VolumesWidget) RowCount

func (s *VolumesWidget) RowCount() int

RowCount returns the number of rows of this widget.

func (*VolumesWidget) Sort

func (s *VolumesWidget) Sort()

Sort rotates to the next sort mode.

func (*VolumesWidget) Unmount

func (s *VolumesWidget) Unmount() error

Unmount this widget

type WidgetHeader

type WidgetHeader struct {
	Y int
	// contains filtered or unexported fields
}

WidgetHeader is a widget for the header of a widget

func NewWidgetHeader

func NewWidgetHeader() *WidgetHeader

NewWidgetHeader creates WidgetHeader

func (*WidgetHeader) Buffer

func (header *WidgetHeader) Buffer() gizaktermui.Buffer

Buffer return this widget content as a termui.Buffer

func (*WidgetHeader) GetHeight

func (header *WidgetHeader) GetHeight() int

GetHeight returns the widget height

func (*WidgetHeader) HeaderEntry

func (header *WidgetHeader) HeaderEntry(key, value string)

HeaderEntry adds a new key-value entry to this header

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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