https://github.com/elimity-com/insights-client-go
Official Go client for Elimity Insights
https://github.com/elimity-com/insights-client-go
Last synced: 5 months ago
JSON representation
Official Go client for Elimity Insights
- Host: GitHub
- URL: https://github.com/elimity-com/insights-client-go
- Owner: elimity-com
- Created: 2020-02-07T09:31:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-17T09:00:09.000Z (over 2 years ago)
- Last Synced: 2024-06-22T04:57:22.587Z (about 2 years ago)
- Language: Go
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Elimity Insights Go client
This Go module provides functions for connector interactions with an Elimity Insights server.
## Usage
```go
package main
import (
"github.com/elimity-com/insights-client-go/v6"
"time"
)
func main() {
now := time.Now()
log := insights.ConnectorLog{
Level: "info",
Message: "Hello world!",
Timestamp: now,
}
logs := []insights.ConnectorLog{log}
if err := insights.CreateSourceConnectorLogs("https://example.elimity.com", "42", "my-token", logs); err != nil {
panic(err)
}
}
```
## Installation
```sh
$ go get github.com/elimity-com/insights-client-go/v6
```
## Setting up the development environment
### Generating a GitHub access token for accessing the development image
The development image is hosted on the GitHub Container registry, more specifically at
`ghcr.io/elimity-com/insights-client-go`. You can access the registry by
[generating a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-token)
with read permission for packages, and then providing it to Docker by running `docker login ghcr.io`.
### Setting up the development environment
This repository contains a `docker-compose.yml` file to configure a development container. You can set up the
environment by running `docker compose up -d`.
## Compatibility
| Client version | Insights version |
|----------------|------------------|
| 1 | 2.7 - 2.11 |
| 2 | 2.12 - 3.0 |
| 3 | 3.1 - 3.5 |
| 4 | ^3.6 |
| 6 | ^3.27 |