typical-rest-server

module
v0.8.29 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: MIT

README

typical-rest-server

Example of typical and scalable RESTful API Server for Go

Prerequisite

Install Go (It is recommend to install via Homebrew brew install go)

Quick Start

# equivalent with `docker-compose up -d` (if infrastructure not up)
./typicalw docker up 

# drop, create and migrate postgres database (if database not ready)
./typicalw pg reset 

# generate mock (if require mock)
./typicalw mock 

# run test 
./typicalw test

# run the application
./typicalw run 

# release the distribution
./typicalw release 

TODO

TypicalGo support java-like annotation for code generation before build

  • [constructor] to add constructor in service-locator
  • [mock] is target to be mock for ./typicalw mock
  • [api(method=<METHOD>, path=<PATH>)] to generate route function (TODO)
  • [cacheable] to generate cached function (TODO)

Directories

Path Synopsis
cmd
pkg
repository_mock
Package repository_mock is a generated GoMock package.
Package repository_mock is a generated GoMock package.
service_mock
Package service_mock is a generated GoMock package.
Package service_mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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