common

package
v0.0.0-...-9ed75a2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CartList = []Product{
	Product{
		Name:  "Hammer",
		Price: 9.99,
		ID:    "1",
	},
	Product{
		Name:  "Nail",
		Price: .1,
		ID:    "2",
	},
}

CartList

View Source
var ProductList = []Product{
	Product{
		Name:              "Hammer",
		Price:             9.99,
		ID:                "1",
		QuantityAvailable: 100,
	},
	Product{
		Name:              "Nail",
		Price:             .1,
		ID:                "2",
		QuantityAvailable: 10000,
	},
	Product{
		Name:              "Screw",
		Price:             .12,
		ID:                "3",
		QuantityAvailable: 10000,
	},
	Product{
		Name:              "Corded Drill",
		Price:             98.99,
		ID:                "4",
		QuantityAvailable: 58,
	},
	Product{
		Name:              "Cordless Drill",
		Price:             129.99,
		ID:                "5",
		QuantityAvailable: 62,
	},
	Product{
		Name:              "Screwdriver",
		Price:             12.99,
		ID:                "6",
		QuantityAvailable: 83,
	},
	Product{
		Name:              "Drillbits",
		Price:             21.99,
		ID:                "7",
		QuantityAvailable: 32,
	},
	Product{
		Name:              "Drillbits Jumbo pack",
		Price:             34.99,
		ID:                "8",
		QuantityAvailable: 21,
	},
	Product{
		Name:              "Work Gloves- unisex",
		Price:             8.99,
		ID:                "9",
		QuantityAvailable: 20,
	},
	Product{
		Name:              "Garden gloves- Male",
		Price:             9.99,
		ID:                "10",
		QuantityAvailable: 21,
	},
	Product{
		Name:              "Garden gloves- Female",
		Price:             9.99,
		ID:                "11",
		QuantityAvailable: 21,
	},
}

ProductList

View Source
var ProductMap = make(map[string]Product)
View Source
var Userlist = []User{
	User{
		Name:     "Karthik",
		Password: "helloworld",
		Username: "karthik",
		Token:    "20d15fed-42f4-4a71-b9a3-7c7fee78d38d",
	},
	User{
		Name:     "Tracey",
		Password: "helloworld",
		Username: "tracey",
		Token:    "4d76c945-a946-4d2b-95a8-281aff55404f",
	},
	User{
		Name:     "Carisa",
		Password: "helloworld",
		Username: "carisa",
		Token:    "224b3200-d09b-4881-8a7b-d69d6d8ba543",
	},
	User{
		Name:     "Ernest",
		Password: "helloworld",
		Username: "ernest",
		Token:    "2115274e-34bc-4456-a1ee-1c4c171231a9",
	},
	User{
		Name:     "Amy",
		Password: "helloworld",
		Username: "amy",
		Token:    "5343b1d3-dfa3-4823-b544-e5907c3585f5",
	},
}

Userlist is the list of users

Functions

func CreateProductMap

func CreateProductMap()

func InitTracer

func InitTracer(service string) (opentracing.Tracer, io.Closer)

InitTracer returns an instance of Jaeger Tracer that samples 100% of traces and logs all spans to stdout.

Types

type Product

type Product struct {
	Name              string  `json:"productName"`
	Price             float32 `json:"price"`
	ID                string  `json:"id"`
	QuantityAvailable int     `json:"quantityAvailable"`
}

Products

type User

type User struct {
	Name     string `json:"name"`
	Password string `json:"password"`
	Username string `json:"username"`
	Token    string `json:"token"`
}

User is a user object

Jump to

Keyboard shortcuts

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