node

package
v1.0.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mongo

type Mongo struct {
	*mongo.Collection
	Trans
}

Mongo node connects to a mongo collection

func (*Mongo) Mutate

func (n *Mongo) Mutate(ctx context.Context, f *graph.Field) (graph.Value, []error)

Mutate mongo collection

func (*Mongo) Query

func (n *Mongo) Query(ctx context.Context, f *graph.Field) (graph.Value, []error)

Query mongo collection

type Object

type Object struct {
	sync.Map
	// contains filtered or unexported fields
}

Object contains multiple fields

func MakeObject

func MakeObject() (*Object, uintptr)

MakeObject creates a new object

func (*Object) Mutate

func (n *Object) Mutate(ctx context.Context, f *graph.Field) (graph.Value, []error)

Mutate an object

func (*Object) Query

func (n *Object) Query(ctx context.Context, f *graph.Field) (graph.Value, []error)

Query an object

func (*Object) String

func (n *Object) String() string

func (*Object) Subscribe

func (n *Object) Subscribe(ctx context.Context, f *graph.Field, cb graph.Callback) (uintptr, []error)

Subscribe to an object

func (*Object) Unsubscribe

func (n *Object) Unsubscribe(ctx context.Context, p uintptr) []error

Unsubscribe a subscription

type Set

type Set struct {
	sync.Map
	// contains filtered or unexported fields
}

Set contains multiple objects

func (*Set) Mutate

func (n *Set) Mutate(ctx context.Context, f *graph.Field) (graph.Value, []error)

Mutate a collection

func (*Set) Query

func (n *Set) Query(ctx context.Context, f *graph.Field) (graph.Value, []error)

Query a collection

func (*Set) String

func (n *Set) String() string

func (*Set) Subscribe

func (n *Set) Subscribe(ctx context.Context, f *graph.Field, cb graph.Callback) (uintptr, []error)

Subscribe to a collection

func (*Set) Unsubscribe

func (n *Set) Unsubscribe(ctx context.Context, p uintptr) []error

Unsubscribe a subscription

type Struct

type Struct struct {
	sync.Map
	D interface{}
}

Struct node

func (*Struct) Mutate

func (n *Struct) Mutate(ctx context.Context, f *graph.Field) (graph.Value, []error)

Mutate Struct

func (*Struct) Query

func (n *Struct) Query(ctx context.Context, f *graph.Field) (graph.Value, []error)

Query Struct

func (*Struct) Subscribe

func (n *Struct) Subscribe(ctx context.Context, f *graph.Field, cb graph.Callback) (uintptr, []error)

Subscribe Struct

func (*Struct) Unsubscribe

func (n *Struct) Unsubscribe(ctx context.Context, p uintptr) []error

Unsubscribe Struct

type Trans

type Trans struct {
	sync.Map
}

Trans publish mutation to subscribers

func (*Trans) Mutate

func (n *Trans) Mutate(ctx context.Context, f *graph.Field) (graph.Value, []error)

Mutate an Trans

func (*Trans) Query

func (n *Trans) Query(ctx context.Context, f *graph.Field) (graph.Value, []error)

Query a Trans

func (*Trans) String

func (n *Trans) String() string

func (*Trans) Subscribe

func (n *Trans) Subscribe(ctx context.Context, f *graph.Field, cb graph.Callback) (uintptr, []error)

Subscribe to a transparent node

func (*Trans) Unsubscribe

func (n *Trans) Unsubscribe(ctx context.Context, p uintptr) []error

Unsubscribe a ts

Jump to

Keyboard shortcuts

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