ent: github.com/facebookincubator/ent/dialect/gremlin/graph Index | Files | Directories

package graph

import "github.com/facebookincubator/ent/dialect/gremlin/graph"

Index

Package Files

edge.go element.go valuemap.go vertex.go

type Edge Uses

type Edge struct {
    Element
    OutV, InV Vertex
}

An Edge between two vertices.

func NewEdge Uses

func NewEdge(id interface{}, label string, outV, inV Vertex) Edge

NewEdge create a new graph edge.

func (Edge) MarshalGraphson Uses

func (e Edge) MarshalGraphson() ([]byte, error)

MarshalGraphson implements graphson.Marshaler interface.

func (Edge) String Uses

func (e Edge) String() string

String implements fmt.Stringer interface.

func (*Edge) UnmarshalGraphson Uses

func (e *Edge) UnmarshalGraphson(data []byte) error

UnmarshalGraphson implements graphson.Unmarshaler interface.

type Element Uses

type Element struct {
    ID    interface{} `json:"id"`
    Label string      `json:"label"`
}

Element defines a base struct for graph elements.

func NewElement Uses

func NewElement(id interface{}, label string) Element

NewElement create a new graph element.

type Property Uses

type Property struct {
    Key   string      `json:"key"`
    Value interface{} `json:"value"`
}

Property denotes a key/value pair associated with an edge.

func NewProperty Uses

func NewProperty(key string, value interface{}) Property

NewProperty create a new graph edge property.

func (Property) GraphsonType Uses

func (Property) GraphsonType() graphson.Type

GraphsonType implements graphson.Typer interface.

func (Property) String Uses

func (p Property) String() string

String implements fmt.Stringer interface.

type ValueMap Uses

type ValueMap []map[string]interface{}

ValueMap models a .valueMap() gremlin response.

func (ValueMap) Decode Uses

func (m ValueMap) Decode(v interface{}) error

Decode decodes a value map into v.

type Vertex Uses

type Vertex struct {
    Element
}

Vertex represents a graph vertex.

func NewVertex Uses

func NewVertex(id interface{}, label string) Vertex

NewVertex create a new graph vertex.

func (Vertex) GraphsonType Uses

func (Vertex) GraphsonType() graphson.Type

GraphsonType implements graphson.Typer interface.

func (Vertex) String Uses

func (v Vertex) String() string

String implements fmt.Stringer interface.

type VertexProperty Uses

type VertexProperty struct {
    ID    interface{} `json:"id"`
    Key   string      `json:"label"`
    Value interface{} `json:"value"`
}

VertexProperty denotes a key/value pair associated with a vertex.

func NewVertexProperty Uses

func NewVertexProperty(id interface{}, key string, value interface{}) VertexProperty

NewVertexProperty create a new graph vertex property.

func (VertexProperty) GraphsonType Uses

func (VertexProperty) GraphsonType() graphson.Type

GraphsonType implements graphson.Typer interface.

func (VertexProperty) String Uses

func (vp VertexProperty) String() string

String implements fmt.Stringer interface.

Directories

PathSynopsis
dslPackage dsl provide an API for writing gremlin dsl queries almost as-is in Go without using strings in the code.
dsl/__
dsl/g
dsl/p

Package graph imports 5 packages (graph) and is imported by 1 packages. Updated 2019-10-02. Refresh now. Tools for package owners.