MCPcopy Create free account

hub / github.com/ashishjuyal/banking / functions

Functions60 in github.com/ashishjuyal/banking

↓ 12 callersFunctionwriteResponse
(w http.ResponseWriter, code int, data interface{})
app/customerHandlers.go:39
↓ 4 callersMethodNewAccount
(request dto.NewAccountRequest)
service/accountService.go:13
↓ 4 callersMethodValidate
()
dto/transaction.go:24
↓ 3 callersMethodGetAllCustomer
(string)
service/customerService.go:11
↓ 3 callersFunctionNewAccountService
(repo domain.AccountRepository)
service/accountService.go:64
↓ 3 callersMethodSave
(account Account)
domain/account.go:25
↓ 3 callersMethodToDto
()
domain/customer.go:25
↓ 2 callersMethodIsTransactionTypeWithdrawal
()
dto/transaction.go:16
↓ 2 callersFunctionsetup
(t *testing.T)
service/accountService_test.go:31
↓ 2 callersFunctionsetup
(t *testing.T)
app/customerHandlers_test.go:18
↓ 1 callersMethodById
(string)
domain/customer.go:38
↓ 1 callersMethodCanWithdraw
(amount float64)
domain/account.go:30
↓ 1 callersMethodFindAll
(status string)
domain/customer.go:37
↓ 1 callersMethodFindBy
(accountId string)
domain/account.go:27
↓ 1 callersMethodFindBy
(accountId string)
domain/AccountRepositoryDb.go:86
↓ 1 callersMethodGetCustomer
(string)
service/customerService.go:12
↓ 1 callersMethodIsAuthorized
(token string, routeName string, vars map[string]string)
domain/authRepository.go:12
↓ 1 callersMethodIsTransactionTypeDeposit
()
dto/transaction.go:20
↓ 1 callersMethodIsWithdrawal
()
domain/transaction.go:15
↓ 1 callersMethodMakeTransaction
(request dto.TransactionRequest)
service/accountService.go:14
↓ 1 callersFunctionNewAccount
(customerId, accountType string, amount float64)
domain/account.go:37
↓ 1 callersFunctionNewAccountRepositoryDb
(dbClient *sqlx.DB)
domain/AccountRepositoryDb.go:97
↓ 1 callersFunctionNewAuthRepository
()
domain/authRepository.go:57
↓ 1 callersFunctionNewCustomerRepositoryDb
(dbClient *sqlx.DB)
domain/CustomerRepositoryDb.go:51
↓ 1 callersFunctionNewCustomerService
(repository domain.CustomerRepository)
service/customerService.go:47
↓ 1 callersMethodSaveTransaction
(transaction Transaction)
domain/account.go:26
↓ 1 callersMethodSaveTransaction
** * transaction = make an entry in the transaction table + update the balance in the accounts table */
domain/AccountRepositoryDb.go:35
↓ 1 callersFunctionStart
()
app/app.go:33
↓ 1 callersMethodToNewAccountResponseDto
()
domain/account.go:19
↓ 1 callersMethodauthorizationHandler
()
app/authMiddleware.go:15
↓ 1 callersFunctionbuildVerifyURL
* This will generate a url for token verification in the below format /auth/verify?token={token string} &routeName={current route n
domain/authRepository.go:45
↓ 1 callersFunctiongetDbClient
()
app/app.go:75
↓ 1 callersFunctiongetTokenFromHeader
(header string)
app/authMiddleware.go:40
↓ 1 callersFunctionsanityCheck
()
app/app.go:16
↓ 1 callersMethodstatusAsText
()
domain/customer.go:17
MethodById
(id string)
domain/CustomerRepositoryDb.go:35
MethodFindAll
()
domain/customerRepositoryStub.go:7
MethodFindAll
(status string)
domain/CustomerRepositoryDb.go:15
MethodGetAllCustomer
(status string)
service/customerService.go:19
MethodGetCustomer
(id string)
service/customerService.go:38
MethodIsAuthorized
(token string, routeName string, vars map[string]string)
domain/authRepository.go:18
MethodMakeTransaction
(req dto.TransactionRequest)
service/accountService.go:33
MethodMakeTransaction
customers/2000/accounts/90720
app/accountHandler.go:34
MethodNewAccount
(req dto.NewAccountRequest)
service/accountService.go:21
MethodNewAccount
(w http.ResponseWriter, r *http.Request)
app/accountHandler.go:15
FunctionNewCustomerRepositoryStub
()
domain/customerRepositoryStub.go:11
MethodSave
(a Account)
domain/AccountRepositoryDb.go:14
FunctionTest_should_return_a_validation_error_response_when_the_request_is_not_validated
(t *testing.T)
service/accountService_test.go:12
FunctionTest_should_return_an_error_from_the_server_side_if_the_new_account_cannot_be_created
(t *testing.T)
service/accountService_test.go:41
FunctionTest_should_return_customers_with_status_code_200
(t *testing.T)
app/customerHandlers_test.go:30
FunctionTest_should_return_error_when_amount_is_less_than_zero
(t *testing.T)
dto/transaction_test.go:26
FunctionTest_should_return_error_when_transaction_type_is_not_deposit_or_withdrawl
(t *testing.T)
dto/transaction_test.go:8
FunctionTest_should_return_new_account_response_when_a_new_account_is_saved_successfully
(t *testing.T)
service/accountService_test.go:69
FunctionTest_should_return_status_code_500_with_error_message
(t *testing.T)
app/customerHandlers_test.go:52
FunctionTest_should_rollback_transaction_in_case_of_failure
(t *testing.T)
domain/AccountRepositoryDb_test.go:10
MethodToDto
()
domain/transaction.go:22
MethodValidate
()
dto/newAccountRequest.go:14
MethodgetAllCustomers
(w http.ResponseWriter, r *http.Request)
app/customerHandlers.go:14
MethodgetCustomer
(w http.ResponseWriter, r *http.Request)
app/customerHandlers.go:27
Functionmain
()
main.go:7