Skip to content
Implements a basic REST Web-service for validating IBAN account numbers in GO.
Go HTML JavaScript CSS Shell Dockerfile Makefile
Branch: master
Clone or download
Latest commit 02e0dc1 Aug 5, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
k8s Add kubernetes deployment May 25, 2018
metrics support build without metrics (go <1.8) Oct 12, 2017
static Update github urls Aug 5, 2019
test
.gitignore Add build script May 15, 2018
Dockerfile Run openiban docker service as non-root user (fixes #23) Sep 4, 2018
LICENSE
Makefile
README.md
VERSION Bump version to 1.0.2 Oct 11, 2018
build.sh Add `-v` and `-pidFile` arguments Oct 11, 2018
country_code_handler.go Add IBAN calculation Jan 7, 2016
country_code_handler_test.go Add IBAN calculation Jan 7, 2016
goiban_service.go Add `-k` flag for printing the signature public key Oct 11, 2018
goiban_service_test.go Add standalone hosting support May 15, 2018
iban_generation.go fix fourcube/goiban-service#6 Mar 20, 2016
iban_generation_test.go verify loading zeros when generating ibans Feb 7, 2017
pid.go Fix compilation error in pid.go Oct 11, 2018

README.md

goiban-service

Openiban is going to be revived, stay tuned!


Implements a basic REST Web-service for validating IBAN account numbers in GO. Uses the logic from http://github.com/fourcube/goiban. Deployed at http://openiban.com .

Running the service

Via go get:

$ go get -u github.com/fourcube/goiban-service
# Launch the service listening on port 8080 and serve static content
$ $GOPATH/bin/goiban-service -port 8080 -w 

Download a binary package:

A list of all releases is available here.

# Make sure to choose the correct operating system and architecture
$ curl -Lo goiban-service.tar.gz "https://github.com/fourcube/goiban-service/releases/download/v1.0.2/goiban-service-1.0.2-linux-386.tar.gz"
$ tar -xzf goiban-service.tar.gz
$ cd goiban-service
# Launch the service listening on port 8080, using the bank data from ./data and serving
# the web interface from ./static
$ ./goiban-service -dataPath ./data -staticPath ./static -port 8080 -w

Via Docker

https://hub.docker.com/r/fourcube/openiban/


$ docker run --name openiban -d -p8080:8080 fourcube/openiban
$ curl localhost:8080/validate/DE89370400440532013000

You will see something like:

{
  "valid": true,
  "messages": [],
  "iban": "DE89370400440532013000",
  "bankData": {
    "bankCode": "",
    "name": ""
  },
  "checkResults": {}
}

Via Kubernetes

You can deploy above docker file in your kubernetes cluster by using the configuration files container in ./k8s.

Run the following command to apply the deployment and service (NodePort service running on port 32111)

kubectl apply -f ./k8s

Building the service (MySQL)

You have to install go >= 1.8, setup your GOPATH and install a MySQL server. Goiban requires a database called 'goiban'. The following commands assume a MySQL database running on localhost:3306 with database goiban and user root with password root.

$ go get -u github.com/fourcube/goiban-data-loader
$ cd $GOPATH/src/github.com/fourcube/goiban-data-loader
$ DATABASE_URL="root:root@tcp(localhost:3306)/goiban?charset=utf8" make migrate

# load data
$ go build
$ ./goiban-data-loader bundesbank root:root@/goiban?charset=utf8

$ go get github.com/fourcube/goiban-service
$ cd $GOPATH/src/github.com/fourcube/goiban-service
$ go build
$ ./goiban-service -port 8080 -dbURL root:root@/goiban?charset=utf8

To create a build without the metrics support (e.g if you run on go < 1.8) run:

$ go build -tags no_metrics

MySQL development instance

To quickly run a MySQL database inside a docker container you can use the following command:

docker run -d --name openiban-mysql -p3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=goiban mysql

Client Libraries

Name Language
openiban.js ⭐️ JavaScript/TypeScript
OpenIBAN Python
OpenIban Connector PHP (Plugin for Shopware)

⭐️ officially supported

The MIT License (MIT)

Copyright (c) 2013-2017 Chris Grieger

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You can’t perform that action at this time.