Documentation ¶
Index ¶
- Variables
- type Client
- type DialerConfig
- type Pool
- func (p *Pool) Close()
- func (p *Pool) Execute(query string) (resp []Response, err error)
- func (p *Pool) ExecuteFile(path string, bindings, rebindings map[string]string) (resp []Response, err error)
- func (p *Pool) ExecuteWithBindings(query string, bindings, rebindings map[string]string) (resp []Response, err error)
- type Response
- type Result
- type Status
- type Ws
Constants ¶
This section is empty.
Variables ¶
var ( ErrGraphDBClosed = errors.New("graphdb is closed") ErrBadConn = errors.New("bad conn") )
errors
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Errored bool // contains filtered or unexported fields }
Client is a container for the gremgo client.
type DialerConfig ¶
type DialerConfig func(*Ws)
DialerConfig is the struct for defining configuration for WebSocket dialer
func SetAuthentication ¶
func SetAuthentication(username string, password string) DialerConfig
SetAuthentication sets on dialer credentials for authentication
func SetPingInterval ¶
func SetPingInterval(seconds int) DialerConfig
SetPingInterval sets the interval of ping sending for know is connection is alive and in consequence the client is connected
func SetReadingWait ¶
func SetReadingWait(seconds int) DialerConfig
SetReadingWait sets the time for waiting that reading occur
func SetWritingWait ¶
func SetWritingWait(seconds int) DialerConfig
SetWritingWait sets the time for waiting that writing occur
type Pool ¶
type Pool struct { MaxOpen int MaxLifetime time.Duration // contains filtered or unexported fields }
Pool maintains a list of connections.
func (*Pool) Execute ¶
Execute formats a raw Gremlin query, sends it to Gremlin Server, and returns the result.
type Response ¶
type Response struct { RequestID string `json:"requestId"` Status Status `json:"status"` Result Result `json:"result"` }
Response structs holds the entire response from requests to the gremlin server
type Result ¶
type Result struct { // Query Response Data Data json.RawMessage `json:"data"` Meta map[string]interface{} `json:"meta"` }
Result struct is used to hold properties returned for results from requests to the gremlin server