RESTful go-iban-validator written in Go
An implementation for a Go mocroserivce, which validates whether an IBAN number is valid or not
Dependencies
- You are running MacOS or Ubuntu
- Make sure you have go installed.
Installation
-
Clone the repo: You can do this using the
go get
instead of runninggit clone
manually:go get github.com/MHzarini/go-iban-validator
-
Install dependencies by running
make deps
. -
Make sure everything is running properly by running the tests using
make test
. -
Check the configuration file
config/config.yaml
make chenges if needed.
Running locally
- Run using
make run-local
- If using MacOS, hit
Allow
when asked "Do you want the application “main” to accept incoming network connections?".
Running on Docker
- Run using
make docker
to create and build your container with the tagdocker-go-iban-validator
- Run using
make run
Local Development
You can test the API after running the project with the following CURL
curl --location --request POST 'http://localhost:9090/' \
--data-raw '{
"iban": "SI56 1910 0000 0123 438"
}'
Note
This code was build as a Programming Assignment for a Backend Engineer position