Documentation
¶
Index ¶
- func MapSaldoResponseToDB(s *pbsaldo.SaldoResponse) *db.Saldo
- type CardAdapter
- func (a *CardAdapter) FindCardByCardNumber(ctx context.Context, card_number string) (*db.GetCardByCardNumberRow, error)
- func (a *CardAdapter) FindCardByUserId(ctx context.Context, user_id int) (*db.GetCardByUserIDRow, error)
- func (a *CardAdapter) FindUserCardByCardNumber(ctx context.Context, card_number string) (*db.GetUserEmailByCardNumberRow, error)
- func (a *CardAdapter) UpdateCard(ctx context.Context, request *requests.UpdateCardRequest) (*db.UpdateCardRow, error)
- type MerchantAdapter
- type SaldoAdapter
- func (a *SaldoAdapter) FindByCardNumber(ctx context.Context, card_number string) (*db.Saldo, error)
- func (a *SaldoAdapter) UpdateSaldoBalance(ctx context.Context, request *requests.UpdateSaldoBalance) (*db.UpdateSaldoBalanceRow, error)
- func (a *SaldoAdapter) UpdateSaldoWithdraw(ctx context.Context, request *requests.UpdateSaldoWithdraw) (*db.UpdateSaldoWithdrawRow, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapSaldoResponseToDB ¶
func MapSaldoResponseToDB(s *pbsaldo.SaldoResponse) *db.Saldo
Types ¶
type CardAdapter ¶
type CardAdapter struct {
QueryClient pbcard.CardQueryServiceClient
CommandClient pbcard.CardCommandServiceClient
}
func NewCardAdapter ¶
func NewCardAdapter(queryClient pbcard.CardQueryServiceClient, commandClient pbcard.CardCommandServiceClient) *CardAdapter
func (*CardAdapter) FindCardByCardNumber ¶
func (a *CardAdapter) FindCardByCardNumber(ctx context.Context, card_number string) (*db.GetCardByCardNumberRow, error)
func (*CardAdapter) FindCardByUserId ¶
func (a *CardAdapter) FindCardByUserId(ctx context.Context, user_id int) (*db.GetCardByUserIDRow, error)
func (*CardAdapter) FindUserCardByCardNumber ¶
func (a *CardAdapter) FindUserCardByCardNumber(ctx context.Context, card_number string) (*db.GetUserEmailByCardNumberRow, error)
func (*CardAdapter) UpdateCard ¶
func (a *CardAdapter) UpdateCard(ctx context.Context, request *requests.UpdateCardRequest) (*db.UpdateCardRow, error)
type MerchantAdapter ¶
type MerchantAdapter struct {
QueryClient pbmerchant.MerchantQueryServiceClient
}
func NewMerchantAdapter ¶
func NewMerchantAdapter(queryClient pbmerchant.MerchantQueryServiceClient) *MerchantAdapter
func (*MerchantAdapter) FindByApiKey ¶
func (a *MerchantAdapter) FindByApiKey(ctx context.Context, api_key string) (*db.GetMerchantByApiKeyRow, error)
type SaldoAdapter ¶
type SaldoAdapter struct {
QueryClient pbsaldo.SaldoQueryServiceClient
CommandClient pbsaldo.SaldoCommandServiceClient
}
func NewSaldoAdapter ¶
func NewSaldoAdapter(queryClient pbsaldo.SaldoQueryServiceClient, commandClient pbsaldo.SaldoCommandServiceClient) *SaldoAdapter
func (*SaldoAdapter) FindByCardNumber ¶
func (*SaldoAdapter) UpdateSaldoBalance ¶
func (a *SaldoAdapter) UpdateSaldoBalance(ctx context.Context, request *requests.UpdateSaldoBalance) (*db.UpdateSaldoBalanceRow, error)
func (*SaldoAdapter) UpdateSaldoWithdraw ¶
func (a *SaldoAdapter) UpdateSaldoWithdraw(ctx context.Context, request *requests.UpdateSaldoWithdraw) (*db.UpdateSaldoWithdrawRow, error)
Click to show internal directories.
Click to hide internal directories.