scouts-server

command module
v0.0.0-...-804359f Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: ISC Imports: 14 Imported by: 0

README

scouts-server

Backend Go implementation of Aaron's Scouts game.

Package Documentation

Refer to package scouts for documentation.

API Documentation

User API

The server publicly exposes these endpoints:

  • GET /api/v1/users/{id}: get a user by ID
  • POST /api/v1/users: create a new user
  • POST /api/v1/login: log in as a user
Games API

The server publicly exposes these endpoints:

  • GET /api/v1/game: list all games
  • GET /api/v1/game/{id}: get a game by ID
  • GET /api/v1/game/{id}/events: subscribe to events for a game using Server-Sent Events
  • POST /api/v1/game: create a new game
  • POST /api/v1/game/{id}/join: join a game
  • POST /api/v1/game/{id}/move: make a move in a game

All the above endpoints require the following headers:

  • Content-Type: application/json
  • Authorization: the session token, either with type Bearer or Bot.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
storage
Package storage implements local filesystem storage for various interfaces in the gameserver package.
Package storage implements local filesystem storage for various interfaces in the gameserver package.
internal
Package scouts implements the game of Scouts.
Package scouts implements the game of Scouts.

Jump to

Keyboard shortcuts

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