loggo

package
v0.3.17 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const LineHThick = '\u2501'
View Source
const LineHThin = '\u2500'

Variables

View Source
var BuildVersion string
View Source
var LatestLog string

Functions

func NewApp

func NewApp(configFile string) *appScaffold

func NewAppWithConfig

func NewAppWithConfig(cfg *config.Config) *appScaffold

func NewHorizontalSeparator added in v0.2.14

func NewHorizontalSeparator(lineStyle tcell.Style, lineRune rune, text string, textColor tcell.Color) *tview.Box

Types

type App

type App interface {
	Stop()
	Run(p tview.Primitive)
}

type ColorPickerButton

type ColorPickerButton struct {
	tview.Flex
	// contains filtered or unexported fields
}

func NewColorPickerButton

func NewColorPickerButton(app Loggo, label, value string, fieldWidth int, changedFunc func(string)) *ColorPickerButton

func (*ColorPickerButton) Blur

func (c *ColorPickerButton) Blur()

func (*ColorPickerButton) Focus

func (c *ColorPickerButton) Focus(delegate func(p tview.Primitive))

func (*ColorPickerButton) GetFieldHeight added in v0.3.17

func (c *ColorPickerButton) GetFieldHeight() int

func (*ColorPickerButton) GetFieldWidth

func (c *ColorPickerButton) GetFieldWidth() int

func (*ColorPickerButton) GetLabel

func (c *ColorPickerButton) GetLabel() string

func (*ColorPickerButton) HasFocus

func (c *ColorPickerButton) HasFocus() bool

func (*ColorPickerButton) SetBlurFunc

func (c *ColorPickerButton) SetBlurFunc(callback func()) *tview.Box

func (*ColorPickerButton) SetDisabled added in v0.3.17

func (c *ColorPickerButton) SetDisabled(disabled bool) tview.FormItem

func (*ColorPickerButton) SetFieldWidth

func (c *ColorPickerButton) SetFieldWidth(width int) *ColorPickerButton

func (*ColorPickerButton) SetFinishedFunc

func (c *ColorPickerButton) SetFinishedFunc(handler func(key tcell.Key)) tview.FormItem

func (*ColorPickerButton) SetFocusFunc

func (c *ColorPickerButton) SetFocusFunc(callback func()) *tview.Box

func (*ColorPickerButton) SetFormAttributes

func (c *ColorPickerButton) SetFormAttributes(
	labelWidth int, labelColor, bgColor, fieldTextColor, fieldBgColor tcell.Color) tview.FormItem

func (*ColorPickerButton) SetLabel

func (c *ColorPickerButton) SetLabel(label string) *ColorPickerButton

func (*ColorPickerButton) SetText

func (c *ColorPickerButton) SetText(text string) *ColorPickerButton

type ColorPickerData

type ColorPickerData struct {
	tview.TableContentReadOnly
	// contains filtered or unexported fields
}

func (*ColorPickerData) GetCell

func (d *ColorPickerData) GetCell(row, column int) *tview.TableCell

func (*ColorPickerData) GetColumnCount

func (d *ColorPickerData) GetColumnCount() int

func (*ColorPickerData) GetRowCount

func (d *ColorPickerData) GetRowCount() int

type ColorPickerView

type ColorPickerView struct {
	tview.Flex
	// contains filtered or unexported fields
}

func NewColorPickerView

func NewColorPickerView(app Loggo, title string, onSelect func(string),
	toggleFullScreenCallback, closeCallback func()) *ColorPickerView

func (*ColorPickerView) SelectColor

func (t *ColorPickerView) SelectColor(color string)

type FilterView added in v0.2.10

type FilterView struct {
	tview.Flex
	// contains filtered or unexported fields
}

func NewFilterView added in v0.2.10

func NewFilterView(app Loggo, filterCallback func(*filter.Expression)) *FilterView

type JsonView

type JsonView struct {
	tview.Flex
	// contains filtered or unexported fields
}

func NewJsonView

func NewJsonView(app Loggo, showQuit bool,
	toggleFullScreenCallback, closeCallback func()) *JsonView

func (*JsonView) SetJson

func (j *JsonView) SetJson(jText []byte) *JsonView

SetJson sets a JSON and colourise accordingly, replacing any existing content. If it fails to parse the json, it displays the text as plain text.

type LogData

type LogData struct {
	tview.TableContentReadOnly
	// contains filtered or unexported fields
}

func (*LogData) GetCell

func (d *LogData) GetCell(row, column int) *tview.TableCell

func (*LogData) GetColumnCount

func (d *LogData) GetColumnCount() int

func (*LogData) GetRowCount

func (d *LogData) GetRowCount() int

type LogView

type LogView struct {
	tview.Flex
	// contains filtered or unexported fields
}

func NewLogReader

func NewLogReader(app *LoggoApp, reader reader.Reader) *LogView

type Loggo

type Loggo interface {
	Draw()
	SetInputCapture(cap func(event *tcell.EventKey) *tcell.EventKey)
	Stop()
	SetFocus(primitive tview.Primitive)
	ShowPopMessage(text string, waitSecs int64, resetFocusTo tview.Primitive)
	ShowPrefabModal(text string, width, height int, capture inputCapture, buttons ...*tview.Button)
	ShowModal(p tview.Primitive, width, height int, bgColor tcell.Color, capture inputCapture)
	DismissModal(resetFocusTo tview.Primitive)
	Config() *config.Config
	StackView(p tview.Primitive)
	PopView()
}

type LoggoApp

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

func NewLoggoApp

func NewLoggoApp(reader reader.Reader, configFile string) *LoggoApp

func (*LoggoApp) Config

func (a *LoggoApp) Config() *config.Config

func (*LoggoApp) DismissModal

func (a *LoggoApp) DismissModal(resetFocusTo tview.Primitive)

func (*LoggoApp) Draw

func (a *LoggoApp) Draw()

func (*LoggoApp) PopView

func (a *LoggoApp) PopView()

func (*LoggoApp) Run

func (a *LoggoApp) Run()

func (*LoggoApp) SetFocus

func (a *LoggoApp) SetFocus(primitive tview.Primitive)

func (*LoggoApp) SetInputCapture

func (a *LoggoApp) SetInputCapture(cap func(event *tcell.EventKey) *tcell.EventKey)

func (*LoggoApp) ShowModal

func (a *LoggoApp) ShowModal(p tview.Primitive, width, height int, bgColor tcell.Color, cap inputCapture)

func (*LoggoApp) ShowPopMessage added in v0.2.3

func (a *LoggoApp) ShowPopMessage(text string, waitSecs int64, resetFocusTo tview.Primitive)

func (*LoggoApp) ShowPrefabModal

func (a *LoggoApp) ShowPrefabModal(text string, width, height int, cap inputCapture, buttons ...*tview.Button)

func (*LoggoApp) StackView

func (a *LoggoApp) StackView(p tview.Primitive)

func (*LoggoApp) Stop

func (a *LoggoApp) Stop()

type SplashScreen

type SplashScreen struct {
	tview.Flex
	// contains filtered or unexported fields
}

func NewSplashScreen

func NewSplashScreen(app Loggo) *SplashScreen

func (*SplashScreen) PrintCanvasAsColorString

func (t *SplashScreen) PrintCanvasAsColorString(foreground, shade rune, foregroundColor, shadeColor, backgroundColor string) string

type TemplateData

type TemplateData struct {
	tview.TableContentReadOnly
	// contains filtered or unexported fields
}

func (*TemplateData) GetCell

func (d *TemplateData) GetCell(row, column int) *tview.TableCell

func (*TemplateData) GetColumnCount

func (d *TemplateData) GetColumnCount() int

func (*TemplateData) GetRowCount

func (d *TemplateData) GetRowCount() int

type TemplateItemView

type TemplateItemView struct {
	tview.Flex
	// contains filtered or unexported fields
}

func NewTemplateItemView

func NewTemplateItemView(app Loggo, key *config.Key, toggleFullScreenCallback, closeCallback func()) *TemplateItemView

type TemplateView

type TemplateView struct {
	tview.Flex
	// contains filtered or unexported fields
}

func NewTemplateView

func NewTemplateView(app Loggo, showQuit bool, toggleFullScreenCallback, closeCallback func()) *TemplateView

func (*TemplateView) Close

func (t *TemplateView) Close()

Jump to

Keyboard shortcuts

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