services

package
v0.0.0-...-04ace94 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RoomsAddRoutes

func RoomsAddRoutes(dao dao.Rooms, router *router.TableRouter)

RoomsAddRoutes adds the routes for this service to the given router

func SetsAddRoutes

func SetsAddRoutes(dao dao.Sets, router *router.TableRouter)

Types

type Rooms

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

Rooms provides the REST API for the game room resource

func (*Rooms) AddPlayer

func (rms *Rooms) AddPlayer(w http.ResponseWriter, r *http.Request)

AddPlayer adds a player to the room

func (*Rooms) Create

func (rms *Rooms) Create(w http.ResponseWriter, r *http.Request)

Create creates a new room

func (*Rooms) Delete

func (rms *Rooms) Delete(w http.ResponseWriter, r *http.Request)

Delete deletes the room with the requested name

func (*Rooms) DeletePlayer

func (rms *Rooms) DeletePlayer(w http.ResponseWriter, r *http.Request)

DeletePlayer deletes a player from the room

func (*Rooms) Get

func (rms *Rooms) Get(w http.ResponseWriter, r *http.Request)

Get returns the room with requested name

func (*Rooms) List

func (rms *Rooms) List(w http.ResponseWriter, r *http.Request)

List returns the list of all rooms

func (*Rooms) SetGame

func (rms *Rooms) SetGame(w http.ResponseWriter, r *http.Request)

SetGame sets the game type and id for the room

type Sets

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

Sets provides the REST API for the Set board game

func (*Sets) Claim

func (s *Sets) Claim(w http.ResponseWriter, r *http.Request)

func (*Sets) Create

func (s *Sets) Create(w http.ResponseWriter, r *http.Request)

func (*Sets) Delete

func (s *Sets) Delete(w http.ResponseWriter, r *http.Request)

func (*Sets) Expand

func (s *Sets) Expand(w http.ResponseWriter, r *http.Request)

func (*Sets) Get

func (s *Sets) Get(w http.ResponseWriter, r *http.Request)

func (*Sets) List

func (s *Sets) List(w http.ResponseWriter, r *http.Request)

func (*Sets) Next

func (s *Sets) Next(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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