cardapimapper

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCardResponseMapper

func NewCardResponseMapper() *cardResponseMapper

Types

type CardBaseResponseMapper

type CardBaseResponseMapper interface {
	// ToApiResponseCard maps a single gRPC card response to an HTTP API response.
	ToApiResponseCard(card *pb.ApiResponseCard) *response.ApiResponseCard
}

type CardCommandResponseMapper

type CardCommandResponseMapper interface {
	CardBaseResponseMapper

	ToApiResponseCardDeleteAt(card *pb.ApiResponseCardDeleteAt) *response.ApiResponseCardDeleteAt

	ToApiResponseCardDelete(card *pb.ApiResponseCardDelete) *response.ApiResponseCardDelete

	// ToApiResponseCardAll maps a gRPC response containing all cards
	// to an HTTP API response format.
	ToApiResponseCardAll(card *pb.ApiResponseCardAll) *response.ApiResponseCardAll
}

func NewCardCommandResponseMapper

func NewCardCommandResponseMapper() CardCommandResponseMapper

type CardDashboardResponseMapper

type CardDashboardResponseMapper interface {
	// ToApiResponseDashboardCard maps a gRPC response of general card dashboard statistics
	// to an HTTP API response.
	ToApiResponseDashboardCard(dash *pb.ApiResponseDashboardCard) *response.ApiResponseDashboardCard

	// ToApiResponseDashboardCardCardNumber maps a gRPC response of card-number-specific dashboard statistics
	// to an HTTP API response.
	ToApiResponseDashboardCardCardNumber(dash *pb.ApiResponseDashboardCardNumber) *response.ApiResponseDashboardCardNumber
}

func NewCardDashboardResponseMapper

func NewCardDashboardResponseMapper() CardDashboardResponseMapper

NewCardDashboardResponseMapper returns a new instance of a CardDashboardResponseMapper.

This function can be used to create a new instance of a CardDashboardResponseMapper for mapping a protobuf message of ApiResponseDashboardCard to an API response of ApiResponseDashboardCard and ApiResponseDashboardCardNumber.

type CardQueryResponseMapper

type CardQueryResponseMapper interface {
	CardBaseResponseMapper

	// ToApiResponsesCard maps a paginated list of gRPC card responses
	// to a paginated HTTP API response.
	ToApiResponsesCard(cards *pb.ApiResponsePaginationCard) *response.ApiResponsePaginationCard

	// ToApiResponsesCardDeletedAt maps a paginated list of soft-deleted gRPC cards
	// to a paginated HTTP API response.
	ToApiResponsesCardDeletedAt(cards *pb.ApiResponsePaginationCardDeleteAt) *response.ApiResponsePaginationCardDeleteAt
}

func NewCardQueryResponseMapper

func NewCardQueryResponseMapper() CardQueryResponseMapper

type CardStatsAmountResponseMapper

type CardStatsAmountResponseMapper interface {
	// ToApiResponseMonthlyAmounts maps a gRPC response containing monthly financial amounts
	// (e.g., top-up, withdrawal, transaction) to an HTTP API response format.
	ToApiResponseMonthlyAmounts(cards *pb.ApiResponseMonthlyAmount) *response.ApiResponseMonthlyAmount

	// ToApiResponseYearlyAmounts maps a gRPC response containing yearly financial amounts
	// (e.g., top-up, withdrawal, transaction) to an HTTP API response format.
	ToApiResponseYearlyAmounts(cards *pb.ApiResponseYearlyAmount) *response.ApiResponseYearlyAmount
}

func NewCardStatsAmountResponseMapper

func NewCardStatsAmountResponseMapper() CardStatsAmountResponseMapper

NewCardStatsAmountResponseMapper creates a new instance of CardStatsAmountResponseMapper.

It returns a pointer to a cardStatsAmountResponseMapper which implements the CardStatsAmountResponseMapper interface for mapping database rows to domain models.

type CardStatsBalanceResponseMapper

type CardStatsBalanceResponseMapper interface {
	// ToApiResponseMonthlyBalances maps a gRPC response containing monthly balance statistics
	// to an HTTP API response format.
	ToApiResponseMonthlyBalances(cards *pb.ApiResponseMonthlyBalance) *response.ApiResponseMonthlyBalance

	// ToApiResponseYearlyBalances maps a gRPC response containing yearly balance statistics
	// to an HTTP API response format.
	ToApiResponseYearlyBalances(cards *pb.ApiResponseYearlyBalance) *response.ApiResponseYearlyBalance
}

func NewCardStatsBalanceResponseMapper

func NewCardStatsBalanceResponseMapper() CardStatsBalanceResponseMapper

NewCardStatsBalanceResponseMapper creates a new instance of CardStatisticBalanceResponseMapper.

It returns a pointer to a cardStatsBalanceResponseMapper which implements the CardStatisticBalanceResponseMapper interface for mapping database rows to domain models.

Jump to

Keyboard shortcuts

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