dash

package
v0.0.0-...-8164443 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(opts Options)

Types

type LineDrawer

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

func NewLineDrawer

func NewLineDrawer(row int, s tcell.Screen) *LineDrawer

func (*LineDrawer) Draw

func (d *LineDrawer) Draw(s string, style tcell.Style)

type Options

type Options struct {
	DebugMode    bool
	PollInterval time.Duration
	RedisConnOpt asynq.RedisConnOpt
}

type ScreenDrawer

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

ScreenDrawer is used to draw contents on screen.

Usage example:

d := NewScreenDrawer(s)
d.Println("Hello world", mystyle)
d.NL() // adds newline
d.Print("foo", mystyle.Bold(true))
d.Print("bar", mystyle.Italic(true))

func NewScreenDrawer

func NewScreenDrawer(s tcell.Screen) *ScreenDrawer

func (*ScreenDrawer) FillLine

func (d *ScreenDrawer) FillLine(r rune, style tcell.Style)

FillLine prints the given rune until the end of the current line and adds a newline.

func (*ScreenDrawer) FillUntil

func (d *ScreenDrawer) FillUntil(r rune, style tcell.Style, limit int)

func (*ScreenDrawer) GoToBottom

func (d *ScreenDrawer) GoToBottom()

Go to the bottom of the screen.

func (*ScreenDrawer) Goto

func (d *ScreenDrawer) Goto(x, y int)

Goto moves the screendrawer to the specified cell.

func (*ScreenDrawer) NL

func (d *ScreenDrawer) NL()

NL adds a newline (i.e., moves to the next line).

func (*ScreenDrawer) Print

func (d *ScreenDrawer) Print(s string, style tcell.Style)

func (*ScreenDrawer) Println

func (d *ScreenDrawer) Println(s string, style tcell.Style)

func (*ScreenDrawer) Screen

func (d *ScreenDrawer) Screen() tcell.Screen

type State

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

State holds dashboard state.

func (*State) DebugString

func (s *State) DebugString() string

Jump to

Keyboard shortcuts

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