{"id":23469906,"url":"https://github.com/vapor-ware/synse-client-go","last_synced_at":"2025-04-12T23:46:18.418Z","repository":{"id":48279526,"uuid":"159517763","full_name":"vapor-ware/synse-client-go","owner":"vapor-ware","description":"Golang client library for interacting with Synse Server","archived":false,"fork":false,"pushed_at":"2023-05-16T17:57:53.000Z","size":192,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-21T22:03:10.368Z","etag":null,"topics":["http-client","synse","synse-server","websocket-client"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vapor-ware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-28T14:50:26.000Z","updated_at":"2022-08-18T19:25:33.000Z","dependencies_parsed_at":"2023-01-29T15:46:07.790Z","dependency_job_id":null,"html_url":"https://github.com/vapor-ware/synse-client-go","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-ware%2Fsynse-client-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-ware%2Fsynse-client-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-ware%2Fsynse-client-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-ware%2Fsynse-client-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vapor-ware","download_url":"https://codeload.github.com/vapor-ware/synse-client-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647256,"owners_count":21139081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http-client","synse","synse-server","websocket-client"],"created_at":"2024-12-24T15:36:48.977Z","updated_at":"2025-04-12T23:46:18.402Z","avatar_url":"https://github.com/vapor-ware.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/vapor-ware/synse-client-go/workflows/build/badge.svg)](https://github.com/vapor-ware/synse-client-go/actions)\n[![Godoc](https://godoc.org/github.com/vapor-ware/synse-client-go/synse?status.svg)](https://godoc.org/github.com/vapor-ware/synse-client-go/synse)\n[![Go Report Card](https://goreportcard.com/badge/github.com/vapor-ware/synse-client-go)](https://goreportcard.com/report/github.com/vapor-ware/synse-client-go)\n\n# Synse Client (Golang)\n\nThe official HTTP and WebSocket client for interacting with the Synse Server API,\nwritten in Go.\n\nFor details on the Synse Server API, see the\n[API Documentation](https://synse.readthedocs.io/en/latest/server/api.v3/).\n\n## Installing\n\nThis package can be installed via `go get`\n\n```\ngo get github.com/vapor-ware/synse-client-go\n```\n\n## Using\n\n### Initializing\n\nBoth the HTTP and WebSocket client must be initialized with\n[configuration options](https://godoc.org/github.com/vapor-ware/synse-client-go/synse#Options).\nThese options identify the Synse Server instance to communicate with as well as\nset other connection-related capabilities (timeout, TLS, etc).\n\n```go\nimport \"github.com/vapor-ware/synse-client-go/synse\"\n\nfunc main() {\n\topts := \u0026synse.Options{\n\t\tAddress: \"localhost\",\n\t}\n\n\tclient, err := NewHTTPClientV3(opts)\n\t// or client, err := NewWebSocketClientV3(opts)\n}\n```\n\n### API\n\nThe table below describes which API endpoint/event correspond with each client method.\n\n| Method | HTTP endpoint | WebSocket request |\n| ------ | ------------- | ----------------- |\n| `Status()` | `/test` | `request/status` |\n| `Version()` | `/version` | `request/version` |\n| `Config()` | `/v3/config` | `request/config` |\n| `Plugins()` | `/v3/plugin` | `request/plugins` |\n| `Plugin(string)` | `/v3/plugin/{plugin_id}` | `request/plugin` |\n| `PluginHealth()` | `/v3/plugin/health` | `request/plugin_health` |\n| `Scan(scheme.ScanOptions)` | `/v3/scan` | `request/scan` |\n| `Tags(scheme.TagsOptions)` | `/v3/tags` | `request/tags` |\n| `Info(string)` | `/v3/info/{device_id}` | `request/info` |\n| `Read(scheme.ReadOptions)` | `/v3/read` | `request/read` |\n| `ReadDevice(string, scheme.ReadOptions)` | `/v3/read/{device_id}` | `request/read_device` |\n| `ReadCache(scheme.ReadCacheOptions)` | `/v3/readcache` | `request/read_cache` |\n| `WriteAsync(string, []scheme.WriteData)` | `/v3/write/{device_id}` | `request/write_async` |\n| `WriteSync(string, []scheme.WriteData)` | `/v3/write/wait/{device_id}` | `request/write_sync` |\n| `Transactions()` | `/v3/transaction` | `request/transactions` |\n| `Transaction(string)` | `/v3/transaction/{transaction_id}` | `request/transaction` |\n\nAdditionally, there are a few client methods which do not correspond to an API endpoint:\n\n| Method | Description |\n| ------ | ----------- |\n| `GetOptions()` | Return the current config options of the client. |\n| `Open()` | Open the WebSocket connection between the client and Synse Server. *WebSocket client only.* |\n| `Close()` | Close the WebSocket connection between the client and Synse Server. *WebSocket client only.* |\n\nFor more information about the response scheme, please refer to the\n[documentation](https://godoc.org/github.com/vapor-ware/synse-client-go/synse#Client).\n\n## Developing\n\nTo provide a simple and uniform development flow, Makefile targets should be used for\nbasic development actions. To lint and format the project source code:\n\n```\nmake lint\nmake fmt\n```\n\nTo run all unit tests:\n\n```\nmake test\n```\n\nFor a full accounting of available targets, see the Makefile or run `make help`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvapor-ware%2Fsynse-client-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvapor-ware%2Fsynse-client-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvapor-ware%2Fsynse-client-go/lists"}