Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.1 KB

README.md

File metadata and controls

52 lines (40 loc) · 1.1 KB

goa-demo

goa-demo is a demo app to explore goa it provides a REST API. To view full flow, please follow /loans/{id} endpoint in code. Only this has been entirely built. However, it will return a hard-coded loan object.

Quick Start

goa-demo can be run with

go run main.go

it will run server on localhost:8080 and exposes following endpoints

  1. list loans
GET: /loans
  1. get loan [id = 1 will return a dummy obj]
GET: /loans/{id}
  1. get users
GET: /users
  1. get user
GET: /users/{id}
  1. create user
POST: /users
  1. delete user
DELETE: /users/{id}

Structure

  1. Design is defined in /api/design. It has 3 services right now; user, loan & swagger service.
  2. Code generated by goa is in /api/gen
  3. /api/services contains api services (handler funcs)
  4. /domain contains domain entities & related functions on entities
  5. /internal defines common tools, wrappers above common assets like log, err etc.
  6. /services contains business logic services