Documentation
¶
Index ¶
- func NewTransactionCommandResponseMapper() *transactionCommandResponseMapper
- func NewTransactionStatsAmountResponseMapper() *transactionStatsAmountResponseMapper
- type TransactionBaseResponseMapper
- type TransactionCommandResponseMapper
- type TransactionQueryResponseMapper
- type TransactionResponseMapper
- type TransactionStatsAmountResponseMapper
- type TransactionStatsMethodResponseMapper
- type TransactionStatsStatusResponseMapper
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 ¶ added in v1.0.13
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 *pb.ApiResponseTransactionMonthAmount) *response.ApiResponseTransactionMonthAmount
// Converts yearly transaction amount statistics into an API response.
ToApiResponseTransactionYearAmount(pbResponse *pb.ApiResponseTransactionYearAmount) *response.ApiResponseTransactionYearAmount
}
type TransactionStatsMethodResponseMapper ¶
type TransactionStatsMethodResponseMapper interface {
// Converts monthly transaction statistics grouped by payment method into an API response.
ToApiResponseTransactionMonthMethod(pbResponse *pb.ApiResponseTransactionMonthMethod) *response.ApiResponseTransactionMonthMethod
// Converts yearly transaction statistics grouped by payment method into an API response.
ToApiResponseTransactionYearMethod(pbResponse *pb.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 *pb.ApiResponseTransactionMonthStatusSuccess) *response.ApiResponseTransactionMonthStatusSuccess
// Converts yearly transaction stats with success status into an API response.
ToApiResponseTransactionYearStatusSuccess(pbResponse *pb.ApiResponseTransactionYearStatusSuccess) *response.ApiResponseTransactionYearStatusSuccess
// Converts monthly transaction stats with failed status into an API response.
ToApiResponseTransactionMonthStatusFailed(pbResponse *pb.ApiResponseTransactionMonthStatusFailed) *response.ApiResponseTransactionMonthStatusFailed
// Converts yearly transaction stats with failed status into an API response.
ToApiResponseTransactionYearStatusFailed(pbResponse *pb.ApiResponseTransactionYearStatusFailed) *response.ApiResponseTransactionYearStatusFailed
}
func NewTransactionStatsStatusResponseMapper ¶
func NewTransactionStatsStatusResponseMapper() TransactionStatsStatusResponseMapper
Click to show internal directories.
Click to hide internal directories.