Skip to content

Commit 40b2414

Browse files
committed
Minor fixes
1 parent 9dfa8de commit 40b2414

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

app/account/params.go

Lines changed: 0 additions & 1 deletion
This file was deleted.

app/ports/params.go

Lines changed: 0 additions & 1 deletion
This file was deleted.

app/ports/transactor.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package ports
22

3+
/**
4+
ports is definitely not the best name for this package.
5+
*/
6+
37
import (
48
"simple-mpesa/app/customer"
59
"simple-mpesa/app/models"
@@ -8,6 +12,11 @@ import (
812
"github.com/gofrs/uuid"
913
)
1014

15+
// TransactorPort is not a good name. Its function is to expose an interface to the application layer that it
16+
// can use to perform transactions.
17+
//
18+
// To keep the Transaction context clean from a dependency of the agent, merchant and subscriber contexts,
19+
// i chose to create this port separately.
1120
type TransactorPort interface {
1221
Deposit(depositor models.TxnCustomer, customerNumber string, customerType models.UserType, amount models.Shillings) error
1322
Transfer(source models.TxnCustomer, destAccNumber string, destCustomerType models.UserType, amount models.Shillings) error

app/storage/postgres/migrations.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ func Migrate(database *storage.Database) {
1616
models.Agent{},
1717
models.Merchant{},
1818
models.Subscriber{},
19-
models.User{},
2019
models.Account{},
2120
models.Transaction{},
2221
statement.Statement{},

0 commit comments

Comments
 (0)