tui

package
v0.0.0-...-d122f95 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RED    = "1"
	GREEN  = "2"
	YELLOW = "3"
)
View Source
const (
	MAX_HISTORY = 6
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandHistory

type CommandHistory struct {
	CommandTexts []CommandText
	Height       int
	Width        int
	// contains filtered or unexported fields
}

func (*CommandHistory) GetLastCommand

func (ch *CommandHistory) GetLastCommand() *CommandText

func (*CommandHistory) GetNextCommand

func (ch *CommandHistory) GetNextCommand() *CommandText

func (*CommandHistory) ResetCurrentIndex

func (ch *CommandHistory) ResetCurrentIndex()

func (CommandHistory) View

func (ch CommandHistory) View() string

type CommandText

type CommandText struct {
	UserText     string
	ResponseText string
	Success      bool
}

func (CommandText) View

func (ct CommandText) View() string

type ConnectMsg

type ConnectMsg struct {
	Error error
}

type MemcachedResponseMsg

type MemcachedResponseMsg struct {
	Error    error
	Response string
}

type Model

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

func NewModel

func NewModel(socketAddress memcachedclient.SocketAddress) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (*Model) SetSize

func (m *Model) SetSize(height, width int)

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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