test

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDocuments added in v1.6.0

func CreateDocuments(ctx context.Context, col driver.Collection, docCount int, generator func(i int) any) error

CreateDocuments creates given number of documents for the provided collection.

func GenerateUUID added in v1.6.2

func GenerateUUID(prefix string) string

func NewUUID

func NewUUID() string

Types

type Account

type Account struct {
	ID   string   `json:"id"`
	User *UserDoc `json:"user"`
}

type AccountEdge

type AccountEdge struct {
	From string   `json:"_from,omitempty"`
	To   string   `json:"_to,omitempty"`
	User *UserDoc `json:"user"`
}

type Book

type Book struct {
	Title string
}

type BookWithAuthor

type BookWithAuthor struct {
	Title  string
	Author string
}

type Compare

type Compare string
const (
	GT Compare = ">"
	GE Compare = ">="
	LT Compare = "<"
	LE Compare = "<="
	EQ Compare = "=="
	NE Compare = "!="
)

func (Compare) Compare

func (c Compare) Compare(a, b driver.Version) bool

func (Compare) Than

func (c Compare) Than(a driver.Version) VersionChecker

type Dimension added in v1.5.0

type Dimension struct {
	Type  string `json:"type"`
	Value int    `json:"value"`
}

type NestedFieldsDoc added in v1.5.0

type NestedFieldsDoc struct {
	Name       string      `json:"name"`
	Dimensions []Dimension `json:"dimensions,omitempty"`
}

type Operator

type Operator string
const (
	AND Operator = "AND"
	OR  Operator = "OR"
)

type RelationEdge

type RelationEdge struct {
	From string `json:"_from,omitempty"`
	To   string `json:"_to,omitempty"`
	Type string `json:"type,omitempty"`
}

type RouteEdge

type RouteEdge struct {
	From     string `json:"_from,omitempty"`
	To       string `json:"_to,omitempty"`
	Distance int    `json:"distance,omitempty"`
}

type RouteEdgeWithKey

type RouteEdgeWithKey struct {
	Key      string `json:"_key"`
	From     string `json:"_from,omitempty"`
	To       string `json:"_to,omitempty"`
	Distance int    `json:"distance,omitempty"`
}

type UserDoc

type UserDoc struct {
	Name string `json:"name"`
	Age  int    `json:"age"`
}

type UserDocWithKey

type UserDocWithKey struct {
	Key  string `json:"_key"`
	Name string `json:"name"`
	Age  int    `json:"age"`
}

type UserDocWithKeyWithOmit

type UserDocWithKeyWithOmit struct {
	Key  string `json:"_key,omitempty"`
	Name string `json:"name,omitempty"`
	Age  int    `json:"age,omitempty"`
}

type VersionCheck

type VersionCheck struct {
	// contains filtered or unexported fields
}

func EnsureVersion

func EnsureVersion(t *testing.T, ctx context.Context, c driver.Client) VersionCheck

func (VersionCheck) CheckVersion

func (v VersionCheck) CheckVersion(check VersionChecker) VersionCheck

func (VersionCheck) Cluster

func (v VersionCheck) Cluster() VersionCheck

func (VersionCheck) Community

func (v VersionCheck) Community() VersionCheck

func (VersionCheck) Enterprise

func (v VersionCheck) Enterprise() VersionCheck

func (VersionCheck) NotCluster

func (v VersionCheck) NotCluster() VersionCheck

type VersionChecker

type VersionChecker interface {
	Or(v VersionChecker) VersionChecker
	And(v VersionChecker) VersionChecker
	Check(version driver.Version) bool
	String(version driver.Version) string
}

func AbovePatchRelease

func AbovePatchRelease(version driver.Version) VersionChecker

func BelowPatchRelease

func BelowPatchRelease(version driver.Version) VersionChecker

func MinimumVersion

func MinimumVersion(version driver.Version) VersionChecker

Jump to

Keyboard shortcuts

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