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.
goa-demo
can be run with
go run main.go
it will run server on localhost:8080 and exposes following endpoints
- list loans
GET: /loans
- get loan [id = 1 will return a dummy obj]
GET: /loans/{id}
- get users
GET: /users
- get user
GET: /users/{id}
- create user
POST: /users
- delete user
DELETE: /users/{id}
- Design is defined in
/api/design
. It has 3 services right now; user, loan & swagger service. - Code generated by goa is in
/api/gen
/api/services
contains api services (handler funcs)/domain
contains domain entities & related functions on entities/internal
defines common tools, wrappers above common assets like log, err etc./services
contains business logic services