Documentation ¶
Index ¶
- Constants
- Variables
- func GetResult(response *Response) ([]interface{}, error)
- func SerializerRequest(request *Request) ([]byte, error)
- type Request
- type Response
- type ResponseFuture
- func (r *ResponseFuture) Complete(response *Response)
- func (r *ResponseFuture) FixResponse(fn func(response *Response))
- func (r *ResponseFuture) Get() *Response
- func (r *ResponseFuture) GetOrTimeout(timeout time.Duration) (*Response, bool)
- func (r *ResponseFuture) IsCompleted() bool
- func (r *ResponseFuture) Request() *Request
Constants ¶
View Source
const ( // The server successfully processed a request to completion - threr are no messages remaining in this stream RESPONSE_STATUS_SUCCESS = 200 // The server processed the request but there is no result to return RESPONSE_STATUS_NO_CONTENT = 204 // The server successfully returned some content, but there is more in the stream to arrive - wait for the end of the stream RESPONSE_STATUS_PARITAL_CONTENT = 206 // The server could not authenticate the request or the client requested a resource it did not have access to RESPONSE_STATUS_UNAUTHORIZED = 401 // The server could authenticate the request, but will not fulfill it RESPONSE_STATUS_FORBIDDEN = 403 // A challenge from the server for the client to authenticate its request RESPONSE_STATUS_AUTHENTICATE = 407 // The request message contains objects that were not serializable on the client side RESPONSE_STATUS_REQUEST_ERROR_SERIALIZATION = 497 // The request message was not properly formatted which means it could not be parsed at all or the "op" code was // not recognized such that Gremlin Server could properly route it for processing. Check the message format and // retry the request. RESPONSE_STATUS_REQUEST_ERROR_MALFORMED_REQUEST = 498 // The request message was parseable, but the arguments supplied in the message were in conflict or incomplete. // Check the message format and retry the request. RESPONSE_STATUS_REQUEST_ERROR_INVALID_REQUEST_ARGUMENTS = 499 // A general server error occurred that prevented the request from being processed RESPONSE_STATUS_SERVER_ERROR = 500 // The script submitted for processing evaluated in the {@code ScriptEngine} with errors and could not be // processed. Check the script submitted for syntax errors or other problems and then resubmit. RESPONSE_STATUS_SERVER_ERROR_SCRIPT_EVALUATION = 597 // The server exceeded one of the timeout settings for the request and could therefore only partially responded // or did not respond at all. RESPONSE_STATUS_SERVER_ERROR_TIMEOUT = 598 // The server was not capable of serializing an object that was returned from the script supplied on the request. // Either transform the object into something Gremlin Server can process within the script or install mapper // serialization classes to Gremlin Server. RESPONSE_STATUS_SERVER_ERROR_SERIALIZATION = 599 // The client failed to deliver this request message to server RESPONSE_STATUS_REQUEST_ERROR_DELIVER = 697 )
View Source
const GraphsonV3 = "!application/vnd.gremlin-v3.0+json"
Variables ¶
View Source
var ( // GenUUID is a monkey patched function for the Google UUIDv4 generator. GenUUID = uuid.NewUUID )
Functions ¶
func SerializerRequest ¶
Types ¶
type Request ¶
type Request struct { RequestID string `json:"requestId"` Op string `json:"op"` Processor string `json:"processor"` Args map[string]interface{} `json:"args"` }
func MakeAuthRequest ¶
func MakeRequestCloseSession ¶
func MakeRequestWithOptions ¶
func MakeRequestWithOptions(gremlin string, options *graph.RequestOptions) (*Request, error)
type Response ¶
func ReadResponse ¶
type ResponseFuture ¶
type ResponseFuture struct {
// contains filtered or unexported fields
}
func NewResponseFuture ¶
func NewResponseFuture(request *Request, cb func() bool) *ResponseFuture
func (*ResponseFuture) Complete ¶
func (r *ResponseFuture) Complete(response *Response)
func (*ResponseFuture) FixResponse ¶
func (r *ResponseFuture) FixResponse(fn func(response *Response))
func (*ResponseFuture) Get ¶
func (r *ResponseFuture) Get() *Response
func (*ResponseFuture) GetOrTimeout ¶
func (r *ResponseFuture) GetOrTimeout(timeout time.Duration) (*Response, bool)
func (*ResponseFuture) IsCompleted ¶
func (r *ResponseFuture) IsCompleted() bool
func (*ResponseFuture) Request ¶
func (r *ResponseFuture) Request() *Request
Click to show internal directories.
Click to hide internal directories.