server

package
v1.0.0-beta68 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2016 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RerouteToIndex

func RerouteToIndex(blacklistPrefixes ...string) gin.HandlerFunc

RerouteToIndex returns a new middleware to handle not found paths (e.g. frontend routes) and route them to index The blacklistPrefixes prevent some path to be routed

func ServeStatics

func ServeStatics() gin.HandlerFunc

ServeStatics serves statics file

Types

type GameHub

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

GameHub handle websocket connections for a Game

func NewGameHub

func NewGameHub(game game.Game) *GameHub

NewGameHub is GameHub constructor

type Server

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

Server is used to handle games

func NewServer

func NewServer() *Server

NewServer Server instantiation

func (*Server) Start

func (server *Server) Start(port string)

Start prepares and start the web server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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