an API to handle the deck and cards to be used in any game like Poker and Blackjack.

Card Games REST API in GO

Simple RESTful API for Card games. with database implementation

Quick Start

# Install mux router
cd /main
go get -u github.com/gorilla/mux
# update mongo url
in DataBase/connector.go 
update var mongoUrl with your database user name & password
# start the api server
cd /main
go run main.go
# to run tests
cd /main/Test
go test -v

Endpoints

open deck

GET localhost:8001/api/Deck/{id}

Create Deck

POST localhost:8001/api/Deck

# Request sample
# {
#   "shuffled" : true,
#   "cards":"AH,AS,AD,AC"
# }

Draw a card

POST localhost:8001/api/Deck/{id}/draw

# Request sample
# {
#   "count":2
# }

App Structure explain

1. ApiHelpers

Basically contains the helper functions used in returning api responses, HTTP status codes, default messages etc.

2. Controller

Contains handler functions for particular route to be called when an api is called.

3. Helpers

Contains helper functions used in all apis

4. Model

model structs

6. Routers

Resources define the routes of the project

7. Storage

It is generally for storage purpose.

Database

8. contains the database functions

Similar Resources

Scalable game server framework with clustering support and client libraries for iOS, Android, Unity and others through the C SDK.

pitaya Pitaya is an simple, fast and lightweight game server framework with clustering support and client libraries for iOS, Android, Unity and others

Jan 2, 2023

An implementation of the popular game Codenames created with Go and React.

OpenCodenames A real-time implementation of Codenames created with React/TypeScript and Golang. You can play the game here! Installation Stack: React

Aug 8, 2021

Dedicated Game Server Hosting and Scaling for Multiplayer Games on Kubernetes

Dedicated Game Server Hosting and Scaling for Multiplayer Games on Kubernetes

Agones is a library for hosting, running and scaling dedicated game servers on Kubernetes. Agones, is derived from the Greek word agōn which roughly t

Jan 6, 2023

This is a "simple" game server. Main functionalities are matching and establishing a connection between players

This is a

Game Server This is a "simple" game server. Main functionalities are matching and establishing a connection between players How to Run? run the server

Aug 28, 2022

Emulate a Vikings War of Clans battle with the real game mechanics and gives you the results of your emulated rapport!

VikingsStatsCalc Emulate a Vikings War of Clans battle with the real game mechanics and gives you the results of your emulated rapport! TODO Introduce

Nov 18, 2022

A lightweight and efficient messaging gateway server for distributed game servers, written in Go.

Overview channeld is an open source, light-weight and efficient messaging gateway server designed for distributed game servers (typically MMO) and oth

Aug 8, 2022

Golang writen 3D render library and some game-relative concepts

Golang writen 3D render library and some game-relative concepts.

Jun 6, 2022

Quality of life tool for diablo2r. Automatically counts up and writes the game name into clipboard.

Quality of life tool for diablo2r. Automatically counts up and writes the game name into clipboard.

counterbaal Quality of life tool for people hosting diablo2 baalruns. Automatically counts up and writes the game name into clipboard. Probably only u

Jan 1, 2022

A dead simple 2D game library for Go

A dead simple 2D game library for Go

Ebiten (v2) A dead simple 2D game library for Go Ebiten is an open source game library for the Go programming language. Ebiten's simple API allows you

Dec 28, 2022
Simple 2D game to teach myself various things about game development and ECS, etc

2d-grass-game I really don't know what to name this game. Its a big grass field, and its in 2d so....2D Grass game This is a simple 2D game to teach m

Jan 17, 2022
Arkanoid game in Go using Ebiten game engine with ECS.
Arkanoid game in Go using Ebiten game engine with ECS.

Arkanoid-go Arkanoid game in Go using Ebiten game engine with ECS. You must have Git LFS installed when cloning the repository to download assets. See

Oct 9, 2022
AircraftWar - a game powered by Go+ spx game engine
AircraftWar - a game powered by Go+ spx game engine

AircraftWar - a game powered by Go+ spx game engine How to run Download Go+ and build it. See https://github.com/goplus/gop#how-to-build. Download thi

Jan 5, 2022
FlappyCalf - a game powered by Go+ spx game engine
FlappyCalf - a game powered by Go+ spx game engine

FlappyCalf - a game powered by Go+ spx game engine How to run Download Go+ and build it. See https://github.com/goplus/gop#how-to-build. Download this

Nov 6, 2022
FlappyCalf - a game powered by Go+ spx game engine
FlappyCalf - a game powered by Go+ spx game engine

FlappyCalf - a game powered by Go+ spx game engine How to run Download Go+ and build it. See https://github.com/goplus/gop#how-to-build. Download this

Nov 6, 2022
MazePlay - a game powered by Go+ spx game engine
MazePlay - a game powered by Go+ spx game engine

MazePlay - a game powered by Go+ spx game engine How to run Download Go+ and build it. See https://github.com/goplus/gop#how-to-build. Download this g

Dec 16, 2021
A simple game that I created with Ebiten game library as a way to teach myself Go. Enjoy!
A simple game that I created with Ebiten game library as a way to teach myself Go. Enjoy!

galactic-asteroid-belt Overview A simple game that I created with Ebiten game library as a way to teach myself Go. Enjoy! Run To run, you will need Go

Dec 2, 2021
Snake except it's nothing like snake and it's a completely different game altogether!

_|_|_| _|_| _| _| _| _| _|_|_| _|_|_|_| _| _| _| _| _| _| _|_| _| _| _| _|_|_| _| _| _| _| _|

Dec 4, 2021
Simple moonlander like game with some new mechanics
Simple moonlander like game with some new mechanics

Space Crane game Controls Arrows - control ship engines Q/A - wind/unwind crane chain Tab - capture cargo Screenshots Features Levels Levels are simpl

Aug 24, 2022
A game server side framework with both web API and realtime communication.

HAYABUSA Framework Hayabusa is a server side framework for Japan-like social games. Easy to understand and use for beginners Powerful controller, flex

May 21, 2022