room

package
v0.0.0-...-6ef2821 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RoomsContainer *fyne.Container
	RoomsList      *fyne.Container
	Rooms          map[string]*Room
)

Functions

func AddMessage

func AddMessage(t *pb.Text, ip, port string)

func LoadRooms

func LoadRooms()

func MakeRoomList

func MakeRoomList() *fyne.Container

func StartServer

func StartServer()

func StopServer

func StopServer()

func UpdateBgColors

func UpdateBgColors()

Types

type Peer

type Peer struct {
	Ip       string
	Port     string
	Username string
}

type Room

type Room struct {
	Secret   []byte
	Uuid     string
	UserId   string
	IsPublic bool
	Peers    []*Peer // for public rooms
	Name     string
	Addr     string
	Port     string
	Id       int64

	ChatRoom          *fyne.Container
	MessageList       *fyne.Container
	Messages          []*message.Message
	MessageListScroll *container.Scroll
	// contains filtered or unexported fields
}

func AddRoom

func AddRoom(r2 *models.Room) *Room

func NewRoom

func NewRoom(name, addr, port, userUuid string) *Room

Jump to

Keyboard shortcuts

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