document_suite

package
v0.13.0-rc.17 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChildItemsCollection = document.Collection{
	Name: "items",
	Parent: &document.Key{
		Collection: &document.Collection{Name: "parentItems"},
		Id:         "1",
	},
}
View Source
var Customer1 = Customer{
	Key: document.Key{
		Collection: &document.Collection{Name: "customers"},
		Id:         "1000",
	},
	Content: map[string]interface{}{
		"testName":  "CustomerItem1",
		"firstName": "John",
		"lastName":  "Smith",
		"email":     "jsmith@server.com",
		"country":   "AU",
		"age":       "40",
	},
	Orders: []Order{
		{
			Key: document.Key{
				Collection: &document.Collection{
					Name: "orders",
					Parent: &document.Key{
						Collection: &document.Collection{Name: "customers"},
						Id:         "1000",
					},
				},
				Id: "501",
			},
			Content: map[string]interface{}{
				"testName": "OrderItem1",
				"sku":      "ABC-501",
				"type":     "bike/mountain",
				"number":   "1",
				"price":    "14.95",
			},
		},
		{
			Key: document.Key{
				Collection: &document.Collection{
					Name: "orders",
					Parent: &document.Key{
						Collection: &document.Collection{Name: "customers"},
						Id:         "1000",
					},
				},
				Id: "502",
			},
			Content: map[string]interface{}{
				"testName": "OrderItem2",
				"sku":      "ABC-502",
				"type":     "bike/road",
				"number":   "2",
				"price":    "19.95",
			},
		},
		{
			Key: document.Key{
				Collection: &document.Collection{
					Name: "orders",
					Parent: &document.Key{
						Collection: &document.Collection{Name: "customers"},
						Id:         "1000",
					},
				},
				Id: "503",
			},
			Content: map[string]interface{}{
				"testName": "OrderItem3",
				"sku":      "ABC-503",
				"type":     "scooter/electric",
				"number":   "3",
				"price":    "124.95",
			},
		},
	},
	Reviews: []Review{
		{
			Key: document.Key{
				Collection: &document.Collection{
					Name: "reviews",
					Parent: &document.Key{
						Collection: &document.Collection{Name: "customers"},
						Id:         "1000",
					},
				},
				Id: "300",
			},
			Content: map[string]interface{}{
				"title": "Good review",
				"stars": "5",
			},
		},
	},
}
View Source
var Customer2 = Customer{
	Key: document.Key{
		Collection: &document.Collection{Name: "customers"},
		Id:         "2000",
	},
	Content: map[string]interface{}{
		"testName":  "CustomerItem2",
		"firstName": "David",
		"lastName":  "Adams",
		"email":     "dadams@server.com",
		"country":   "US",
		"age":       "20",
	},
	Orders: []Order{
		{
			Key: document.Key{
				Collection: &document.Collection{
					Name: "orders",
					Parent: &document.Key{
						Collection: &document.Collection{Name: "customers"},
						Id:         "2000",
					},
				},
				Id: "504",
			},
			Content: map[string]interface{}{
				"testName": "OrderItem4",
				"sku":      "ABC-504",
				"type":     "bike/hybrid",
				"number":   "1",
				"price":    "229.95",
			},
		},
		{
			Key: document.Key{
				Collection: &document.Collection{
					Name: "orders",
					Parent: &document.Key{
						Collection: &document.Collection{Name: "customers"},
						Id:         "2000",
					},
				},
				Id: "505",
			},
			Content: map[string]interface{}{
				"testName": "OrderItem5",
				"sku":      "ABC-505",
				"type":     "scooter/manual",
				"number":   "2",
				"price":    "9.95",
			},
		},
	},
}
View Source
var CustomersColl = document.Collection{Name: "customers"}
View Source
var CustomersKey = document.Key{
	Collection: &document.Collection{Name: "customers"},
}
View Source
var Items = []Item{
	{
		Key:     document.Key{Collection: &document.Collection{Name: "items"}, Id: "01"},
		Content: map[string]interface{}{"letter": "A"},
	},
	{
		Key:     document.Key{Collection: &document.Collection{Name: "items"}, Id: "02"},
		Content: map[string]interface{}{"letter": "B"},
	},
	{
		Key:     document.Key{Collection: &document.Collection{Name: "items"}, Id: "03"},
		Content: map[string]interface{}{"letter": "C"},
	},
	{
		Key:     document.Key{Collection: &document.Collection{Name: "items"}, Id: "04"},
		Content: map[string]interface{}{"letter": "D"},
	},
	{
		Key:     document.Key{Collection: &document.Collection{Name: "items"}, Id: "05"},
		Content: map[string]interface{}{"letter": "E"},
	},
	{
		Key:     document.Key{Collection: &document.Collection{Name: "items"}, Id: "06"},
		Content: map[string]interface{}{"letter": "F"},
	},
	{
		Key:     document.Key{Collection: &document.Collection{Name: "items"}, Id: "07"},
		Content: map[string]interface{}{"letter": "G"},
	},
	{
		Key:     document.Key{Collection: &document.Collection{Name: "items"}, Id: "08"},
		Content: map[string]interface{}{"letter": "H"},
	},
	{
		Key:     document.Key{Collection: &document.Collection{Name: "items"}, Id: "09"},
		Content: map[string]interface{}{"letter": "I"},
	},
	{
		Key:     document.Key{Collection: &document.Collection{Name: "items"}, Id: "10"},
		Content: map[string]interface{}{"letter": "J"},
	},
	{
		Key:     document.Key{Collection: &document.Collection{Name: "items"}, Id: "11"},
		Content: map[string]interface{}{"letter": "K"},
	},
	{
		Key:     document.Key{Collection: &document.Collection{Name: "items"}, Id: "12"},
		Content: map[string]interface{}{"letter": "L"},
	},
}
View Source
var UserItem1 = map[string]interface{}{
	"firstName": "John",
	"lastName":  "Smith",
	"email":     "jsmith@server.com",
	"country":   "US",
	"age":       "30",
}
View Source
var UserItem2 = map[string]interface{}{
	"firstName": "Johnson",
	"lastName":  "Smithers",
	"email":     "j.smithers@yahoo.com",
	"country":   "AU",
	"age":       "40",
}
View Source
var UserItem3 = map[string]interface{}{
	"firstName": "Paul",
	"lastName":  "Davis",
	"email":     "pdavis@server.com",
	"country":   "US",
	"age":       "50",
}
View Source
var UserKey1 = document.Key{
	Collection: &document.Collection{Name: "users"},
	Id:         "jsmith@server.com",
}
View Source
var UserKey2 = document.Key{
	Collection: &document.Collection{Name: "users"},
	Id:         "j.smithers@yahoo.com",
}
View Source
var UserKey3 = document.Key{
	Collection: &document.Collection{Name: "users"},
	Id:         "pdavis@server.com",
}

Functions

func DeleteTests

func DeleteTests(docPlugin document.DocumentService)

func GetTests

func GetTests(docPlugin document.DocumentService)

func LoadCustomersData

func LoadCustomersData(docPlugin document.DocumentService)

func LoadItemsData

func LoadItemsData(docPlugin document.DocumentService)

func LoadUsersData

func LoadUsersData(docPlugin document.DocumentService)

func QueryStreamTests

func QueryStreamTests(docPlugin document.DocumentService)

func QueryTests

func QueryTests(docPlugin document.DocumentService)

func SetTests

func SetTests(docPlugin document.DocumentService)

Types

type Customer

type Customer struct {
	Key     document.Key
	Content map[string]interface{}
	Orders  []Order
	Reviews []Review
}

type Item

type Item struct {
	Key     document.Key
	Content map[string]interface{}
}

type Order

type Order struct {
	Key     document.Key
	Content map[string]interface{}
}

type Review

type Review struct {
	Key     document.Key
	Content map[string]interface{}
}

Jump to

Keyboard shortcuts

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