Skip to content

mateeullahmalik/goa-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published