cliutils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MainLoop added in v0.1.2

func MainLoop()

Types

type ChatInterface

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

a struct that provides an interface to chatrooms. In future versions, this will be very useful for managing multiple chats

func NewChatInterface

func NewChatInterface(tunnel *peerutils.Tunnel) *ChatInterface

initializes a ChatInterface, given the tunnel

func (*ChatInterface) AwaitInput

func (ci *ChatInterface) AwaitInput()

awaits user input, and handles it if it's a command, or sends it if it is a message

func (*ChatInterface) AwaitMessage

func (ci *ChatInterface) AwaitMessage()

awaits a message and displays it (along with all other messages) once recieved

func (ChatInterface) Display

func (ci ChatInterface) Display()

clears the terminal and displays all messages

func (*ChatInterface) Run

func (ci *ChatInterface) Run()

begins a chat session

Jump to

Keyboard shortcuts

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