systemKey // string
Required. The systemKey of the system to connect to. Retrievable from the Console's System Settings.
systemSecret // string
Required. The systemSecret of the system to connect to. Retrievable from the Console's System Settings.
email // string
Email of non-dev user to connect to system as. If registerUser key is not provided, the user must be registered through the Auth tab of the console, and given appropriate roles.
password // string
Password of non-dev user to connect to system as.
Authenticates credentials set on userClient and sets session token
Register a new user with the platform.
username // string
Email of the new user
password // string
Password of the new user
Register a new user with the platform, and return response with token
username // string
Email of the new user
password // string
Password of the new user
End session for current user
Insert new item in the collection
collection_id // string
ID assigned to the collection by the system
data // interface
Representatation of data object to be inserted
Insert new item in the collection and return the response
collection_id // string
ID assigned to the collection by the system
data // interface
Representation of data object to be inserted
Retrieve array of items from the collection using the collection ID
collectionId // string
ID assigned to the collection by the system
query // *GoSDK.Query
Custom query created using this SDK
Retrieve array of items from the collection using the collection name
collectionName // string
Name assigned to the collection by the developer
query // *GoSDK.Query
Custom query created using this SDK
userClient.UpdateData(collection_id string, query *GoSDK.Query, changes map[string]interface{}) error
Updates existing items in the collection that match the provided query
collectionId // string
ID assigned to the collection by the system
query // *GoSDK.Query
Custom query created using this SDK
changes // map[string]interface{}
Key-value pairs representing column names to be updated and new values
Removes every item in the collection that match the provided query
collectionId // string
ID assigned to the collection by the system
query // *GoSDK.Query
Custom query created using this SDK
Retrieves column names, types and primary keys for a collection
collectionId // string
ID assigned to the collection by the system
Returns new Query to be used in Data operations
Select where field is equal to value
field // string
Field / column name in collection
value // interface{}
Data to match in field
Select where field is > to value
field // string
Field / column name in collection
value // interface{}
Data to match in field
Select where field is >= to value
field // string
Field / column name in collection
value // interface{}
Data to match in field
Select where field is < to value
field // string
Field / column name in collection
value // interface{}
Data to match in field
Select where field is <= to value
field // string
Field / column name in collection
value // interface{}
Data to match in field
Select where field is != to value
field // string
Field / column name in collection
value // interface{}
Data to match in field
Query where field is ~ than value using regex
field // string
Field / column name in collection
value // interface{}
Data to match in field
Join two queries together with OR condition
orQuery // *GoSDK.Query
Second GoSDk.Query
userClient.CallService(systemKey, name string, params map[string]interface{}) (map[string]interface{}, error)
Run a named code service that exists on the system with options, and returns the response object or an error
systemKey // string
Key to system that contains desired code service
name // string
Name of code service to be executed
params // map[string]interface{}
Request object to be passed to code service function on execution
Set required MQTT options on user client
clientid // string
MQTT client id
ignore // string
Not used, default to ""
timeout // int
Timeout value for MQTT client in Seconds
Establish MQTT connection for set user
clientid // *tls.Config,
lastWill // *GoSDK.LastWillPacket,
Publish message on MQTT topic
topic // string
MQTT topic to publish on
message // []byte
Byte-seralized message
qos // int
QOS priority for message
Asynchronoulsy subscribe to MQTT topic and push messages onto channel as they arrive
topic // string
MQTT topic to subscribe
qos // int
QOS priority for message
Stop subscription to MQTT topic
topic // string
MQTT topic to unsusbcribe
End MQTT connection for set user
Follow the instructions for downloading and installing Go from https://golang.org/doc/install
Do a git clone https://github.com/ClearBlade/Go-SDK.git
to clone the Go-SDK for the ClearBlade Platform.
In order to use the Go-SDK in your project, you will need to import the Go-SDK package that you cloned from github, in your project.
import (
cb "github.com/clearblade/Go-SDK"
)