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"` UserId string `db:"customer_id"` OpeningDate string `db:"opening_date"` AccountType string `db:"account_type"` Amount float64 `db:"amount"` Status string `db:"status"` }
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(accountId string) (*Account, *errs.AppError)
func (AccountRepositoryDb) Save ¶
func (d AccountRepositoryDb) Save(a Account) (*Account, *errs.AppError)
func (AccountRepositoryDb) SaveTransactions ¶
func (d AccountRepositoryDb) SaveTransactions(t Transaction) (*Transaction, *errs.AppError)
type Transaction ¶
type Transaction struct { TransactionId string AccountId string Amount float64 TransactionType string TransactionDate string }
func (Transaction) ToDto ¶
func (t Transaction) ToDto() dto.TransactionResponse
type User ¶
type User struct { Id string `json:"id" xml:"id" db:"customer_id"` Name string `json:"name" xml:"name"` City string `json:"city" xml:"city"` Zipcode string `json:"zipcode" xml:"zipcode"` DateOfBirth string `json:"dateofbirth" xml:"dateofbirth" db:"date_of_birth"` Status string `json:"status" xml:"status"` }
model
func (User) ToDto ¶
func (u User) ToDto() dto.UserResponse
type UserRepository ¶
type UserRepositoryDb ¶
type UserRepositoryDb struct {
// contains filtered or unexported fields
}
func NewUserRepositoryDb ¶
func NewUserRepositoryDb(dbClient *sqlx.DB) UserRepositoryDb
func (UserRepositoryDb) ByStatus ¶
func (d UserRepositoryDb) ByStatus(status int) ([]User, *errs.AppError)
func (UserRepositoryDb) GetAllUsers ¶
func (d UserRepositoryDb) GetAllUsers() ([]User, *errs.AppError)
type UserRepositoryStub ¶
type UserRepositoryStub struct {
// contains filtered or unexported fields
}
mock adapter stub is placeholder that simulates the input
func NewUserRepositoryStub ¶
func NewUserRepositoryStub() UserRepositoryStub
func (UserRepositoryStub) GetAllUsers ¶
func (u UserRepositoryStub) GetAllUsers() ([]User, error)
Click to show internal directories.
Click to hide internal directories.