This is a simple bank api that I made using Go programming language and other technologies
- Framework Gin (gin-gonic)
- SQLc
- golang-migrate
- PostgresSQL
- golang-viper (config)
- testify (unit testing)
-
Version 1
/api/v1
-
accounts
-
GET
all accounts paginated- endpoint
/accounts?page=?&size=?
- Query Params
page
required
page numbersize
required
size of data per page
- endpoint
-
GET
account- endpoint
/accounts/:id
- Params -
:id
specific account id
- endpoint
-
POST
create account- endpoint
/accounts
- Body
name
full name of accountcurrency
currency supported currently (USD EUR CAD)
- endpoint
-
POST
deposit- endpoint
/accounts/deposit
- Body
id
id of the accountamount
number of money to be deposit (currently the data type of it is integer will change later)
- endpoint
-
DELETE
account- endpoint
/accounts/:id
- Params -
:id
specific account id
- endpoint
-
-
transfers
-
GET
all transfers by account paginated- endpoint
/transfers?id=?&page=?&size=?
- Query Params
id
required
id of the accountpage
required
page numbersize
required
size of data per page
- endpoint
-
GET
transfer- endpoint
/transfers/:id
- Params -
:id
specific transfer id
- endpoint
-
POST
create transfer- endpoint
/transfers
- Body
from_account_id
id of the senderto_account_id
id of the receiveramount
amount to be transfercurrency
currency supported currently (USD EUR CAD)
- endpoint
-
-
entry
-
GET
all entry by account paginated- endpoint
/entry?id=?&page=?&size=?
- Query Params
id
required
id of the accountpage
required
page numbersize
required
size of data per page
- endpoint
-
-
users
-
POST
create / register user- endpoint
/users/register
- Body
all fields required
username
primary key, foreign key to the accounts modelfull_name
name of the useremail
unique
email of the userpassword
min=6
password_again
- endpoint
-
-
Change this to trigger deploy 1