rabbit

package
v0.0.0-...-7dc96ab Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrChannelNotInitialized = errors.NewCustom(400, "Channel not initialized")

ErrChannelNotInitialized Rabbit channel could not be initialized

Functions

func EmitOrderPlaced

func EmitOrderPlaced(data *events.Event) error

*

*
* @api {topic} order/order-placed Orden Creada
*
* @apiGroup RabbitMQ POST
*
* @apiDescription Envía de mensajes order-placed desde Order con el topic "order_placed".
*
* @apiSuccessExample {json} Mensaje
*     {
*     "type": "order-placed",
*     "message" : {
*         "cartId": "{cartId}",
*         "orderId": "{orderId}"
*         "articles": [{
*              "articleId": "{article id}"
*              "quantity" : {quantity}
*          }, ...]
*        }
*     }
*

func Init

func Init()

func SendArticleValidation

func SendArticleValidation(data ArticleValidationData) error

*

*
* @api {direct} cart/article-data Validación de Artículos
*
* @apiGroup RabbitMQ POST
*
* @apiDescription Antes de iniciar las operaciones se validan los artículos contra el catalogo.
*
* @apiSuccessExample {json} Mensaje
*     {
*     "type": "article-data",
*     "message" : {
*         "cartId": "{cartId}",
*         "articleId": "{articleId}",
*        }
*     }

Types

type ArticleValidationData

type ArticleValidationData struct {
	ReferenceId string `json:"referenceId"`

	ArticleId string `json:"articleId"`
}

Jump to

Keyboard shortcuts

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