transactionapimapper

package
v1.0.29 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTransactionCommandResponseMapper

func NewTransactionCommandResponseMapper() *transactionCommandResponseMapper

func NewTransactionStatsAmountResponseMapper

func NewTransactionStatsAmountResponseMapper() *transactionStatsAmountResponseMapper

NewTransactionStatsAmountResponseMapper creates a new instance of transactionStatsAmountResponseMapper. It returns a pointer to a transactionStatsAmountResponseMapper which implements the TransactionStatsAmountResponseMapper interface for mapping database rows to domain models.

Types

type TransactionBaseResponseMapper

type TransactionBaseResponseMapper interface {
	// Converts a single transaction response into an API response.
	ToApiResponseTransaction(pbResponse *pb.ApiResponseTransaction) *response.ApiResponseTransaction
}

type TransactionCommandResponseMapper

type TransactionCommandResponseMapper interface {
	TransactionBaseResponseMapper

	ToApiResponseTransactionDeleteAt(pbResponse *pb.ApiResponseTransactionDeleteAt) *response.ApiResponseTransactionDeleteAt

	// Converts a deleted transaction response into an API response.
	ToApiResponseTransactionDelete(pbResponse *pb.ApiResponseTransactionDelete) *response.ApiResponseTransactionDelete

	// Converts all transaction records into a general API response.
	ToApiResponseTransactionAll(pbResponse *pb.ApiResponseTransactionAll) *response.ApiResponseTransactionAll
}

type TransactionQueryResponseMapper

type TransactionQueryResponseMapper interface {
	TransactionBaseResponseMapper

	// Converts multiple transaction responses into a grouped API response.
	ToApiResponseTransactions(pbResponse *pb.ApiResponseTransactions) *response.ApiResponseTransactions

	// Converts paginated transaction results into an API response.
	ToApiResponsePaginationTransaction(pbResponse *pb.ApiResponsePaginationTransaction) *response.ApiResponsePaginationTransaction

	// Converts paginated soft-deleted transaction results into an API response.
	ToApiResponsePaginationTransactionDeleteAt(pbResponse *pb.ApiResponsePaginationTransactionDeleteAt) *response.ApiResponsePaginationTransactionDeleteAt
}

func NewTransactionQueryResponseMapper

func NewTransactionQueryResponseMapper() TransactionQueryResponseMapper

type TransactionResponseMapper

type TransactionResponseMapper interface {
	QueryMapper() TransactionQueryResponseMapper
	CommandMapper() TransactionCommandResponseMapper
	StatusStatsMapper() TransactionStatsStatusResponseMapper
	MethodStatsMapper() TransactionStatsMethodResponseMapper
	AmountStatsMapper() TransactionStatsAmountResponseMapper
}

func NewTransactionResponseMapper

func NewTransactionResponseMapper() TransactionResponseMapper

type TransactionStatsAmountResponseMapper

type TransactionStatsAmountResponseMapper interface {
	// Converts monthly transaction amount statistics into an API response.
	ToApiResponseTransactionMonthAmount(pbResponse *pbstats.ApiResponseTransactionMonthAmount) *response.ApiResponseTransactionMonthAmount

	// Converts yearly transaction amount statistics into an API response.
	ToApiResponseTransactionYearAmount(pbResponse *pbstats.ApiResponseTransactionYearAmount) *response.ApiResponseTransactionYearAmount
}

type TransactionStatsMethodResponseMapper

type TransactionStatsMethodResponseMapper interface {
	// Converts monthly transaction statistics grouped by payment method into an API response.
	ToApiResponseTransactionMonthMethod(pbResponse *pbstats.ApiResponseTransactionMonthMethod) *response.ApiResponseTransactionMonthMethod

	// Converts yearly transaction statistics grouped by payment method into an API response.
	ToApiResponseTransactionYearMethod(pbResponse *pbstats.ApiResponseTransactionYearMethod) *response.ApiResponseTransactionYearMethod
}

func NewTransactionStatsMethodResponseMapper

func NewTransactionStatsMethodResponseMapper() TransactionStatsMethodResponseMapper

type TransactionStatsStatusResponseMapper

type TransactionStatsStatusResponseMapper interface {
	// Converts monthly transaction stats with success status into an API response.
	ToApiResponseTransactionMonthStatusSuccess(pbResponse *pbstats.ApiResponseTransactionMonthStatusSuccess) *response.ApiResponseTransactionMonthStatusSuccess

	// Converts yearly transaction stats with success status into an API response.
	ToApiResponseTransactionYearStatusSuccess(pbResponse *pbstats.ApiResponseTransactionYearStatusSuccess) *response.ApiResponseTransactionYearStatusSuccess

	// Converts monthly transaction stats with failed status into an API response.
	ToApiResponseTransactionMonthStatusFailed(pbResponse *pbstats.ApiResponseTransactionMonthStatusFailed) *response.ApiResponseTransactionMonthStatusFailed

	// Converts yearly transaction stats with failed status into an API response.
	ToApiResponseTransactionYearStatusFailed(pbResponse *pbstats.ApiResponseTransactionYearStatusFailed) *response.ApiResponseTransactionYearStatusFailed
}

func NewTransactionStatsStatusResponseMapper

func NewTransactionStatsStatusResponseMapper() TransactionStatsStatusResponseMapper

Jump to

Keyboard shortcuts

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