pkg

package
v0.1.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	BasePath = "/api/v2"
)
View Source
const (
	TitleFooterView = "AMTUI - Alertmanager TUI Client\ngithub.com/pehlicd/amtui"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth added in v0.1.5

type Auth struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

type Config

type Config struct {
	Host   string `yaml:"host"`
	Port   string `yaml:"port"`
	Scheme string `yaml:"scheme"`
	Auth   Auth   `yaml:"auth"`
}

type TUI

type TUI struct {
	App         *tview.Application
	SidebarList *tview.List
	PreviewList *tview.List
	Preview     *tview.TextView
	Grid        *tview.Grid
	FooterText  *tview.TextView
	Filter      *tview.InputField
	Config      Config
}

func InitTUI

func InitTUI() *TUI

InitTUI Initialize TUI

func (*TUI) ClearPreviews

func (tui *TUI) ClearPreviews()

ClearPreviews Clear TUI previews

func (*TUI) Errorf

func (tui *TUI) Errorf(format string, args ...interface{})

Errorf Create a function to print errors

func (*TUI) Start

func (tui *TUI) Start() error

Start starts TUI application

Jump to

Keyboard shortcuts

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