Skip to content

briyanadityatama/goLoans

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goLoans

Go Report Card

Go Loans

Example financial RESTful microservice for taking Loans written entirely in Go (Golang). It was written using Test-Driven Development approach and follows the Domain-Driven Design guidelines.

Features

  • apply for a loan
    • possibility to take one loan per client
    • first loan up to 50000000
    • only 3 applications from one ip per day
  • repay the loan - either partially or in full
  • extend the loan of a given client

Before RUN

Make sure this project placed on your GOPATH/go or whatever your GOPATH name.

Run

go run main.go

POST & GET Method

Try to POST first data via POSTMAN

POST => http:https://localhost:8080/clients

Insert raw data in body e.g

{
	"ktpNumber" : "3522582509010002",
	"amount"    : 10000000,
	"term"      : 30,
	"birthDate" : "1 December 1994",
	"name"      : "Doe"
}

Try to GET the clients by ktpNumber

GET => http:https://localhost:8080/clients/3522582509010002

output will look like this

{
    "ktpNumber": "3522582509010002",
    "birthDate": "1 December 1994",
    "name": "Doe",
    "goLoans": {
        "links": [
            {
                "rel": "self",
                "href": "http:https://localhost:8080/clients/3522582509010002/goLoans"
            }
        ]
    }
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published