Luís Murta 7f97e784b6
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
feat: implement X-Total-Count header
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

17 lines
666 B
Go

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