Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kuzzleio/sdk-go

Golang SDK using the WebSocket protocol to communicate with Kuzzle API including offline resiliency
https://github.com/kuzzleio/sdk-go

golang kuzzle kuzzle-sdk offline-first swig

Last synced: about 2 months ago
JSON representation

Golang SDK using the WebSocket protocol to communicate with Kuzzle API including offline resiliency

Awesome Lists containing this project

README

        






GitHub branch checks state










undefined

## About

### Kuzzle Go

This is the official Go SDK for the free and open-source backend Kuzzle. It provides a way to dial with a Kuzzle server from Go applications.
The SDK provides a native __WebSocket__ support. You can add your own network protocol by implementing the Protocol interface.


:books: Documentation

### Kuzzle

Kuzzle is a ready-to-use, **on-premises and scalable backend** that enables you to manage your persistent data and be notified in real-time on whatever happens to it.
It also provides you with a flexible and powerful user-management system.

* :watch: __[Kuzzle in 5 minutes](https://kuzzle.io/company/about-us/kuzzle-in-5-minutes/)__
* :octocat: __[Github](https://github.com/kuzzleio/kuzzle)__
* :earth_africa: __[Website](https://kuzzle.io)__
* :books: __[Documentation](https://docs.kuzzle.io)__
* :email: __[Discord](http://join.discord.kuzzle.io)__

### Get trained by the creators of Kuzzle :zap:

Train yourself and your teams to use Kuzzle to maximize its potential and accelerate the development of your projects.
Our teams will be able to meet your needs in terms of expertise and multi-technology support for IoT, mobile/web, backend/frontend, devops.
:point_right: [Get a quote](https://hubs.ly/H0jkfJ_0)

## Usage

### Installation

Simply download the SDK to your `GOPATH`.

```go
go get github.com/kuzzleio/sdk-go
```

### Example

The SDK supports different protocols. When instantiating,
you must choose the protocol to use and fill in the different options needed to connect to Kuzzle.

```go
package main

import (
"fmt"

"github.com/kuzzleio/sdk-go/kuzzle"
"github.com/kuzzleio/sdk-go/protocol/websocket"
)

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

timestamp, err := k.Server.Now(nil)

if err != nil {
fmt.Println(err.Error())
return
}

fmt.Println(timestamp)
}
```

## Contributing

First of all, thank you to take the time to contribute to this SDK. To help us validating your future pull request,
please make sure your work pass linting and unit tests.

```bash
$ bash .ci/test_with_coverage.sh
```

If you want to see current coverage run the script with this argument.

```bash
$ bash .ci/test_with_coverage.sh --html
```

This should open a new tab in your favorite web browser and allow you to see the lines of code covered by the unit tests.