network_get

package
v0.0.0-...-8832f83 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package network_get provides the network get graphql endpoint for Weaviate

                         _       _
*__      _____  __ ___   ___  __ _| |_ ___
*\ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
* \ V  V /  __/ (_| |\ V /| | (_| | ||  __/
*  \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
*
* Copyright © 2016 - 2019 Weaviate. All rights reserved.
* LICENSE: https://github.com/creativesoftwarefdn/weaviate/blob/develop/LICENSE.md
* DESIGN & CONCEPT: Bob van Luijt (@bobvanluijt)
* CONTACT: hello@creativesoftwarefdn.org

Index

Constants

This section is empty.

Variables

View Source
var ResolveAction = resolveKind(kind.ACTION_KIND)

ResolveAction as part of a network query: Network -> Get -> Action -> <nameOfAction>

View Source
var ResolveThing = resolveKind(kind.THING_KIND)

ResolveThing as part of a network query: Network -> Get -> Thing -> <nameOfThing>

Functions

func ActionClassFieldsFromSchema

func ActionClassFieldsFromSchema(dbSchema *schema.Schema, getActionsAndThings *map[string]*graphql.Object, weaviate string) (*graphql.Object, error)

Build the dynamically generated Get Actions part of the schema

func NetworkGetInstanceResolve

func NetworkGetInstanceResolve(p graphql.ResolveParams) (interface{}, error)

func ThingClassFieldsFromSchema

func ThingClassFieldsFromSchema(dbSchema *schema.Schema, actionsAndThings *map[string]*graphql.Object, weaviate string) (*graphql.Object, error)

Build the dynamically generated Get Things part of the schema

Types

type Builder

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

Builder for Network -> Get

func New

func New(peerName string, schema schema.Schema) *Builder

New Get Builder to build PeerFields

func (*Builder) PeerField

func (b *Builder) PeerField() (*graphql.Field, error)

PeerField for Network -> Get -> <Peer>

type FiltersAndResolver

type FiltersAndResolver struct {
	Resolver Resolver
}

FiltersAndResolver is a helper tuple to bubble data through the resolvers.

type Params

type Params struct {
	SubQuery       common.SubQuery
	TargetInstance string
}

Params ties a SubQuery and a single instance together

type Resolver

type Resolver interface {
	ProxyGetInstance(info Params) (*models.GraphQLResponse, error)
}

Jump to

Keyboard shortcuts

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