Send #
Sends a query to the Kuzzle API.
Signature #
Send(query []byte, options types.QueryOptions, responseChannel chan<- *types.KuzzleResponse, requestId string) error
Arguments #
Argument | Type | Description |
---|---|---|
query | []byte | API request |
options | QueryOptions | Additional query options |
responseChannel | chan<- *types.KuzzleResponse | A channel to receive the API response |
requestId | string | Optional request identifier |
request #
Properties required for the Kuzzle API can be set in the KuzzleRequest. The following properties are the most common.
Property | Type | Description | Required |
---|---|---|---|
Controller | string | Controller name | yes |
Action | string | Action name | yes |
Body | interface{} | Query body for this action | no |
Index | string | Index name for this action | no |
Collection | string | Collection name for this action | no |
Id | string | id for this action | no |
Volatile | VolatileData | Additional information to send to Kuzzle | no |
options #
A QueryOptions containing additional query options Theses properties can bet Get/Set. The following properties are the most common.
Property | Type | Description | Default |
---|---|---|---|
Queuable | bool | Make this request queuable or not | true |
responseChannel #
A channel to receive the API response. This channel will receive a KuzzleResponse
Return #
Return a Kuzzle error if the SDK can not connect to Kuzzle.
Edit this page on Github(opens new window)