Help us shape the future of Go! Take the 2026 Go Developer Survey

tui

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectedUpdate

func ConnectedUpdate(t targetDelegate, msg tea.Msg, m *list.Model) tea.Cmd

func FavoritesUpdate

func FavoritesUpdate(t targetDelegate, msg tea.Msg, m *list.Model) tea.Cmd

func NewClickHouseCommand

func NewClickHouseCommand(host string, port int, credentials []*targets.SessionCredential) *exec.Cmd

func NewMySQLCommand

func NewMySQLCommand(host string, port int, credentials []*targets.SessionCredential) *exec.Cmd

func NewPSQLCommand

func NewPSQLCommand(host string, port int, credentials []*targets.SessionCredential) *exec.Cmd

func NewRedisCommand

func NewRedisCommand(host string, port int, credentials []*targets.SessionCredential) *exec.Cmd

func SplitHostPort

func SplitHostPort(hostport string) (host string, port string, err error)

SplitHostPort splits a network address of the form "host:port", "host%zone:port", "[host]:port" or "[host%zone]:port" into host or host%zone and port.

A literal IPv6 address in hostport must be enclosed in square brackets, as in "[::1]:80", "[::1%lo0]:80".

func TargetsUpdate

func TargetsUpdate(t targetDelegate, msg tea.Msg, m *list.Model) tea.Cmd

func Tui

func Tui(ctx context.Context, targetListResult *targets.TargetListResult, boundaryClient *api.Client, boundaryToken *authtokens.AuthToken)

Types

type DelegateKeyMap

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

func NewDelegate

func NewDelegate(keyMap map[string]key.Binding, tab sessionState, updater delegateUpdateFunc, renderer delegateRenderFunc) (*targetDelegate, *DelegateKeyMap)

func NewList

func NewList(name string, view sessionState, items []list.Item, bindings map[string]key.Binding, updater delegateUpdateFunc, renderer delegateRenderFunc) (list.Model, *DelegateKeyMap)

func (DelegateKeyMap) FullHelp

func (c DelegateKeyMap) FullHelp() [][]key.Binding

func (DelegateKeyMap) ShortHelp

func (c DelegateKeyMap) ShortHelp() []key.Binding

type SessionInfo

type SessionInfo struct {
	Address         string
	Port            int
	Expiration      time.Time
	ConnectionLimit int32
	SessionId       string
	Credentials     []*targets.SessionCredential
	// contains filtered or unexported fields
}

func (*SessionInfo) Terminate

func (s *SessionInfo) Terminate(task *run.Task)

type Target

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

func (*Target) Connect

func (t *Target) Connect() (*exec.Cmd, error)

func (Target) Description

func (t Target) Description(tab sessionState) (string, string)

func (Target) FilterValue

func (t Target) FilterValue() string

func (Target) Info

func (t Target) Info() string

func (*Target) IsConnected

func (t *Target) IsConnected() bool

func (*Target) Shell

func (t *Target) Shell(callbackFn tea.ExecCallback) (tea.Cmd, error)

func (Target) Title

func (t Target) Title(tab sessionState) (string, string)

type TuiInput

type TuiInput struct {
	BoundaryClient  *api.Client
	BoundaryToken   *authtokens.AuthToken
	Tabs            []*list.Model
	TargetKeyMap    *DelegateKeyMap
	ConnectedKeyMap *DelegateKeyMap
	FavoriteKeyMap  *DelegateKeyMap
}

Jump to

Keyboard shortcuts

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