Official golang SDK for Kuzzle
Clone or download
alexandrebouthinon and scottinet [KZL-489] Multistage / multiarch test (#204)
* [KZL-489] Multistage build

* [KZL-489] Fix tests

Fix ms.pexpireAt and tests to fit
32bits requirments
Latest commit 7ea08a0 Sep 24, 2018

Build Status GoDoc Go Report Card

Official Kuzzle GO SDK with wrappers for C++ and JAVA SDK

About Kuzzle

A backend software, self-hostable and ready to use to power modern apps.

You can access the Kuzzle repository on Github

SDK Documentation

The complete SDK documentation is available here


go get

Basic usage

func main() {
    conn := websocket.NewWebSocket("localhost:7512", nil)
    k, _ := kuzzle.NewKuzzle(conn, nil)

    res, err := k.GetAllStatistics(nil)

    if err != nil {

    for _, stat := range res {
        fmt.Println(stat.Timestamp, stat.FailedRequests, stat.Connections, stat.CompletedRequests, stat.OngoingRequests)

Running Tests

### Unit tests

To run the tests you can simply execute the script


You can also get html coverage by running

./ --html

### e2e tests


cd internal/wrappers
make java
cd features/java
gradle cucumber


make cpp
cd internal/wrappers
./_build_cpp_tests/KuzzleSDKStepDefs > /dev/null &


### Dependencies

Before generating the wrappers you will need to install:

  • You will need a g++ compatible C++11
  • swig
  • Java 8 (don't forget to set your JAVA_HOME environment variable)
  • Python You will need to install python-dev to compile the python SDK



make java

You will find the final jars files in internal/wrappers/build/java/build/libs


make cpp

You will find the final .so file in internal/wrappers/build/cpp


make python

You will find the final .so file in internal/wrappers/build/python


Build on Windows


Compiling Csharp

  • Add Go/Mono/Make/MinGW intallation directory to PATH
  • Run Visual Studio developper command line tool
  • Execute make csharp

All at once

You can generate all sdk's at once by typing

make all

Generate wrappers and launch e2e tests using Docker

You can use Docker to simplify wrappers generation and testing


In project root, use:

$ docker run --rm -it -v "$(pwd)":/go/src/ kuzzleio/sdk-cross:amd64 /

This command will build all wrappers using our Docker Image


E2E tests need a running Kuzzle instance so run the script:

$ sh .codepipeline/

Now run tests using Docker:

$ docker run --rm -it --network codepipeline_default --link kuzzle -v "$(pwd)":/go/src/ kuzzleio/sdk-cross:amd64 /


Apache 2