Documentation ¶
Index ¶
- func AddRoutes(r *chi.Mux, networkHandler *Handler) *chi.Mux
- func NewRouter(cfg http.RouterConfig) *chi.Mux
- type Config
- type CreateGameRequest
- type Handler
- func (h *Handler) CreateGame(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetActiveGameIDs(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetBGN(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetInfo(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetSnapshot(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetStats(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Health(w http.ResponseWriter, r *http.Request)
- func (h *Handler) JoinGame(w http.ResponseWriter, r *http.Request)
- func (h *Handler) JoinSecureGame(w http.ResponseWriter, r *http.Request)
- func (h *Handler) LoadGame(w http.ResponseWriter, r *http.Request)
- type LoadGameRequest
- type NetworkOptions
- type Server
- type StatsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Environment string Log logger.Config Router http.RouterConfig Server http.ServerConfig Datastore datastore.DatastoreConfig Network NetworkOptions }
type CreateGameRequest ¶
type CreateGameRequest struct { *networking.NetworkingCreateGameOptions Teams int MoreOptions interface{} }
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(render *render.Render, network *networking.GameNetwork, gameStore datastore.GameStore) *Handler
func (*Handler) CreateGame ¶
func (h *Handler) CreateGame(w http.ResponseWriter, r *http.Request)
func (*Handler) GetActiveGameIDs ¶ added in v1.3.7
func (h *Handler) GetActiveGameIDs(w http.ResponseWriter, r *http.Request)
func (*Handler) GetInfo ¶ added in v1.4.12
func (h *Handler) GetInfo(w http.ResponseWriter, r *http.Request)
func (*Handler) GetSnapshot ¶ added in v1.2.4
func (h *Handler) GetSnapshot(w http.ResponseWriter, r *http.Request)
func (*Handler) JoinSecureGame ¶
func (h *Handler) JoinSecureGame(w http.ResponseWriter, r *http.Request)
type LoadGameRequest ¶
type LoadGameRequest struct { *networking.NetworkingCreateGameOptions BGN string }
type NetworkOptions ¶
Click to show internal directories.
Click to hide internal directories.