document

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChildItemsCollection = sdk.Collection{
	Name: "items",
	Parent: &sdk.Key{
		Collection: &sdk.Collection{Name: "parentItems"},
		Id:         "1",
	},
}
View Source
var Customer1 = Customer{
	Key: sdk.Key{
		Collection: &sdk.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: sdk.Key{
				Collection: &sdk.Collection{
					Name: "orders",
					Parent: &sdk.Key{
						Collection: &sdk.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: sdk.Key{
				Collection: &sdk.Collection{
					Name: "orders",
					Parent: &sdk.Key{
						Collection: &sdk.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: sdk.Key{
				Collection: &sdk.Collection{
					Name: "orders",
					Parent: &sdk.Key{
						Collection: &sdk.Collection{Name: "customers"},
						Id:         "1000",
					},
				},
				Id: "503",
			},
			Content: map[string]interface{}{
				"testName": "OrderItem3",
				"sku":      "ABC-503",
				"type":     "scooter/electric",
				"number":   "3",
				"price":    "124.95",
			},
		},
	},
}
View Source
var Customer2 = Customer{
	Key: sdk.Key{
		Collection: &sdk.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: sdk.Key{
				Collection: &sdk.Collection{
					Name: "orders",
					Parent: &sdk.Key{
						Collection: &sdk.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: sdk.Key{
				Collection: &sdk.Collection{
					Name: "orders",
					Parent: &sdk.Key{
						Collection: &sdk.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 = sdk.Collection{Name: "customers"}
View Source
var CustomersKey = sdk.Key{
	Collection: &sdk.Collection{Name: "customers"},
}
View Source
var Items = []Item{
	{
		Key:     sdk.Key{Collection: &sdk.Collection{Name: "items"}, Id: "01"},
		Content: map[string]interface{}{"letter": "A"},
	},
	{
		Key:     sdk.Key{Collection: &sdk.Collection{Name: "items"}, Id: "02"},
		Content: map[string]interface{}{"letter": "B"},
	},
	{
		Key:     sdk.Key{Collection: &sdk.Collection{Name: "items"}, Id: "03"},
		Content: map[string]interface{}{"letter": "C"},
	},
	{
		Key:     sdk.Key{Collection: &sdk.Collection{Name: "items"}, Id: "04"},
		Content: map[string]interface{}{"letter": "D"},
	},
	{
		Key:     sdk.Key{Collection: &sdk.Collection{Name: "items"}, Id: "05"},
		Content: map[string]interface{}{"letter": "E"},
	},
	{
		Key:     sdk.Key{Collection: &sdk.Collection{Name: "items"}, Id: "06"},
		Content: map[string]interface{}{"letter": "F"},
	},
	{
		Key:     sdk.Key{Collection: &sdk.Collection{Name: "items"}, Id: "07"},
		Content: map[string]interface{}{"letter": "G"},
	},
	{
		Key:     sdk.Key{Collection: &sdk.Collection{Name: "items"}, Id: "08"},
		Content: map[string]interface{}{"letter": "H"},
	},
	{
		Key:     sdk.Key{Collection: &sdk.Collection{Name: "items"}, Id: "09"},
		Content: map[string]interface{}{"letter": "I"},
	},
	{
		Key:     sdk.Key{Collection: &sdk.Collection{Name: "items"}, Id: "10"},
		Content: map[string]interface{}{"letter": "J"},
	},
	{
		Key:     sdk.Key{Collection: &sdk.Collection{Name: "items"}, Id: "11"},
		Content: map[string]interface{}{"letter": "K"},
	},
	{
		Key:     sdk.Key{Collection: &sdk.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 = sdk.Key{
	Collection: &sdk.Collection{Name: "users"},
	Id:         "jsmith@server.com",
}
View Source
var UserKey2 = sdk.Key{
	Collection: &sdk.Collection{Name: "users"},
	Id:         "j.smithers@yahoo.com",
}
View Source
var UserKey3 = sdk.Key{
	Collection: &sdk.Collection{Name: "users"},
	Id:         "pdavis@server.com",
}

Functions

func DeleteTests

func DeleteTests(docPlugin sdk.DocumentService)

func GetTests

func GetTests(docPlugin sdk.DocumentService)

func LoadCustomersData

func LoadCustomersData(docPlugin sdk.DocumentService)

func LoadItemsData

func LoadItemsData(docPlugin sdk.DocumentService)

func LoadUsersData

func LoadUsersData(docPlugin sdk.DocumentService)

func QueryTests

func QueryTests(docPlugin sdk.DocumentService)

func SetTests

func SetTests(docPlugin sdk.DocumentService)

Types

type Customer

type Customer struct {
	Key     sdk.Key
	Content map[string]interface{}
	Orders  []Order
}

type Item

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

type Order

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

Jump to

Keyboard shortcuts

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