Compare commits

..

3 Commits

Author SHA1 Message Date
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 ./...