models

package
v0.0.0-...-07eec0b Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOrderToAMQP

func AddOrderToAMQP(orderId string) bool

AddOrderToAMQP Adds the order to AMQP (Service Bus Queue)

func AddOrderToMongoDB

func AddOrderToMongoDB(order Order) (string, error)

AddOrderToMongoDB Adds the order to MongoDB/CosmosDB

func GetNumberOfOrdersInDB

func GetNumberOfOrdersInDB() (int, error)

GetNumberOfOrdersInDB

func ReadMongoPasswordFromSecret

func ReadMongoPasswordFromSecret(file string) (string, error)

ReadMongoPasswordFromSecret reads the mongo password from the flexvol mount if present

Types

type Order

type Order struct {
	ID           bson.ObjectId `json:"id" bson:"_id,omitempty"`
	EmailAddress string        `json:"emailAddress"`
	Product      string        `json:"product"`
	Total        float64       `json:"total"`
	Status       string        `json:"status"`
}

Order represents the order json

Jump to

Keyboard shortcuts

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