using limit and offset. While not the best, it's the simpler to implement. Issue: #11
17 lines
642 B
Go
17 lines
642 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) (entity.Transactions, 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
|