adapter

package
v1.0.28 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 (a *SaldoAdapter) FindByCardNumber(ctx context.Context, card_number string) (*db.Saldo, error)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL