Luís Murta a6a350c901
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-05-28 21:59:23 +01:00

14 lines
466 B
Go

package dal
import "git.rosemyrtle.work/personal-finance/server/internal/entity"
type DAL interface {
Transaction(transactionId int64) (*entity.Transaction, error)
Transactions() (entity.Transactions, error)
InsertTransaction(entity.Transaction) (entity.Transaction, error)
Bank(bankId string) (*entity.Bank, error)
Banks() (entity.Banks, error)
}
//go:generate go run go.uber.org/mock/mockgen@latest -destination=../mock/mock_dal.gen.go -package=mock . DAL