Documentation
¶
Index ¶
- Constants
- Variables
- func ExecIterate(ch <-chan error) error
- func GetConnection(cfg *ConnectionConfig, ...) (*gremlingo.DriverRemoteConnection, error)
- func MergeE(t *gremlingo.GraphTraversal, edge string, id string, ...) *gremlingo.GraphTraversal
- func MergeV(t *gremlingo.GraphTraversal, label, id string, ...) *gremlingo.GraphTraversal
- func PrepareProperties(properties ...interface{}) map[interface{}]interface{}
- func WrapCount(t *gremlingo.GraphTraversal) (int64, error)
- func WrapLabelFilter(t *gremlingo.GraphTraversal, label string) *gremlingo.GraphTraversal
- func WrapOrderAsc(t *gremlingo.GraphTraversal, property string) *gremlingo.GraphTraversal
- func WrapOrderDesc(t *gremlingo.GraphTraversal, property string) *gremlingo.GraphTraversal
- func WrapOrderGt(t *gremlingo.GraphTraversal, property string, value interface{}) *gremlingo.GraphTraversal
- func WrapOrderGte(t *gremlingo.GraphTraversal, property string, value interface{}) *gremlingo.GraphTraversal
- func WrapOrderLt(t *gremlingo.GraphTraversal, property string, value interface{}) *gremlingo.GraphTraversal
- func WrapOrderLte(t *gremlingo.GraphTraversal, property string, value interface{}) *gremlingo.GraphTraversal
- func WrapValuesToList(t *gremlingo.GraphTraversal, values string) ([]*gremlingo.Result, error)
- func WrapperHasID(t *gremlingo.GraphTraversal, id string) *gremlingo.GraphTraversal
- type Cache
- type CallbackOp
- type Client
- type CommonVertexGetter
- type ConnectionConfig
- type DropVertexOp
- type LabelVertexGetter
- type Operation
- type ResultOp
- type UpsertEdgeOp
- type UpsertVertexOp
- type VertexGetter
Constants ¶
View Source
const ( SyntaxAerospike = "aerospike" SyntaxNeptun = "neptun" DefaultPropertyID = "id" )
View Source
const EnvPrefix = "GREMLIN"
EnvPrefix environment prefix for gremlin config
Variables ¶
View Source
var ( PropertyID interface{} = DefaultPropertyID Syntax = SyntaxAerospike )
View Source
var ErrCastType = errors.New("error cast type")
Functions ¶
func ExecIterate ¶
func GetConnection ¶
func GetConnection( cfg *ConnectionConfig, configurations ...func(settings *gremlingo.DriverRemoteConnectionSettings), ) (*gremlingo.DriverRemoteConnection, error)
func MergeE ¶
func MergeE( t *gremlingo.GraphTraversal, edge string, id string, vertex1, vertex2 *gremlingo.Vertex, properties map[interface{}]interface{}, ) *gremlingo.GraphTraversal
func MergeV ¶
func MergeV( t *gremlingo.GraphTraversal, label, id string, properties map[interface{}]interface{}, ) *gremlingo.GraphTraversal
func PrepareProperties ¶
func PrepareProperties(properties ...interface{}) map[interface{}]interface{}
func WrapLabelFilter ¶
func WrapLabelFilter(t *gremlingo.GraphTraversal, label string) *gremlingo.GraphTraversal
func WrapOrderAsc ¶
func WrapOrderAsc(t *gremlingo.GraphTraversal, property string) *gremlingo.GraphTraversal
func WrapOrderDesc ¶
func WrapOrderDesc(t *gremlingo.GraphTraversal, property string) *gremlingo.GraphTraversal
func WrapOrderGt ¶
func WrapOrderGt(t *gremlingo.GraphTraversal, property string, value interface{}) *gremlingo.GraphTraversal
func WrapOrderGte ¶
func WrapOrderGte(t *gremlingo.GraphTraversal, property string, value interface{}) *gremlingo.GraphTraversal
func WrapOrderLt ¶
func WrapOrderLt(t *gremlingo.GraphTraversal, property string, value interface{}) *gremlingo.GraphTraversal
func WrapOrderLte ¶
func WrapOrderLte(t *gremlingo.GraphTraversal, property string, value interface{}) *gremlingo.GraphTraversal
func WrapValuesToList ¶
func WrapperHasID ¶
func WrapperHasID(t *gremlingo.GraphTraversal, id string) *gremlingo.GraphTraversal
Types ¶
type Cache ¶
type Cache struct { *registry.Registry[string, string, any] // contains filtered or unexported fields }
func (*Cache) DeleteVertex ¶
type CallbackOp ¶
type CallbackOp struct { *ResultOp // contains filtered or unexported fields }
func NewCallbackOp ¶
func NewCallbackOp( fn func(cache *Cache, source *gremlingo.GraphTraversalSource) ([]*gremlingo.Result, error), ) *CallbackOp
func (*CallbackOp) Execute ¶
func (o *CallbackOp) Execute(cache *Cache, source *gremlingo.GraphTraversalSource) error
type Client ¶
type Client struct {
Connection *gremlingo.DriverRemoteConnection
}
func New ¶
func New( cfg *ConnectionConfig, configurations ...func(settings *gremlingo.DriverRemoteConnectionSettings), ) (*Client, error)
func (*Client) S ¶
func (c *Client) S() *gremlingo.GraphTraversalSource
type CommonVertexGetter ¶
type CommonVertexGetter struct {
// contains filtered or unexported fields
}
func NewCommonVertexGetter ¶
func NewCommonVertexGetter(vertex *gremlingo.Vertex, id string) CommonVertexGetter
func (CommonVertexGetter) Get ¶
func (v CommonVertexGetter) Get(_ *Cache, _ *gremlingo.GraphTraversalSource) (string, *gremlingo.Vertex, error)
type ConnectionConfig ¶
type ConnectionConfig struct {
URL string `env:"_URL" envDefault:"ws://127.0.0.1:8182/gremlin"`
}
ConnectionConfig contains required data for gremlin
func GetConnectionConfigFromEnv ¶
func GetConnectionConfigFromEnv() (*ConnectionConfig, error)
GetConnectionConfigFromEnv return aerospike configs bases on environment variables
type DropVertexOp ¶
type DropVertexOp struct { *ResultOp // contains filtered or unexported fields }
func NewDropVertexOp ¶
func NewDropVertexOp(vertex VertexGetter) *DropVertexOp
func (*DropVertexOp) Execute ¶
func (o *DropVertexOp) Execute(cache *Cache, source *gremlingo.GraphTraversalSource) error
type LabelVertexGetter ¶
type LabelVertexGetter struct {
// contains filtered or unexported fields
}
func NewLabelVertexGetter ¶
func NewLabelVertexGetter(label string, id string) LabelVertexGetter
func (LabelVertexGetter) Get ¶
func (v LabelVertexGetter) Get( cache *Cache, source *gremlingo.GraphTraversalSource, ) (string, *gremlingo.Vertex, error)
type UpsertEdgeOp ¶
type UpsertEdgeOp struct { *ResultOp // contains filtered or unexported fields }
func NewUpsertEdgeOp ¶
func NewUpsertEdgeOp( edge string, id string, from VertexGetter, to VertexGetter, properties ...interface{}, ) *UpsertEdgeOp
func (*UpsertEdgeOp) Execute ¶
func (o *UpsertEdgeOp) Execute(cache *Cache, source *gremlingo.GraphTraversalSource) error
type UpsertVertexOp ¶
type UpsertVertexOp struct { *ResultOp // contains filtered or unexported fields }
func NewUpsertVertexOp ¶
func NewUpsertVertexOp(label string, id string, properties ...interface{}) *UpsertVertexOp
func (*UpsertVertexOp) Execute ¶
func (o *UpsertVertexOp) Execute(cache *Cache, source *gremlingo.GraphTraversalSource) error
type VertexGetter ¶
Click to show internal directories.
Click to hide internal directories.