Versions in this module Expand all Collapse all v1 v1.0.1 Apr 12, 2022 Changes in this version + const ArgsAggregateTo + const ArgsAliases + const ArgsBatchSize + const ArgsBindings + const ArgsEvalTimeout + const ArgsGremlin + const ArgsLanguage + const ArgsSasl + const ArgsSaslMechanism + const ArgsSideEffect + const ArgsSideEffectKey + const MaxResponseSize + const OpsAuthentication + const OpsBytecode + const OpsClose + const OpsEval + const OpsGather + const OpsKeys + const ProcessorTraversal + const StatusAuthenticate + const StatusInvalidRequestArguments + const StatusMalformedRequest + const StatusNoContent + const StatusPartialContent + const StatusScriptEvaluationError + const StatusServerError + const StatusServerSerializationError + const StatusServerTimeout + const StatusSuccess + const StatusUnauthorized + func StatusText(code int) string + type Client struct + Transport RoundTripper + func NewClient(cfg Config, opt ...Option) (*Client, error) + func NewHTTPClient(url string, client *http.Client) (*Client, error) + func (c Client) Do(ctx context.Context, req *Request) (*Response, error) + func (c Client) Query(ctx context.Context, query string) (*Response, error) + func (c Client) Queryf(ctx context.Context, format string, args ...interface{}) (*Response, error) + type Config struct + DisableExpansion bool + Endpoint Endpoint + func (cfg Config) Build(opt ...Option) (c *Client, err error) + type Credentials struct + Password string + Username string + func (c *Credentials) UnmarshalText(text []byte) error + func (c Credentials) MarshalText() ([]byte, error) + type Driver struct + func NewDriver(c *Client) *Driver + func (Driver) Close() error + func (Driver) Dialect() string + func (c *Driver) Exec(ctx context.Context, query string, args, v interface{}) error + func (c *Driver) Query(ctx context.Context, query string, args, v interface{}) error + func (c *Driver) Tx(context.Context) (dialect.Tx, error) + type Endpoint struct + func (ep *Endpoint) UnmarshalFlag(value string) (err error) + type Interceptor func(RoundTripper) RoundTripper + type Option func(*options) + func WithHTTPClient(client *http.Client) Option + func WithInterceptor(interceptors ...Interceptor) Option + type Request struct + Arguments map[string]interface{} + Operation string + Processor string + RequestID string + func NewAuthRequest(requestID, username, password string) *Request + func NewEvalRequest(query string, opts ...RequestOption) *Request + type RequestOption func(*Request) + func WithBindings(bindings map[string]interface{}) RequestOption + func WithEvalTimeout(timeout time.Duration) RequestOption + type Response struct + RequestID string + Result struct{ ... } + Status struct{ ... } + func (rsp *Response) Err() error + func (rsp *Response) IsErr() bool + func (rsp *Response) ReadBool() (bool, error) + func (rsp *Response) ReadEdges() ([]graph.Edge, error) + func (rsp *Response) ReadInt() (int, error) + func (rsp *Response) ReadProperties() ([]graph.Property, error) + func (rsp *Response) ReadString() (string, error) + func (rsp *Response) ReadVal(v interface{}) error + func (rsp *Response) ReadValueMap() (graph.ValueMap, error) + func (rsp *Response) ReadVertexProperties() ([]graph.VertexProperty, error) + func (rsp *Response) ReadVertices() ([]graph.Vertex, error) + type RoundTripper interface + RoundTrip func(context.Context, *Request) (*Response, error) + func ExpandBindings(rt RoundTripper) RoundTripper + func NewHTTPTransport(urlStr string, client *http.Client) (RoundTripper, error) + type RoundTripperFunc func(context.Context, *Request) (*Response, error) + func (f RoundTripperFunc) RoundTrip(ctx context.Context, r *Request) (*Response, error)