models

package
v0.0.0-...-99dd86c Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OrderList map[string]*Order
)

The order map

Functions

func AddOrder

func AddOrder(order Order) (orderId string)

func AddOrderToEventHub

func AddOrderToEventHub(orderId string, orderSource string)

AddOrderToEventHub adds it to an event hub

func AddOrderToEventHubAMQPNative

func AddOrderToEventHubAMQPNative(orderId string, orderSource string)

AddOrderToEventHubAMQPNative adds it to an event hub

func AddOrderToMongoDB

func AddOrderToMongoDB(order Order) (orderId string)

AddOrderToMongoDB Add the order to MondoDB

func AddOrderToRabbitMQ

func AddOrderToRabbitMQ(orderId string, orderSource string)

Types

type Order

type Order struct {
	ID                string  `required:"false" description:"CosmoDB ID - will be autogenerated"`
	EmailAddress      string  `required:"true" description:"Email address of the customer"`
	PreferredLanguage string  `required:"false" description:"Preferred Language of the customer"`
	Product           string  `required:"false" description:"Product ordered by the customer"`
	Total             float64 `required:"false" description:"Order total"`
	Source            string  `required:"false" description:"Source backend e.g. App Service, Container instance, K8 cluster etc"`
	Status            string  `required:"true" description:"Order Status"`
}

Order represents the order json

Jump to

Keyboard shortcuts

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