Compare commits

..

6 Commits

Author SHA1 Message Date
467afae68f
Return category on /transactions
All checks were successful
Go / build (1.21) (pull_request) Successful in 12s
Go / build (1.22) (pull_request) Successful in 11s
Issue #26
2024-09-13 19:21:39 +01:00
9e58641001
Support modifying a transaction category
Some checks failed
Go / build (1.21) (pull_request) Failing after 11s
Go / build (1.22) (pull_request) Failing after 9s
through the PUT /transactions/{transactionId} method.

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:21:19 +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
22668da99a
Adds Go workflow to run UTs on CI
All checks were successful
Go / build (1.22) (pull_request) Successful in 58s
Go / build (1.21) (pull_request) Successful in 1m0s
Go / build (1.21) (push) Successful in 12s
Go / build (1.22) (push) Successful in 10s
It now builds and tests the project w/ Go 1.21 and 1.22.

Issue # 8
2024-06-29 10:58:15 +01:00

28
.github/workflows/go.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.21', '1.22' ]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...