Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
AccountId string `db:"account_id"`
CustomerId string `db:"customer_id"`
OpeningDate string `db:"opening_date"`
AccountType string `db:"account_type"`
Amount float64 `db:"amount"`
Status string `db:"status"`
}
func NewAccount ¶
func (Account) CanWithdraw ¶
func (Account) ToNewAccountResponseDto ¶
func (a Account) ToNewAccountResponseDto() *dto.NewAccountResponse
type AccountRepository ¶
type AccountRepositoryDb ¶
type AccountRepositoryDb struct {
// contains filtered or unexported fields
}
func NewAccountRepositoryDb ¶
func NewAccountRepositoryDb(dbClient *sqlx.DB) AccountRepositoryDb
func (AccountRepositoryDb) FindBy ¶
func (d AccountRepositoryDb) FindBy(id string) (*Account, *errs.AppError)
func (AccountRepositoryDb) Save ¶
func (d AccountRepositoryDb) Save(a Account) (*Account, *errs.AppError)
func (AccountRepositoryDb) SaveTransaction ¶
func (d AccountRepositoryDb) SaveTransaction(t Transaction) (*Transaction, *errs.AppError)
type AuthRepository ¶
type Customer ¶
type Customer struct {
Id string `db:"customer_id"`
Name string
City string
Zipcode string
DateOfBirth string `db:"date_of_birth"`
Status string
}
func (Customer) ToDto ¶
func (c Customer) ToDto() dto.CustomerResponse
type CustomerRepository ¶
type CustomerRepositoryDb ¶
type CustomerRepositoryDb struct {
// contains filtered or unexported fields
}
func NewCustomerRepositoryDb ¶
func NewCustomerRepositoryDb(dbClient *sqlx.DB) CustomerRepositoryDb
type CustomerRepositoryStub ¶
type CustomerRepositoryStub struct {
// contains filtered or unexported fields
}
func NewCustomerRepositoryStub ¶
func NewCustomerRepositoryStub() CustomerRepositoryStub
type RemoteAuthRepository ¶
type RemoteAuthRepository struct {
}
func NewAuthRepository ¶
func NewAuthRepository() RemoteAuthRepository
func (RemoteAuthRepository) IsAuthorized ¶
type Transaction ¶
type Transaction struct {
Id string `db:"transaction_id"`
AccountId string `db:"account_id"`
Amount float64 `db:"amount"`
Type string `db:"transaction_type"`
Date string `db:"transaction_date"`
}
func (Transaction) IsWithdrawal ¶
func (t Transaction) IsWithdrawal() bool
func (Transaction) ToNewTransactionResponseDto ¶
func (t Transaction) ToNewTransactionResponseDto() dto.TransactionResponse
type TransactionRepository ¶
type TransactionRepository interface {
Save(Transaction) (*Transaction, *errs.AppError)
}
Click to show internal directories.
Click to hide internal directories.