14 Commits

Author SHA1 Message Date
3b00fa6cf5
feat: add description filter to transactions
All checks were successful
Go / build (1.23) (pull_request) Successful in 19s
Go / build (1.22) (pull_request) Successful in 21s
Lint PR / commitlint (pull_request) Successful in 23s
Go / build (1.24) (pull_request) Successful in 25s
Go / build (1.23) (push) Successful in 13s
Go / build (1.22) (push) Successful in 15s
Go / build (1.24) (push) Successful in 20s
Fix ILIKE to use %?% for partial matching as expected.
2025-09-05 22:42:27 +01:00
7f97e784b6
feat: implement X-Total-Count header
All checks were successful
Lint PR / commitlint (pull_request) Successful in 30s
Go / build (1.23) (pull_request) Successful in 1m5s
Go / build (1.24) (pull_request) Successful in 1m3s
Go / build (1.22) (pull_request) Successful in 1m7s
Go / build (1.22) (push) Successful in 20s
Go / build (1.24) (push) Successful in 16s
Go / build (1.23) (push) Successful in 18s
Used to implement pagination on server-side and for the backend to know
what is the last available page.
2025-07-27 00:47:00 +01:00
6a854b541a
Add category filtering
Thus implementing the category parameter on the /transactions path.

Issue #2
2025-04-12 22:27:44 +01:00
5552b0622a
Implement pagination on /transactions
All checks were successful
Go / build (1.21) (pull_request) Successful in 13s
Go / build (1.22) (pull_request) Successful in 12s
Go / build (1.21) (push) Successful in 11s
Go / build (1.22) (push) Successful in 10s
using limit and offset.
While not the best, it's the simpler to implement.

Issue: #11
2025-03-27 21:05:26 +00:00
50e8269120
Support modifying a transaction category
All checks were successful
Go / build (1.22) (pull_request) Successful in 11s
Go / build (1.21) (pull_request) Successful in 11s
Go / build (1.22) (push) Successful in 1m32s
Go / build (1.21) (push) Successful in 1m35s
through the PUT /transactions/{transactionId} method.
The category is also returned on a /transaction(s) call.

Restrict the PUT to changing only the category. The other existing
attributes should remain immutable.
Remove the body of the PUT response, it isn't required, and it was
returning a 204, which shouldn't have it.

This patch also extracts the CategoryName as a separate component on the
OpenAPI spec, so that it can be reused on the Transaction.

Issues #26 and #23
2024-09-13 19:39:24 +01:00
1467250db4
Implements GET /categories
Some checks failed
Go / build (1.21) (pull_request) Successful in 57s
Go / build (1.22) (pull_request) Successful in 55s
Go / build (1.22) (push) Has been cancelled
Go / build (1.21) (push) Has been cancelled
Adds type to OpenAPI. Feature done and tested E2E.
Adds common utilities package named "golang" to overcome language
deficiencies.

Issue #27
2024-09-13 19:18:27 +01:00
24b7fc3254
Fix resources naming scheme
All checks were successful
Go / build (1.21) (pull_request) Successful in 11s
Go / build (1.22) (pull_request) Successful in 11s
Go / build (1.21) (push) Successful in 11s
Go / build (1.22) (push) Successful in 11s
The accepted practice is to retain the collection name even for a single
resource operation, like getting a specific transaction.

Also moves the PUT /transactions to /transactions/{id} which makes it
clearer that it can only be applied to an already created transaction.
2024-08-03 23:23:43 +01:00
ac396ac259
Implements /transactions PUT method
All checks were successful
Go / build (1.21) (push) Successful in 1m33s
Go / build (1.22) (push) Successful in 1m31s
Adds PUT method to OpenAPI spec.

Given that the transaction IDs are generated on server-side, for the PUT
method to remain idempotent, it can only update existing transactions.

It also adds a TransactionExists method on the DAL.

Issue: #20
2024-08-03 22:21:19 +00:00
4c82ca0e2b
Implements /transactions POST method
It adds the method to the OpenAPI spec and generates a new server
config. The requirement for the ID on the Transaction component is
removed, so that it can be reused for insertions.
It also adds two new middlewares, a logging and a spec validator. If a
request does not follow the spec, a 400 is returned immediately.

Issue: #18
2024-06-22 20:11:52 +01:00
26302b78d4
Implements /bank/{id} GET method
The API had to change, the ID of a bank is its shortform name, so it's
a string.

Issue #15
2024-05-18 23:39:58 +01:00
c464247112
Implements /banks GET method
Issue #16
2024-05-18 23:18:30 +01:00
8839dea7f5
Implements /transaction/{id} GET method
Issue #14
2024-05-18 22:50:24 +01:00
a52bca5882
Adapt API implementation with DAL interface
Swap direct access to the DB on the API server with an data abstraction
layer.
Implement each API type converter separately and revert changes to the
auto-generated server implementation types.

Add error return to DAL methods. Implement `Transactions`.

Add tools.go with oapi-codegen and mockgen.
https://www.jvt.me/posts/2022/06/15/go-tools-dependency-management/

Update go packages.

Issues #5, #12
2024-05-12 22:16:24 +01:00
1aa6e28b69
Implement basic /transactions method
Issue #1
2024-03-23 16:51:00 +00:00