Documentation ¶
Index ¶
- Constants
- type Account
- type AccountRepository
- type AccountRepositoryDb
- type AuthorizationRepository
- type Customer
- type CustomerRepository
- type CustomerRepositoryDB
- type CustomerRepositoryStub
- type QoD
- type QoDRepository
- type RemoteAuthRepository
- type RemoteQoDRepository
- type Transaction
- type TransactionRepository
Constants ¶
View Source
const WITHDRAWAL = "WITHDRAWAL"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Id 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 (Account) ToDto ¶
func (a Account) ToDto() dto.AccountResponse
type AccountRepository ¶
type AccountRepositoryDb ¶
type AccountRepositoryDb struct {
// contains filtered or unexported fields
}
func NewAccountRepositoryDb ¶
func NewAccountRepositoryDb(dbClient *sqlx.DB) AccountRepositoryDb
type AuthorizationRepository ¶
type Customer ¶
type Customer struct { Id string `db:"customer_id"` Name string City string Pincode string `db:"zipcode"` 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 {
Customers []Customer
}
func NewCustomerrepositoryStub ¶
func NewCustomerrepositoryStub() CustomerRepositoryStub
type QoD ¶
type QoD struct { Success struct { Total int `json:"total"` } `json:"success"` Contents struct { Quotes []struct { Quote string `json:"quote"` Length string `json:"length"` Author string `json:"author"` Tags struct { Num0 string `json:"0"` Num1 string `json:"1"` Num2 string `json:"2"` Num3 string `json:"3"` Num5 string `json:"5"` } `json:"tags"` Category string `json:"category"` Language string `json:"language"` Date string `json:"date"` Permalink string `json:"permalink"` ID string `json:"id"` Background string `json:"background"` Title string `json:"title"` } `json:"quotes"` } `json:"contents"` Baseurl string `json:"baseurl"` Copyright struct { Year int `json:"year"` URL string `json:"url"` } `json:"copyright"` }
type QoDRepository ¶
type RemoteAuthRepository ¶
type RemoteAuthRepository struct { }
func NewAuthRepository ¶
func NewAuthRepository() RemoteAuthRepository
func (RemoteAuthRepository) IsAuthorized ¶
type RemoteQoDRepository ¶
type RemoteQoDRepository struct { }
func NewQoDRepository ¶
func NewQoDRepository() RemoteQoDRepository
type Transaction ¶
type Transaction struct { Id string `db:"transaction_id"` AccountId string `db:"account_id"` Amount float64 `db:"amount"` TransactionType string `db:"transaction_type"` Date string `db:"transaction_date"` }
func (Transaction) IsWithdrawal ¶
func (t Transaction) IsWithdrawal() bool
func (Transaction) ToDto ¶
func (t Transaction) ToDto() dto.TransactionResponse
type TransactionRepository ¶
type TransactionRepository interface { Transaction(Transaction) (*Transaction, *errs.AppError) FindBy(string) (*Account, *errs.AppError) }
func NewTransactionRepositoryDb ¶
func NewTransactionRepositoryDb(dbClient *sqlx.DB) TransactionRepository
Click to show internal directories.
Click to hide internal directories.