test

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package test implements add tests for the go-driver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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