client

package
v0.0.0-...-b4bb62b Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoResult = errors.New("no result")

ErrNoResult is returned when a query returned no result

Functions

This section is empty.

Types

type GremlinQueryHelper

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

GremlinQueryHelper describes a gremlin query request query helper mechanism

func NewGremlinQueryHelper

func NewGremlinQueryHelper(restClient *shttp.RestClient) *GremlinQueryHelper

NewGremlinQueryHelper creates a new Gremlin query helper based on authentication

func (*GremlinQueryHelper) GetEdges

func (g *GremlinQueryHelper) GetEdges(query interface{}) ([]*graph.Edge, error)

GetEdges from the Gremlin query

func (*GremlinQueryHelper) GetInt64

func (g *GremlinQueryHelper) GetInt64(query interface{}) (int64, error)

GetInt64 parse the query result as int64

func (*GremlinQueryHelper) GetNode

func (g *GremlinQueryHelper) GetNode(query interface{}) (node *graph.Node, _ error)

GetNode from the Gremlin query

func (*GremlinQueryHelper) GetNodes

func (g *GremlinQueryHelper) GetNodes(query interface{}) ([]*graph.Node, error)

GetNodes from the Gremlin query

func (*GremlinQueryHelper) Query

func (g *GremlinQueryHelper) Query(query interface{}) ([]byte, error)

Query queries the topology API

func (*GremlinQueryHelper) Request

func (g *GremlinQueryHelper) Request(query interface{}, header http.Header) (*http.Response, error)

Request send a Gremlin request to the topology API

type JSONPatch

type JSONPatch []Operation

JSONPatch describes a JSON patch

type Operation

type Operation struct {
	Op    string      `json:"op"`
	Path  string      `json:"path"`
	Value interface{} `json:"value"`
}

Operation describes a JSONPatch operation

func NewPatchOperation

func NewPatchOperation(op, path string, value ...interface{}) Operation

NewPatchOperation creates a new JSON patch operation

Jump to

Keyboard shortcuts

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