Git Product home page Git Product logo

go-iot's Introduction

Cloud IoT API

ClearBlade IoT Core API's Go client library Go Reference

Setting up service account credentials

Create a service account in your project and download the credentials .json file. Define environment variable CLEARBLADE_CONFIGURATION, representing the credentials .json file's path. Example:

export CLEARBLADE_CONFIGURATION=/path/to/file.json

Authorization

See the Authorization documentation for authorizing SDK with ClearBlade iot-core.

API Documentation

View the Go sections of these Samples.

go-iot's People

Contributors

andrewhdev avatar clarkbynum avatar ekeminusyou avatar jslavin-clearblade avatar rajasd27 avatar sky-sharma avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-iot's Issues

proposal: Allow List device registries method to handle and return an error

List device registries

// List: Lists device registries.
//
//   - parent: The project and cloud region path. For example,
//     `projects/example-project/locations/us-central1`.
func (r *ProjectsLocationsRegistriesService) List(parent string) *ProjectsLocationsRegistriesListCall {
	c := &ProjectsLocationsRegistriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	c.urlParams_.Set("parent", parent)
	return c
}

two kinds of googleapis are used and WrapError doesn't return apierror.APIError

While iot.go uses

  • "github.com/clearblade/go-iot/cblib/googleapi"

cblib.gensupport uses

  • "google.golang.org/api/googleapi"

Because of this problem, gensupports' WrapError doesn't return apierror.APIError. Following test faiils.

call := c.iot.Projects.Locations.Registries.Devices.Get(c.devicePath(deviceID)).Context(c.ctx)
_, err := call.Do()
e, ok := err.(*apierror.APIError)
if !ok {
	t.Fatalf("expect apierror.APIError type. err: %v", err)
}

Please use either of these two module.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.