vertex

package
v0.0.0-...-67a1156 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareEntities

func CompareEntities(expected, actual interface{})

func ConvertMapTo

func ConvertMapTo(inputMap map[interface{}]interface{}) map[string]interface{}

func CreateApplicationDatabase

func CreateApplicationDatabase(db_config proxima.DatabaseConfig) (*proxima.ProximaDatabase, error)

func CreateResolvers

func CreateResolvers(db *proxima.ProximaDatabase) (gql.Config, error)

func GenerateRandomOfType

func GenerateRandomOfType(varType string) (interface{}, error)

func GenerateRandomSearchQueryText

func GenerateRandomSearchQueryText(entityMap map[string]interface{}) (string, error)

func GenerateRandomStruct

func GenerateRandomStruct(entityStruct map[string]interface{}) (map[string]interface{}, error)

func LoadDirectives

func LoadDirectives(c gql.Config) gql.Config

func LoadEntityQueryStrings

func LoadEntityQueryStrings(queryFileName string) (map[string]interface{}, error)

func LoadEntityTestCases

func LoadEntityTestCases(applicationVertex *ProximaDataVertex, fileName string, queryFileName string) (map[string]*EntityTestCase, error)

func RandomString

func RandomString(size int) string

func RunEntityBenchmarkCase

func RunEntityBenchmarkCase(c *client.Client, b *testing.B, entityTestCase *EntityTestCase)

func RunEntityBenchmarkCases

func RunEntityBenchmarkCases(c *client.Client, b *testing.B, tests map[string]*EntityTestCase, numEntities int)

func RunEntityTestCase

func RunEntityTestCase(c *client.Client, t *testing.T, entityTestCase *EntityTestCase, n int)

func RunEntityTestCases

func RunEntityTestCases(c *client.Client, t *testing.T, tests map[string]*EntityTestCase, n int)

func RunGQLBenchmarks

func RunGQLBenchmarks(c *client.Client, b *testing.B, tests []*GQLTest)

func RunGQLTest

func RunGQLTest(c *client.Client, t *testing.T, test *GQLTest)

func RunGQLTests

func RunGQLTests(c *client.Client, t *testing.T, tests []*GQLTest)

func RunTestResolverOperation

func RunTestResolverOperation(c *client.Client, test *GQLTest) *client.Response

client response

func SetupEntitiesBenchmarks

func SetupEntitiesBenchmarks(c *client.Client, entityTestCases map[string]*EntityTestCase, numEntities int)

func SetupEntityBenchmarks

func SetupEntityBenchmarks(c *client.Client, entityTestCase *EntityTestCase, numEntities int)

Types

type EntityTestCase

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

func NewEntityTestCase

func NewEntityTestCase(name string, schema gql.ExecutableSchema, applicationVertex *ProximaDataVertex, entity, entityInput, queryStrings, operations map[string]interface{}) *EntityTestCase

type GQLTest

type GQLTest struct {
	Context        context.Context
	Schema         gql.ExecutableSchema
	Query          string
	OperationName  string
	Variables      map[string]interface{}
	ExpectedResult interface{}
	ExpectedErrors gqlerror.List
}

func NewGQLTest

func NewGQLTest(schema gql.ExecutableSchema, queryString, operationName string, vars map[string]interface{}, expectedResult interface{}, expectedErrors gqlerror.List) *GQLTest

type ProximaDataVertex

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

func CreateDataVertex

func CreateDataVertex(config map[string]interface{}, dbConfig proxima.DatabaseConfig) (*ProximaDataVertex, error)

func LoadDataVertex

func LoadDataVertex(configFilePath, dbConfigFilePath string) (*ProximaDataVertex, error)

func (*ProximaDataVertex) StartVertexServer

func (vertex *ProximaDataVertex) StartVertexServer()

Jump to

Keyboard shortcuts

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