graph

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DONE = errors.New("DONE")

	// An error indicating a given key does not exist
	ErrNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type GraphStore added in v0.0.3

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

func NewGraphStore added in v0.0.3

func NewGraphStore(ctx context.Context, flgs *flags.Flags) (*GraphStore, error)

NewGraphStore takes a file path and returns a connected Raft backend.

func (*GraphStore) AllEdges added in v0.0.3

func (n *GraphStore) AllEdges(ctx context.Context) (*apipb.Edges, error)

func (*GraphStore) AllNodes added in v0.0.3

func (n *GraphStore) AllNodes(ctx context.Context) (*apipb.Nodes, error)

func (*GraphStore) Close added in v0.0.3

func (b *GraphStore) Close()

Close is used to gracefully close the Database.

func (*GraphStore) CreateEdge added in v0.0.3

func (g *GraphStore) CreateEdge(ctx context.Context, constructor *apipb.EdgeConstructor) (*apipb.Edge, error)

func (*GraphStore) CreateEdges added in v0.0.3

func (g *GraphStore) CreateEdges(ctx context.Context, constructors *apipb.EdgeConstructors) (*apipb.Edges, error)

func (*GraphStore) CreateNode added in v0.0.3

func (g *GraphStore) CreateNode(ctx context.Context, constructor *apipb.NodeConstructor) (*apipb.Node, error)

func (*GraphStore) CreateNodes added in v0.0.3

func (g *GraphStore) CreateNodes(ctx context.Context, constructors *apipb.NodeConstructors) (*apipb.Nodes, error)

func (*GraphStore) EdgeTypes added in v0.0.3

func (g *GraphStore) EdgeTypes(ctx context.Context) ([]string, error)

func (*GraphStore) EdgesFrom added in v0.0.3

func (g *GraphStore) EdgesFrom(ctx context.Context, filter *apipb.EdgeFilter) (*apipb.Edges, error)

func (*GraphStore) EdgesTo added in v0.0.3

func (e *GraphStore) EdgesTo(ctx context.Context, filter *apipb.EdgeFilter) (*apipb.Edges, error)

func (*GraphStore) Export added in v0.0.3

func (r *GraphStore) Export(ctx context.Context, _ *empty.Empty) (*apipb.Graph, error)

func (*GraphStore) FilterNode added in v0.0.3

func (n *GraphStore) FilterNode(ctx context.Context, nodeType string, filter func(node *apipb.Node) bool) (*apipb.Nodes, error)

func (*GraphStore) GetEdge added in v0.0.3

func (g *GraphStore) GetEdge(ctx context.Context, path *apipb.Path) (*apipb.Edge, error)

func (*GraphStore) GetEdgeDetail added in v0.0.3

func (g *GraphStore) GetEdgeDetail(ctx context.Context, path *apipb.Path) (*apipb.EdgeDetail, error)

func (*GraphStore) GetNode added in v0.0.3

func (g *GraphStore) GetNode(ctx context.Context, path *apipb.Path) (*apipb.Node, error)

func (*GraphStore) GetNodeDetail added in v0.0.3

func (g *GraphStore) GetNodeDetail(ctx context.Context, filter *apipb.NodeDetailFilter) (*apipb.NodeDetail, error)

func (*GraphStore) GetSchema added in v0.0.3

func (g *GraphStore) GetSchema(ctx context.Context, _ *empty.Empty) (*apipb.Schema, error)

func (*GraphStore) HasEdge added in v0.0.3

func (n *GraphStore) HasEdge(ctx context.Context, path *apipb.Path) bool

func (*GraphStore) HasNode added in v0.0.3

func (n *GraphStore) HasNode(ctx context.Context, path *apipb.Path) bool

func (*GraphStore) Import added in v0.0.3

func (r *GraphStore) Import(ctx context.Context, graph *apipb.Graph) (*apipb.Graph, error)

func (*GraphStore) Me added in v0.0.3

func (g *GraphStore) Me(ctx context.Context, filter *apipb.MeFilter) (*apipb.NodeDetail, error)

func (*GraphStore) MethodContext added in v0.0.3

func (r *GraphStore) MethodContext(ctx context.Context) string

func (*GraphStore) MethodToContext added in v0.0.3

func (r *GraphStore) MethodToContext(ctx context.Context, path string) context.Context

func (*GraphStore) NodeContext added in v0.0.3

func (s *GraphStore) NodeContext(ctx context.Context) *apipb.Node

func (*GraphStore) NodeToContext added in v0.0.3

func (a *GraphStore) NodeToContext(ctx context.Context, payload map[string]interface{}) (context.Context, *apipb.Node, error)

func (*GraphStore) NodeTypes added in v0.0.3

func (g *GraphStore) NodeTypes(ctx context.Context) ([]string, error)

func (*GraphStore) PatchEdge added in v0.0.3

func (n *GraphStore) PatchEdge(ctx context.Context, value *apipb.Patch) (*apipb.Edge, error)

func (*GraphStore) PatchEdges added in v0.0.3

func (n *GraphStore) PatchEdges(ctx context.Context, patch *apipb.PatchFilter) (*apipb.Edges, error)

func (*GraphStore) PatchNode added in v0.0.3

func (n *GraphStore) PatchNode(ctx context.Context, value *apipb.Patch) (*apipb.Node, error)

func (*GraphStore) PatchNodes added in v0.0.3

func (n *GraphStore) PatchNodes(ctx context.Context, patch *apipb.PatchFilter) (*apipb.Nodes, error)

func (*GraphStore) Ping added in v0.0.3

func (g *GraphStore) Ping(ctx context.Context, e *empty.Empty) (*apipb.Pong, error)

func (*GraphStore) Publish added in v0.0.3

func (g *GraphStore) Publish(ctx context.Context, message *apipb.OutboundMessage) (*empty.Empty, error)

func (*GraphStore) RangeEdges added in v0.0.3

func (g *GraphStore) RangeEdges(ctx context.Context, gType string, fn func(n *apipb.Edge) bool) error

func (*GraphStore) RangeFrom added in v0.0.3

func (g *GraphStore) RangeFrom(ctx context.Context, path *apipb.Path, fn func(e *apipb.Edge) bool) error

func (*GraphStore) RangeNodes added in v0.0.3

func (g *GraphStore) RangeNodes(ctx context.Context, gType string, fn func(n *apipb.Node) bool) error

func (*GraphStore) RangeSeekEdges added in v0.0.3

func (g *GraphStore) RangeSeekEdges(ctx context.Context, gType, seek string, fn func(e *apipb.Edge) bool) error

func (*GraphStore) RangeTo added in v0.0.3

func (g *GraphStore) RangeTo(ctx context.Context, path *apipb.Path, fn func(edge *apipb.Edge) bool) error

func (*GraphStore) SearchEdges added in v0.0.3

func (e *GraphStore) SearchEdges(ctx context.Context, filter *apipb.Filter) (*apipb.Edges, error)

func (*GraphStore) SearchNodes added in v0.0.3

func (n *GraphStore) SearchNodes(ctx context.Context, filter *apipb.Filter) (*apipb.Nodes, error)

func (*GraphStore) SetEdge added in v0.0.3

func (g *GraphStore) SetEdge(ctx context.Context, tx *bbolt.Tx, edge *apipb.Edge) (*apipb.Edge, error)

func (*GraphStore) SetEdges added in v0.0.3

func (g *GraphStore) SetEdges(ctx context.Context, edges ...*apipb.Edge) (*apipb.Edges, error)

func (*GraphStore) SetNode added in v0.0.3

func (g *GraphStore) SetNode(ctx context.Context, tx *bbolt.Tx, node *apipb.Node) (*apipb.Node, error)

func (*GraphStore) SetNodes added in v0.0.3

func (g *GraphStore) SetNodes(ctx context.Context, nodes ...*apipb.Node) (*apipb.Nodes, error)

func (*GraphStore) Shutdown added in v0.0.3

func (g *GraphStore) Shutdown(ctx context.Context, e *empty.Empty) (*empty.Empty, error)

func (*GraphStore) Stream added in v0.0.4

func (*GraphStore) SubGraph added in v0.0.3

func (g *GraphStore) SubGraph(ctx context.Context, filter *apipb.SubGraphFilter) (*apipb.Graph, error)

func (*GraphStore) Subscribe added in v0.0.3

func (g *GraphStore) Subscribe(filter *apipb.ChannelFilter, server apipb.GraphService_SubscribeServer) error

func (*GraphStore) SubscribeChanges added in v0.0.9

func (g *GraphStore) SubscribeChanges(filter *apipb.ExpressionFilter, server apipb.GraphService_SubscribeChangesServer) error

func (*GraphStore) Unary added in v0.0.4

func (*GraphStore) VerifyJWT added in v0.0.12

func (g *GraphStore) VerifyJWT(token string) (map[string]interface{}, error)

Jump to

Keyboard shortcuts

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