models

package
v0.0.1-0...-d82520f Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LobbyEntry

type LobbyEntry struct {
	ID      string `json:"id"`
	Game    string `json:"game"`
	Name    string `json:"name"`
	Players int    `json:"players"`
}

type Message

type Message struct {
	To    string `json:"to"`
	From  string `json:"from"`
	Topic string `json:"topic"`
	Body  any    `json:"body"`
}

type Player

type Player struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	Avatar    string    `json:"avatar"`
	SessionID string    `json:"session_id"`
	Updated   time.Time `json:"updated"`
}

type Session

type Session struct {
	ID       string          `json:"id"`
	PlayerID string          `json:"player_id"`
	Avatar   string          `json:"avatar"`
	Username string          `json:"username"`
	Updated  time.Time       `json:"updated"`
	WS       *websocket.Conn `json:"-"`
}

Jump to

Keyboard shortcuts

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