Luís Murta 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

13 lines
334 B
Go

package dal
import "git.rosemyrtle.work/personal-finance/server/internal/entity"
type DAL interface {
Transaction() (entity.Transaction, error)
Transactions() (entity.Transactions, error)
Bank() (entity.Bank, error)
Banks() (entity.Banks, error)
}
//go:generate mockgen -destination=../mock/mock_dal.gen.go -package=mock . DAL