Deckr provides a REST/gRPC API to simulate a deck of cards.
-
Mage - replacement for Makefile in Go.
$ go install github.com/magefile/mage@latest
-
Golangci-lint - Fast Go linters runner.
$ go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
-
Ginkgo - Expressive testing framework.
$ go install github.com/onsi/ginkgo/v2/ginkgo@latest
-
Buf - A new way of working with Protocol Buffers.
$ go install github.com/bufbuild/buf/cmd/buf@latest
-
Protoc - Protocol Buffers compiler.
For installation instructions, see Protocol Buffer Compiler Installation.
-
Protoc-gen-go - Go code generator for Protocol Buffers.
$ go install github.com/golang/protobuf/protoc-gen-go@latest
-
Protoc-gen-go-grpc - Go code generator for gRPC.
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
-
Docker - Containerization.
$ mage -l
Targets:
build:all Builds for all supported popular OS/Arch
build:linuxAmd64 Builds for Linux 64bit
build:linuxArm64 Builds for Linux ARM 64bit
build:macOSAmd64 Builds for MacOS 64bit
build:macOSArm64 Builds for MacOS M1
build:winAmd64 Builds for Windows 64bit
lint Run golangci linters
proto Generate stubs from proto files
test Run tests
testRace Run tests with race detector
tidy Run go mod tidy
$ mage -v proto
$ mage -v testRace
$ mage -v build:macOSArm64
-
You can install using the latest released binary.
-
OR using Go:
$ go install github.com/mgjules/deckr@latest
-
OR bulding from source:
Example (MacOS M1):
$ mage -v build:macOSArm64
$ deckr --help
NAME:
deckr - A REST/gRPC API for playing with a deck of cards
USAGE:
deckr [global options] command [command options] [arguments...]
DESCRIPTION:
Deckr exposes a REST/gRPC API for playing with a deck of cards of your choice.
AUTHOR:
Michaël Giovanni Jules <julesmichaelgiovanni@gmail.com>
COMMANDS:
serve Starts the REST/gRPC API server.
version, v Shows the version
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help (default: false)
COPYRIGHT:
(c) 2022 Michaël Giovanni Jules
$ deckr serve --help
NAME:
deckr serve - Starts the REST/gRPC API server.
USAGE:
deckr serve [command options] [arguments...]
OPTIONS:
--debug whether running in PROD or DEBUG mode (default: false) [$DECKR_DEBUG]
--server-host value HOST of server (default: "localhost") [$DECKR_SERVER_HOST]
--server-port value PORT of server (default: 9000) [$DECKR_SERVER_PORT]
--storage-uri value URI of storage (default: "inmemory://") [$DECKR_STORAGE_URI]
--help, -h show help (default: false)
The REST API documentation is generated using Swag and is available at /swagger/index.html
.
Deckr is Apache 2.0 licensed.