handlers

package
v0.0.0-...-5e04c00 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyPlayer

type KeyPlayer struct{}

KeyPlayer is a key used for the Player object inside context

type QueueHandler

type QueueHandler struct{}

QueueHandler contains the items common to all queue handler functions

func NewQueueHandler

func NewQueueHandler() *QueueHandler

NewQueueHandler returns a pointer to a QueueHandler with the logger passed as a parameter

func (*QueueHandler) AddPlayer

func (queueHandler *QueueHandler) AddPlayer(responseWriter http.ResponseWriter, request *http.Request)

AddPlayer add the player to the queue from the received JSON

func (*QueueHandler) Delete

func (queueHandler *QueueHandler) Delete(responseWriter http.ResponseWriter, request *http.Request)

Delete a player with specified id from the queue

func (*QueueHandler) InQueue

func (queueHandler *QueueHandler) InQueue(responseWriter http.ResponseWriter, request *http.Request)

InQueue returns a bool that verifies that a player is queued

func (*QueueHandler) LivenessCheck

func (queueHandler *QueueHandler) LivenessCheck(responseWriter http.ResponseWriter, request *http.Request)

LivenessCheck determine when the application needs to be restarted

func (*QueueHandler) MiddlewarePlayerValidation

func (queueHandler *QueueHandler) MiddlewarePlayerValidation(next http.Handler) http.Handler

MiddlewarePlayerValidation is used to validate incoming player JSONS

func (*QueueHandler) ReadinessCheck

func (queueHandler *QueueHandler) ReadinessCheck(responseWriter http.ResponseWriter, request *http.Request)

ReadinessCheck verifies that the application is ready to accept requests

Jump to

Keyboard shortcuts

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