Documentation
¶
Overview ¶
Package client is the logical responsible for creating the TUI
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CyanStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#00FFFF"))
View Source
var HeaderStyle = lipgloss.NewStyle(). Padding(0, 0). MarginTop(0). Border(lipgloss.RoundedBorder()). BorderForeground(lipgloss.Color("#FF69B4")). Bold(true)
HeaderStyle styles the header which currently just contains the title
View Source
var InputBoxStyle = lipgloss.NewStyle(). Padding(0, 2). MarginTop(0). Border(lipgloss.RoundedBorder()). BorderForeground(lipgloss.Color("#00FFFF"))
InputBoxStyle style for the box which handles input
View Source
var ItemStyle = lipgloss.NewStyle(). MarginTop(1). PaddingLeft(1). Foreground(lipgloss.Color("#800080"))
ItemStyle style for each message sent
View Source
var MessageBoxStyle = lipgloss.NewStyle(). Padding(0, 0). MarginTop(0). Border(lipgloss.RoundedBorder()). BorderForeground(lipgloss.Color("white"))
MessageBoxStyle style for the box which contains the messages
View Source
var PinkStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FF69B4"))
View Source
var SelectedItemStyle = lipgloss.NewStyle(). PaddingLeft(1). Foreground(lipgloss.Color("#800080"))
SelectedItemStyle for each selected message, this controls the style of the message and user name TODO: split the colour of username and messages
Functions ¶
func SendMessage ¶
Dont use this SendMessage provides utility to be able to send a message from the chat client to the grpc server
func StartClient ¶
func StartClient()
StartClient starts the client and initializes the model, will most likely have to move this TODO: Move this code at some point
Types ¶
type GRPCMessage ¶
Click to show internal directories.
Click to hide internal directories.