Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { *handler.BaseHandler // contains filtered or unexported fields }
func (*Handler) GetTransactionsByAccountID ¶
func (*Handler) InitAPI ¶
func (h *Handler) InitAPI(router *gin.RouterGroup)
type ListResponse ¶
type ListResponse struct { Transactions []Response `json:"transactions"` Range pagination.ListRange `json:"range"` }
func NewListResponse ¶
func NewListResponse( transactions []transaction.Transaction, params pagination.Params, count int, ) ListResponse
type Response ¶
type Response struct { TransactionID int64 `json:"transaction_id"` Type string `json:"type"` SenderID int64 `json:"sender_id"` ReceiverID int64 `json:"receiver_id"` Amount int64 `json:"amount"` Description string `json:"description"` CreatedAt time.Time `json:"created_at"` }
func NewResponse ¶
func NewResponse(transaction transaction.Transaction) Response
type Service ¶
type Service interface { GetTransactionsByAccountID( ctx context.Context, accountID int64, listParams transaction.ListParams, ) ([]transaction.Transaction, int, error) }
Click to show internal directories.
Click to hide internal directories.