Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

lab5e/spanclient-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for spanclient

API for device, collection, output and firmware management

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 4.1.3 factual-kahlil
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://lab5e.com/span

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional

Put the package under your project folder and add the following in import:

import "./spanclient"

Documentation for API Endpoints

All URIs are relative to https://api.lab5e.com/span

Class Method HTTP request Description
CollectionsApi BroadcastMessage Post /collections/{collectionId}/to Broadcast message
CollectionsApi CreateCollection Post /collections Create collection
CollectionsApi DeleteCollection Delete /collections/{collectionId} Delete collection
CollectionsApi ListCollectionData Get /collections/{collectionId}/data Get payloads
CollectionsApi ListCollections Get /collections List collections
CollectionsApi RetrieveCollection Get /collections/{collectionId} Retrieve collection
CollectionsApi UpdateCollection Patch /collections/{collectionId} Update collection
DatadumpApi DataDump Post /datadump Data dump
DevicesApi CreateDevice Post /collections/{collectionId}/devices Create device
DevicesApi DeleteDevice Delete /collections/{collectionId}/devices/{deviceId} Remove device
DevicesApi ListDeviceData Get /collections/{collectionId}/devices/{deviceId}/data Get payloads
DevicesApi ListDevices Get /collections/{collectionId}/devices List devices
DevicesApi RetrieveDevice Get /collections/{collectionId}/devices/{deviceId} Retrieve device
DevicesApi SendMessage Post /collections/{collectionId}/devices/{deviceId}/to Send message
DevicesApi UpdateDevice Patch /collections/{existingCollectionId}/devices/{deviceId} Update device
FotaApi ClearFirmwareError Delete /collections/{collectionId}/devices/{deviceId}/fwerror Clear FOTA error
FotaApi CreateFirmware Post /collections/{collectionId}/firmware Create firmware
FotaApi DeleteFirmware Delete /collections/{collectionId}/firmware/{imageId} Delete firmware
FotaApi FirmwareUsage Patch /collections/{collectionId}/firmware/{imageId}/usage Firmware usage
FotaApi ListFirmware Get /collections/{collectionId}/firmware List firmware
FotaApi RetrieveFirmware Get /collections/{collectionId}/firmware/{imageId} Retrieve firmware
FotaApi UpdateFirmware Patch /collections/{collectionId}/firmware/{imageId} Update firmware
OutputsApi CreateOutput Post /collections/{collectionId}/outputs Create output
OutputsApi DeleteOutput Delete /collections/{collectionId}/outputs/{outputId} Delete output
OutputsApi ListOutputs Get /collections/{collectionId}/outputs List outputs
OutputsApi Logs Get /collections/{collectionId}/outputs/{outputId}/logs Output logs
OutputsApi RetrieveOutput Get /collections/{collectionId}/outputs/{outputId} Retrieve output
OutputsApi Status Get /collections/{collectionId}/outputs/{outputId}/status Output status
OutputsApi UpdateOutput Patch /collections/{collectionId}/outputs/{outputId} Update output
SystemApi GetSystemInfo Get /system System information

Documentation For Models

Documentation For Authorization

APIToken

  • Type: API key

Example

auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
    Key: "APIKEY",
    Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)

Author

dev@lab5e.com