dashboardbuilder

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func NewBuilder

func NewBuilder(tableType enums.TableType, host host.Host, cliGateway *cligw.Gateway) (*Builder, error)

NewBuilder creates a new Builder instance with the provided CLI gateway. It initializes the termbox terminal and dashboard, and sets up a context and quitter function. If an error occurs during initialization, it returns an error.

func (*Builder) Init

func (db *Builder) Init() (err error)

Init initializes the dashboard by fetching the cells, columns, and rows configurations from the `dashboards` package and using them to build a new `grid` with the `grid.New()` method. It then uses the built grid to create a new dashboard using the `container.New()` method. The dashboard instance is stored in the `db.dashboard` field for later use.

func (*Builder) Render

func (db *Builder) Render() (err error)

Render displays the dashboard on the terminal and updates the cells with new data periodically.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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