SDK
SDK Golang v3.x
2

Send #

Sends a query to the Kuzzle API.

Signature #

Send(query []byte, options types.QueryOptions, responseChannel chan<- *types.KuzzleResponse, requestId string) error

Arguments #

ArgumentTypeDescription
query
[]byte
API request
options
QueryOptions
Additional query options
responseChannelchan<- *types.KuzzleResponseA 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.

PropertyTypeDescriptionRequired
ControllerstringController nameyes
ActionstringAction nameyes
Bodyinterface{}Query body for this actionno
IndexstringIndex name for this actionno
CollectionstringCollection name for this actionno
Idstringid for this actionno
VolatileVolatileDataAdditional information to send to Kuzzleno

options #

A QueryOptions containing additional query options Theses properties can bet Get/Set. The following properties are the most common.

PropertyTypeDescriptionDefault
QueuableboolMake this request queuable or nottrue

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.