handler

package
v0.0.0-...-d2defa8 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalMessage atomic.Value

GlobalMessage the threadsafe storage of the last message sent to the relay

Functions

func HandleCommandsRequest

func HandleCommandsRequest(w http.ResponseWriter, req *http.Request)

HandleCommandsRequest for route "/command/<command>"

func HandleHomeRequest

func HandleHomeRequest(w http.ResponseWriter, req *http.Request)

HandleHomeRequest a function for when / is called

func HandleMessageRequest

func HandleMessageRequest(w http.ResponseWriter, req *http.Request)

HandleMessageRequest route handler for /rolls/<roll>

func HandleUserRequest

func HandleUserRequest(w http.ResponseWriter, req *http.Request)

HandleUserRequest a function for when / is called

Types

type CatanMessage

type CatanMessage struct {
	ID    string
	Value string
}

CatanMessage the JSON formatted message passed in the header of a POST

type User

type User struct {
	ID    string `json:"id"`
	Name  string `json:"Name"`
	Order int    `json:"Order"`
}

User the model for users

Jump to

Keyboard shortcuts

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