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
14 lines
435 B
Go
14 lines
435 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 mockgen -destination=../mock/mock_dal.gen.go -package=mock . DAL
|