http

package
v0.0.0-...-1223afa Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatMessage

type ChatMessage struct {
	User *user.User `json:"user"`
	Text string     `json:"text"`
}

type Message

type Message interface {
}

type RaidMessage

type RaidMessage struct {
	UserName     string `json:"userName"`
	PartySize    uint16 `json:"partySize"`
	ProfileImage string `json:"profileImage"`
	Message      string `json:"message"`
}

type Server

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

func NewServer

func NewServer(addr, webPath string) *Server

func (*Server) BroadcastChatMessage

func (s *Server) BroadcastChatMessage(user *user.User, msg string) error

func (*Server) BroadcastMessage

func (s *Server) BroadcastMessage(msg Message) error

func (*Server) Start

func (s *Server) Start() error

type WebsocketMessage

type WebsocketMessage struct {
	Type    string  `json:"type"`
	Message Message `json:"message"`
}

Jump to

Keyboard shortcuts

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