Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SirWaithaka committed Nov 15, 2020
1 parent 9dfa8de commit 40b2414
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion app/account/params.go

This file was deleted.

1 change: 0 additions & 1 deletion app/ports/params.go

This file was deleted.

9 changes: 9 additions & 0 deletions app/ports/transactor.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package ports

/**
ports is definitely not the best name for this package.
*/

import (
"simple-mpesa/app/customer"
"simple-mpesa/app/models"
Expand All @@ -8,6 +12,11 @@ import (
"github.com/gofrs/uuid"
)

// TransactorPort is not a good name. Its function is to expose an interface to the application layer that it
// can use to perform transactions.
//
// To keep the Transaction context clean from a dependency of the agent, merchant and subscriber contexts,
// i chose to create this port separately.
type TransactorPort interface {
Deposit(depositor models.TxnCustomer, customerNumber string, customerType models.UserType, amount models.Shillings) error
Transfer(source models.TxnCustomer, destAccNumber string, destCustomerType models.UserType, amount models.Shillings) error
Expand Down
1 change: 0 additions & 1 deletion app/storage/postgres/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ func Migrate(database *storage.Database) {
models.Agent{},
models.Merchant{},
models.Subscriber{},
models.User{},
models.Account{},
models.Transaction{},
statement.Statement{},
Expand Down

0 comments on commit 40b2414

Please sign in to comment.