transactions

package
v0.0.0-...-c76d545 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTransaction

func CreateTransaction(c *gin.Context)

CreateTransaction godoc @Summary Create a new transaction @Description Create a new transaction with the given input data @Tags Transactions @Security JwtAuth @Accept json @Produce json @Param input body models.CreateTransaction true "Create transaction object" @Success 201 {object} models.Transaction "Successfully created transaction" @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unauthorized" @Router /transactions [post]

func DeleteTransaction

func DeleteTransaction(c *gin.Context)

DeleteTransaction godoc @Summary Delete a transaction by ID @Description Delete the transaction with the given ID @Tags Transactions @Security JwtAuth @Produce json @Param id path string true "Transaction ID" @Success 202 {object} models.Transaction "Successfully deleted transaction" @Failure 404 {string} string "transaction not found" @Router /transactions/{id} [delete]

func FindTransaction

func FindTransaction(c *gin.Context)

FindTransaction godoc @Summary Find a transaction by ID @Description Get details of a transaction by its ID @Tags Transactions @Security JwtAuth @Produce json @Param id path string true "Transaction ID" @Success 200 {object} models.Transaction "Successfully retrieved transaction" @Failure 404 {string} string "Transaction not found" @Router /transactions/{id} [get]

func FindTransactions

func FindTransactions(c *gin.Context)

FindTransactions godoc @Summary Get all transactions with pagination @Description Get a list of all transactions with optional pagination @Tags Transactions @Security JwtAuth @Produce json @Param offset query int false "Offset for pagination" default(0) @Param limit query int false "Limit for pagination" default(10) @Success 200 {array} models.Transaction "Successfully retrieved list of transactions" @Router /transactions [get]

func UpdateTransaction

func UpdateTransaction(c *gin.Context)

UpdateTransaction godoc @Summary Update a transaction by ID @Description Update the transaction details for the given ID @Tags Transactions @Security JwtAuth @Accept json @Produce json @Param id path string true "Transaction ID" @Param input body models.UpdateTransaction true "Update transaction object" @Success 200 {object} models.Transaction "Successfully updated transaction" @Failure 400 {string} string "Bad Request" @Failure 404 {string} string "transaction not found" @Router /transactions/{id} [put]

Types

This section is empty.

Jump to

Keyboard shortcuts

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