tui

package
v0.0.0-...-6e4d8ea Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KB // 1 << (10*1)
	MB // 1 << (10*2)
	GB // 1 << (10*3)
	TB // 1 << (10*4)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Dashboard

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

Dashboard represents the main TUI dashboard

func (*Dashboard) Init

func (d *Dashboard) Init() tea.Cmd

Init implements tea.Model

func (*Dashboard) Update

func (d *Dashboard) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model

func (*Dashboard) UpdateStats

func (d *Dashboard) UpdateStats(info TunnelInfo)

UpdateStats updates the tunnel information statistics

func (*Dashboard) View

func (d *Dashboard) View() string

View implements tea.Model

type HttpReversProxyPty

type HttpReversProxyPty struct {
	*tea.Program
	// contains filtered or unexported fields
}

func NewHttpReverseProxyPty

func NewHttpReverseProxyPty(sess ssh.Session, addr string) (*HttpReversProxyPty, error)

NewHttpReverseProxyPty creates a new terminal UI instance

func (*HttpReversProxyPty) Start

func (t *HttpReversProxyPty) Start() error

func (*HttpReversProxyPty) Update

func (t *HttpReversProxyPty) Update()

type Register

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

Register represents the registration terminal UI

func (*Register) Init

func (r *Register) Init() tea.Cmd

Init implements tea.Model

func (*Register) Update

func (r *Register) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model

func (*Register) View

func (r *Register) View() string

View implements tea.Model

type RegisterPty

type RegisterPty struct {
	*tea.Program
	// contains filtered or unexported fields
}

func NewRegisterPty

func NewRegisterPty(sess ssh.Session, doReg doReg) (*RegisterPty, error)

func (*RegisterPty) Start

func (r *RegisterPty) Start() error

type RequestTable

type RequestTable struct {
	*table.Model
	// contains filtered or unexported fields
}

RequestTable wraps the table model with additional configuration

func (*RequestTable) Init

func (r *RequestTable) Init() tea.Cmd

func (*RequestTable) Update

func (r *RequestTable) Update(msg tea.Msg) (tea.Model, tea.Cmd)

type TableColumn

type TableColumn struct {
	Title  string
	Weight float64
}

TableColumn defines the structure for table column configuration

type TunnelInfo

type TunnelInfo struct {
	URL       string
	ExpiresIn time.Duration
	BytesRecv int64
	BytesSent int64
	ReqCount  int
	ResCount  int
}

TunnelInfo holds information about the tunnel connection

Jump to

Keyboard shortcuts

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