message

package
v0.0.0-...-d92090f Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeDay   = "day"
	TimeNight = "night"
)
View Source
const (
	Awoo        = "awoo"
	Role        = "role"
	PlayerList  = "playerlist"
	Roleset     = "roleset"
	RolesetList = "rolesetlist"
	GameState   = "gamestate"
	Phase       = "phase"
	Leader      = "leader"
	PleaseWait  = "pleasewait" // they're in the lobby
	CanNotJoin  = "cannotjoin"
	Tally       = "tally"
	Targeted    = "targeted"
	Victory     = "victory"
	Private     = "privatemessage"
	Dead        = "dead"
	Error       = "error"
	Reset       = "reset"
)

Variables

This section is empty.

Functions

func New

func New(message string, payload interface{}) ([]byte, error)

Types

type ClientMessage

type ClientMessage struct {
	JoinName       string `json:"joinWithName"`
	PollPlayerList bool   `json:"pollPlayerList"`
	PollTally      bool   `json:"pollTally"`
	Vote           string `json:"voteFor"`
	Time           string `json:"time"`
	Roleset        string `json:"setRoleset"`
	FetchRolesets  bool   `json:"fetchRolesets"`
	Reset          bool   `json:"resetGame"`
}

func Decode

func Decode(raw []byte) *ClientMessage

type Message

type Message struct {
	Message string      `json:"message"`
	Payload interface{} `json:"payload"`
}

Jump to

Keyboard shortcuts

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