ui

package
v0.0.0-...-d472a1d Latest Latest
Warning

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

Go to latest
Published: May 8, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DisplayMessage

type DisplayMessage interface {
	Body() string
}

Any message meant to be displayed in UI

type FriendRequest

type FriendRequest struct {
	InfoMessage
	Username, IP string
}

Friend request received

func NewFriendRequestMessage

func NewFriendRequestMessage(info, username, ip string) *FriendRequest

type InfoMessage

type InfoMessage struct {
	DisplayMessage
	Message string
}

Message of just text information

func NewInfoMessage

func NewInfoMessage(info string) *InfoMessage

func (*InfoMessage) Body

func (m *InfoMessage) Body() string

type ReceiveChat

type ReceiveChat struct {
	InfoMessage
	Sender string
	Time   time.Time
}

Chat message

func NewReceiveChatMessage

func NewReceiveChatMessage(info, sender string, time time.Time) *ReceiveChat

type UI

type UI struct {
	Program       *server.Server
	UI            tui.UI
	Chat, History *tui.Box
	Input         *tui.Entry
	List          *tui.List
}

func (*UI) Run

func (ui *UI) Run() error

Runs the UI

Jump to

Keyboard shortcuts

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