go-ddd

module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: MIT

README

Go Domain Drived Design / Service repository pattern

Go Report Card GoDoc

Simple api domain drived design / service repository pattern

API Overview

every api (for each domain model) is structured like below:

handler <----rest api endpoint
|
service <----service layer, main business logic of the api lives here
|
store <---- database logic, operation related to database fetching

Swagger docs

to access the swagger docs, go to: $APP_HOST/swagger/index.html

to generate new updated swagger docs, install:

go get -u github.com/swaggo/swag/cmd/swag

to generate docs, in the project root directory, run:

go swag init -g cmd/APPFOLDER/tngrm-APP-api.go docs/APPFOLDER/

if you're having issues like "swag command not found" set the go path variable in project root directory:

export PATH=$(go env GOPATH)/bin:$PATH
note:

remember to generate swagger docs BEFORE running the ./build.sh script.

for other info about go swag, refer to: https://github.com/swaggo/swag

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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