ui

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentIDInfo     = "info"
	ComponentIDRequests = "requests"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Banner struct {
	*widgets.Paragraph
	// contains filtered or unexported fields
}

func NewBanner

func NewBanner(listenAddress string) *Banner

func (*Banner) Close

func (b *Banner) Close()

func (*Banner) GetID

func (b *Banner) GetID() string

func (*Banner) GetUpdateChannel

func (b *Banner) GetUpdateChannel() chan interface{}

func (*Banner) OnResize

func (b *Banner) OnResize(width int)

func (*Banner) Render

func (b *Banner) Render()

func (*Banner) UpdateOn

func (b *Banner) UpdateOn(c chan interface{})

type BannerText

type BannerText struct {
	Endpoint string
	Port     string
}

type Component

type Component interface {
	GetUpdateChannel() chan interface{}
	GetID() string
	Close()
	OnResize(int)
	Render()
	UpdateOn(chan interface{})
	// contains filtered or unexported methods
}

type Table

type Table struct {
	*widgets.Table
	// contains filtered or unexported fields
}

func NewTable

func NewTable(t *widgets.Table) *Table

func (*Table) Close

func (t *Table) Close()

func (*Table) GetID

func (t *Table) GetID() string

func (*Table) GetUpdateChannel

func (t *Table) GetUpdateChannel() chan interface{}

func (*Table) OnResize

func (t *Table) OnResize(width int)

func (*Table) Render

func (t *Table) Render()

func (*Table) UpdateOn

func (t *Table) UpdateOn(updates chan interface{})

type Window

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

func ConstructUI

func ConstructUI(listenAddress string) (*Window, error)

func (*Window) Close added in v0.0.4

func (w *Window) Close()

func (*Window) GetComponent

func (w *Window) GetComponent(id string) Component

func (*Window) Run

func (w *Window) Run() error

Jump to

Keyboard shortcuts

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