rmq

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(host string) (*amqp.Connection, *amqp.Channel)

func Consume

func Consume(channel *amqp.Channel, channelName string, queueName string, routingKey string) <-chan amqp.Delivery

func Publish

func Publish(channel *amqp.Channel, channelName string, routingKey string, body []byte)

func Queue

func Queue(channel *amqp.Channel, channelName string, queueName string, routingKey string)

Types

type Inbound

type Inbound struct {
	BU      string           `json:"bu"`
	Data    []InboundBarcode `json:"data"`
	TraceID *string          `json:"trace_uuid"`
}

func ParseInbound

func ParseInbound(raw *[]byte) Inbound

type InboundBarcode

type InboundBarcode struct {
	Barcode   string `json:"barcode"`
	StoreCode string `json:"loc"`
	SKU       string `json:"sku"`
}

type Outbound

type Outbound struct {
	Ack     bool        `json:"ack"`
	Store   int         `json:"store"`
	SKU     int         `json:"sku"`
	Missing *[]string   `json:"missing,omitempty"`
	Result  interface{} `json:"result"`
}

type RMQInbound

type RMQInbound struct {
	Host    string `json:"host"`
	Queue   string `json:"queue"`
	Channel string `json:"channel"`
}

func ParseRMQInbound

func ParseRMQInbound(raw []byte) RMQInbound

type RMQOutbound

type RMQOutbound struct {
	Host    string       `json:"host"`
	Publish []RMQPublish `json:"publish"`
}

func ParseRMQOutbound

func ParseRMQOutbound(raw []byte) []RMQOutbound

type RMQPublish

type RMQPublish struct {
	Queue   string `json:"queue"`
	Channel string `json:"channel"`
	Route   string `json:"route"`
}

Jump to

Keyboard shortcuts

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