Documentation ¶
Index ¶
- Constants
- Variables
- func CreateNewEdge(e EdgeConfig) (*os.Process, error)
- func CreateNewEdgeWithCmd(e EdgeConfig) (*exec.Cmd, *os.Process, error)
- func GenerateConnectCollection(co map[string]interface{}) (connectCollection, error)
- func GetServiceNames(c cbClient, systemKey string) ([]string, error)
- type Callbacks
- type CbReq
- type CbResp
- type Client
- type CodeLog
- type DevClient
- func NewDevClient(email, password string) *DevClient
- func NewDevClientWithAddrs(httpAddr, mqttAddr, email, password string) *DevClient
- func NewDevClientWithToken(token, email string) *DevClient
- func NewDevClientWithTokenAndAddrs(httpAddr, mqttAddr, token, email string) *DevClient
- func NewEdgeProxyDevClient(email, password, systemKey, edgeName string) (*DevClient, error)
- func (d *DevClient) AddCollectionToRole(systemKey, collection_id, role_id string, level int) error
- func (d *DevClient) AddColumn(collection_id, column_name, column_type string) error
- func (d *DevClient) AddDeviceToRoles(systemKey, deviceName string, roles []string) error
- func (d *DevClient) AddGenericPermissionToRole(systemKey, roleId, permission string, level int) error
- func (d *DevClient) AddPortalToRole(systemKey, portalName, roleId string, level int) error
- func (d *DevClient) AddServiceToRole(systemKey, service, roleId string, level int) error
- func (d *DevClient) AddTopicToRole(systemKey, topic, roleId string, level int) error
- func (d *DevClient) AddUserToRoles(systemKey, userId string, roles []string) error
- func (d *DevClient) AlterConnectionDetails(systemkey string, connectConfig connectCollection) error
- func (d *DevClient) AreServiceLogsEnabled(systemKey, name string) (bool, error)
- func (d *DevClient) Authenticate() error
- func (d *DevClient) CallService(systemKey, name string, params map[string]interface{}, log bool) (map[string]interface{}, error)
- func (d *DevClient) CheckAuth() error
- func (d *DevClient) ControlAdaptor(systemKey, adaptorName string, controlSpec map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) CreateAdaptor(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) CreateAdaptorFile(systemKey, adaptorName, fileName string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) CreateData(collection_id string, data interface{}) ([]interface{}, error)
- func (d *DevClient) CreateDeployResourcesForSystem(systemKey, resourceName, resourceType string, platform bool, ...) (map[string]interface{}, error)
- func (d *DevClient) CreateDeploymentByName(systemKey, name string, info map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) CreateDevice(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) CreateDeviceColumn(systemKey, columnName, columnType string) error
- func (d *DevClient) CreateEdge(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) CreateEdgeColumn(systemKey, colName, colType string) error
- func (d *DevClient) CreateEdgeGroup(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) CreateEventHandler(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) CreateLibrary(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) CreatePlugin(systemKey string, plugin map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) CreatePortal(systemKey, name string, dash map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) CreateRole(systemKey, role_id string) (interface{}, error)
- func (u *DevClient) CreateService(systemKey, name, code string, params []string) error
- func (d *DevClient) CreateTimer(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) CreateTrigger(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) CreateUserColumn(systemKey, columnName, columnType string) error
- func (d *DevClient) DeleteAdaptor(systemKey, name string) error
- func (d *DevClient) DeleteAdaptorFile(systemKey, adaptorName, fileName string) error
- func (d *DevClient) DeleteCollection(colID string) error
- func (d *DevClient) DeleteColumn(collection_id, column_name string) error
- func (d *DevClient) DeleteData(collection_id string, query *Query) error
- func (d *DevClient) DeleteDeployResourcesForSystem(systemKey, resourceName, resourceType string) error
- func (d *DevClient) DeleteDeploymentByName(systemKey, name string) error
- func (d *DevClient) DeleteDevice(systemKey, name string) error
- func (d *DevClient) DeleteDeviceColumn(systemKey, columnName string) error
- func (d *DevClient) DeleteDeviceSession(systemKey string, query *Query) error
- func (d *DevClient) DeleteDevices(systemKey string, query *Query) error
- func (d *DevClient) DeleteEdge(systemKey, name string) error
- func (d *DevClient) DeleteEdgeColumn(systemKey, colName string) error
- func (d *DevClient) DeleteEdgeGroup(systemKey, name string) error
- func (d *DevClient) DeleteEventHandler(systemKey, name string) error
- func (d *DevClient) DeleteFailedServices(systemKey string, ids []string) ([]map[string]interface{}, error)
- func (d *DevClient) DeleteKeyset(systemKey, name string) error
- func (d *DevClient) DeleteLibrary(systemKey, name string) error
- func (d *DevClient) DeletePlugin(systemKey, name string) (map[string]interface{}, error)
- func (d *DevClient) DeletePortal(systemKey, name string) error
- func (d *DevClient) DeleteRole(systemKey, roleId string) error
- func (d *DevClient) DeleteService(systemKey, name string) error
- func (d *DevClient) DeleteSystem(s string) error
- func (d *DevClient) DeleteTimer(systemKey, name string) error
- func (d *DevClient) DeleteTrigger(systemKey, name string) error
- func (d *DevClient) DeleteUser(systemKey, userId string) error
- func (d *DevClient) DeleteUserColumn(systemKey, columnName string) error
- func (d *DevClient) DeleteUserSession(systemKey string, query *Query) error
- func (d *DevClient) DeployAdaptor(systemKey, adaptorName string, deploySpec map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) DevUserInfo() (map[string]interface{}, error)
- func (d *DevClient) DisableLogsForService(systemKey, name string) error
- func (d *DevClient) Disconnect() error
- func (d *DevClient) EnableLogsForService(systemKey, name string) error
- func (d *DevClient) EnterProvisioningMode() (map[string]interface{}, error)
- func (d *DevClient) EnterRuntimeMode(info map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) GenerateKeyset(systemKey, name string, count int) (map[string]interface{}, error)
- func (d *DevClient) GetAdaptor(systemKey, name string) (map[string]interface{}, error)
- func (d *DevClient) GetAdaptorFile(systemKey, adaptorName, fileName string) (map[string]interface{}, error)
- func (d *DevClient) GetAdaptorFiles(systemKey, adaptorName string) ([]interface{}, error)
- func (d *DevClient) GetAdaptors(systemKey string) ([]interface{}, error)
- func (d *DevClient) GetAllCollections(systemKey string) ([]interface{}, error)
- func (d *DevClient) GetAllDeployments(systemKey string) ([]interface{}, error)
- func (d *DevClient) GetAllRoles(SystemKey string) ([]interface{}, error)
- func (d *DevClient) GetAllUsers(systemKey string) ([]map[string]interface{}, error)
- func (d *DevClient) GetAssetClassDeployments(systemKey, assetClass string) (map[string]interface{}, error)
- func (d *DevClient) GetAssetDeployments(systemKey, assetClass, assetId string) (map[string]interface{}, error)
- func (d *DevClient) GetAssetPlatformDeploymentStatus(systemKey, assetClass, assetId string) (map[string]interface{}, error)
- func (d *DevClient) GetAssetsDeployedToEntity(systemKey, entityType, entityName string) (map[string]interface{}, error)
- func (d *DevClient) GetAssetsNotDeployedOnPlatform(systemKey string, query *Query) ([]interface{}, error)
- func (d *DevClient) GetCollectionInfo(collection_id string) (map[string]interface{}, error)
- func (d *DevClient) GetColumns(collectionId, systemKey, systemSecret string) ([]interface{}, error)
- func (d *DevClient) GetCurrentTopics(systemKey string) ([]string, error)
- func (d *DevClient) GetCurrentTopicsCount(systemKey string) (map[string]interface{}, error)
- func (d *DevClient) GetCurrentTopicsWithQuery(systemKey string, columns []string, pageSize, pageNum int, descending bool) ([]map[string]interface{}, error)
- func (d *DevClient) GetData(collection_id string, query *Query) (map[string]interface{}, error)
- func (d *DevClient) GetDataByKeyAndName(string, string, *Query) (map[string]interface{}, error)
- func (d *DevClient) GetDataByName(collectionName string, query *Query) (map[string]interface{}, error)
- func (d *DevClient) GetDataTotal(collection_id string, query *Query) (map[string]interface{}, error)
- func (d *DevClient) GetDeployResourcesForSystem(systemKey string) ([]map[string]interface{}, error)
- func (d *DevClient) GetDeploymentByName(systemKey, name string) (map[string]interface{}, error)
- func (d *DevClient) GetDevelopersForSystem(systemKey string) (map[string]interface{}, error)
- func (d *DevClient) GetDevice(systemKey, name string) (map[string]interface{}, error)
- func (d *DevClient) GetDeviceColumns(systemKey string) ([]interface{}, error)
- func (d *DevClient) GetDeviceRoles(systemKey, deviceName string) ([]string, error)
- func (d *DevClient) GetDeviceSession(systemKey string, query *Query) ([]interface{}, error)
- func (d *DevClient) GetDevices(systemKey string, query *Query) ([]interface{}, error)
- func (d *DevClient) GetEdge(systemKey, name string) (map[string]interface{}, error)
- func (d *DevClient) GetEdgeColumns(systemKey string) ([]interface{}, error)
- func (d *DevClient) GetEdgeGroup(systemKey, name string, recursive bool) (map[string]interface{}, error)
- func (d *DevClient) GetEdgeGroups(systemKey string, query *Query) ([]interface{}, error)
- func (d *DevClient) GetEdges(systemKey string) ([]interface{}, error)
- func (d *DevClient) GetEdgesWithQuery(systemKey string, query *Query) ([]interface{}, error)
- func (d *DevClient) GetEventDefinitions() ([]interface{}, error)
- func (d *DevClient) GetEventHandler(systemKey, name string) (map[string]interface{}, error)
- func (d *DevClient) GetEventHandlers(systemKey string) ([]interface{}, error)
- func (d *DevClient) GetFailedServices(systemKey string) ([]map[string]interface{}, error)
- func (d *DevClient) GetItemCount(collection_id string) (int, error)
- func (d *DevClient) GetKeyset(systemKey, name string) (map[string]interface{}, error)
- func (d *DevClient) GetLibraries(systemKey string) ([]interface{}, error)
- func (d *DevClient) GetLibrary(systemKey, name string) (map[string]interface{}, error)
- func (d *DevClient) GetLogsForService(systemKey, name string) ([]CodeLog, error)
- func (d *DevClient) GetPlatformDBConnections(systemKey string, query *Query) (map[string]interface{}, error)
- func (d *DevClient) GetPlatformLogs(systemKey string, query *Query) (map[string]interface{}, error)
- func (d *DevClient) GetPlatformStatistics(systemKey string, query *Query) (map[string]interface{}, error)
- func (d *DevClient) GetPlugin(systemKey, name string) (map[string]interface{}, error)
- func (d *DevClient) GetPlugins(systemKey string) ([]interface{}, error)
- func (d *DevClient) GetPortal(systemKey, name string) (map[string]interface{}, error)
- func (d *DevClient) GetPortals(systemKey string) ([]interface{}, error)
- func (d *DevClient) GetService(systemKey, name string) (*Service, error)
- func (d *DevClient) GetServiceNames(systemKey string) ([]string, error)
- func (d *DevClient) GetServiceRaw(systemKey, name string) (map[string]interface{}, error)
- func (d *DevClient) GetSyncResourcesForEdge(systemKey string) (map[string]interface{}, error)
- func (d *DevClient) GetSystem(key string) (*System, error)
- func (d *DevClient) GetSystemAssetDeployments(systemKey string, query *Query) ([]interface{}, error)
- func (d *DevClient) GetSystemsForDeveloper(devId string) (map[string]interface{}, error)
- func (d *DevClient) GetTimer(systemKey, name string) (map[string]interface{}, error)
- func (d *DevClient) GetTimers(systemKey string) ([]interface{}, error)
- func (d *DevClient) GetTrigger(systemKey, name string) (map[string]interface{}, error)
- func (d *DevClient) GetTriggers(systemKey string) ([]interface{}, error)
- func (d *DevClient) GetUserColumns(systemKey string) ([]interface{}, error)
- func (d *DevClient) GetUserInfo(systemKey, email string) (map[string]interface{}, error)
- func (d *DevClient) GetUserRoles(systemKey, userId string) ([]string, error)
- func (d *DevClient) GetUserSession(systemKey string, query *Query) ([]interface{}, error)
- func (d *DevClient) GetVersion(systemKey, name string, version int) (map[string]interface{}, error)
- func (d *DevClient) GetVersionHistory(systemKey, name string) ([]interface{}, error)
- func (d *DevClient) InitializeMQTT(clientid, systemkey string, timeout int, ssl *tls.Config, ...) error
- func (d *DevClient) InitializeMQTTWithCallback(clientid, systemkey string, timeout int, ssl *tls.Config, ...) error
- func (d *DevClient) InsertData(collection_id string, data interface{}) error
- func (d *DevClient) Logout() error
- func (d *DevClient) MessageHistory(systemKey string) (interface{}, error)
- func (b *DevClient) NewClientID() string
- func (d *DevClient) NewCollection(systemKey, name string) (string, error)
- func (d *DevClient) NewConnectCollection(systemkey string, connectConfig connectCollection) (string, error)
- func (d *DevClient) NewService(systemKey, name, code string, params []string) error
- func (d *DevClient) NewServiceWithLibraries(systemKey, name, code, deps string, params []string) error
- func (d *DevClient) NewSystem(name, description string, users bool) (string, error)
- func (d *DevClient) Publish(topic string, message []byte, qos int) error
- func (d *DevClient) PublishHttp(systemKey, topic string, message []byte, qos int) error
- func (d *DevClient) Register(username, password, fname, lname, org string) error
- func (d *DevClient) RegisterDevUser(username, password, fname, lname, org string) (map[string]interface{}, error)
- func (d *DevClient) RegisterDevUserWithKey(username, password, fname, lname, org, key string) (map[string]interface{}, error)
- func (d *DevClient) RegisterNewUser(username, password, systemkey, systemsecret string) (map[string]interface{}, error)
- func (d *DevClient) RetryFailedServices(systemKey string, ids []string) ([]string, error)
- func (d *DevClient) RotateKeyset(systemKey, name string) (map[string]interface{}, error)
- func (d *DevClient) SetLongRunningServiceParams(systemKey, name string, autoRestart bool, concurrency int) error
- func (d *DevClient) SetMqttClient(c MqttClient)
- func (d *DevClient) SetServiceEffectiveUser(systemKey, name, userid string) error
- func (d *DevClient) SetSystemAuthOff(system_key string) error
- func (d *DevClient) SetSystemAuthOn(system_key string) error
- func (d *DevClient) SetSystemDescription(system_key, system_description string) error
- func (d *DevClient) SetSystemName(system_key, system_name string) error
- func (d *DevClient) SetSystemTokenTTL(system_key string, token_ttl int) error
- func (d *DevClient) Subscribe(topic string, qos int) (<-chan *mqttTypes.Publish, error)
- func (d *DevClient) SyncResourceToEdge(systemKey, edgeName string, add map[string][]string, ...) (map[string]interface{}, error)
- func (d *DevClient) Unsubscribe(topic string) error
- func (d *DevClient) UpdateAdaptor(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateAdaptorFile(systemKey, adaptorName, fileName string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateAssetClassDeployments(systemKey, assetClass string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateAssetDeployments(systemKey, assetClass, assetId string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateAssetPlatformDeploymentStatus(systemKey, assetClass, assetId string, deploy bool) (map[string]interface{}, error)
- func (d *DevClient) UpdateAutoDelete(systemKey string, preamble string, size_limit int, expiry_messages int64, ...) (bool, error)
- func (d *DevClient) UpdateData(collection_id string, query *Query, changes map[string]interface{}) error
- func (d *DevClient) UpdateDeployResourcesForSystem(systemKey, resourceName, resourceType string, platform bool, edgeQuery *Query) (map[string]interface{}, error)
- func (d *DevClient) UpdateDeploymentByName(systemKey, name string, changes map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateDevelopersForSystem(systemKey string, changes map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateDevice(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateDeviceRoles(systemKey, deviceName string, rolesAdd, rolesRemove []string) error
- func (d *DevClient) UpdateDevices(systemKey string, query *Query, changes map[string]interface{}) ([]interface{}, error)
- func (d *DevClient) UpdateEdge(systemKey string, name string, changes map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateEdgeGroup(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateEventHandler(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateLibrary(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdatePlugin(systemKey, name string, dash map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdatePortal(systemKey, name string, dash map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateRole(systemKey, roleName string, role map[string]interface{}) error
- func (d *DevClient) UpdateService(systemKey, name, code string, params []string) (error, map[string]interface{})
- func (d *DevClient) UpdateServiceWithLibraries(systemKey, name, code, deps string, params []string) (error, map[string]interface{})
- func (d *DevClient) UpdateTimer(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateTrigger(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateUser(systemKey, userId string, info map[string]interface{}) error
- func (d *DevClient) UpdateUserRoles(systemKey, userId string, rolesAdd, rolesRemove []string) error
- type DeviceClient
- func NewDeviceClient(systemkey, systemsecret, deviceName, activeKey string) *DeviceClient
- func NewDeviceClientWithAddrs(httpAddr, mqttAddr, systemkey, systemsecret, deviceName, activeKey string) *DeviceClient
- func NewEdgeProxyDeviceClient(systemkey, systemsecret, deviceName, activeKey, edgeName string) (*DeviceClient, error)
- func (dvc *DeviceClient) Authenticate() error
- func (d *DeviceClient) AuthenticateDeviceWithKey(systemKey, name, activeKey string) (map[string]interface{}, error)
- func (d *DeviceClient) ControlAdaptor(systemKey, adaptorName string, controlSpec map[string]interface{}) (map[string]interface{}, error)
- func (d *DeviceClient) CreateAdaptor(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DeviceClient) CreateAdaptorFile(systemKey, adaptorName, fileName string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DeviceClient) CreateData(collection_id string, data interface{}) ([]interface{}, error)
- func (d *DeviceClient) CreateDevice(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DeviceClient) DeleteAdaptor(systemKey, name string) error
- func (d *DeviceClient) DeleteAdaptorFile(systemKey, adaptorName, fileName string) error
- func (d *DeviceClient) DeleteData(collection_id string, query *Query) error
- func (d *DeviceClient) DeleteDevice(systemKey, name string) error
- func (u *DeviceClient) DeleteDevices(systemKey string, query *Query) error
- func (d *DeviceClient) DeployAdaptor(systemKey, adaptorName string, deploySpec map[string]interface{}) (map[string]interface{}, error)
- func (d *DeviceClient) Disconnect() error
- func (d *DeviceClient) GetAdaptor(systemKey, name string) (map[string]interface{}, error)
- func (d *DeviceClient) GetAdaptorFile(systemKey, adaptorName, fileName string) (map[string]interface{}, error)
- func (d *DeviceClient) GetAdaptorFiles(systemKey, adaptorName string) ([]interface{}, error)
- func (d *DeviceClient) GetAdaptors(systemKey string) ([]interface{}, error)
- func (d *DeviceClient) GetColumns(collection_id, systemKey, systemSecret string) ([]interface{}, error)
- func (d *DeviceClient) GetData(collection_id string, query *Query) (map[string]interface{}, error)
- func (d *DeviceClient) GetDataByKeyAndName(string, string, *Query) (map[string]interface{}, error)
- func (d *DeviceClient) GetDataByName(collectionName string, query *Query) (map[string]interface{}, error)
- func (d *DeviceClient) GetDataTotal(collection_id string, query *Query) (map[string]interface{}, error)
- func (d *DeviceClient) GetDevice(systemKey, name string) (map[string]interface{}, error)
- func (u *DeviceClient) GetDevices(systemKey string, query *Query) ([]interface{}, error)
- func (d *DeviceClient) GetItemCount(collection_id string) (int, error)
- func (d *DeviceClient) InitializeMQTT(clientid string, ignore string, timeout int, ssl *tls.Config, ...) error
- func (d *DeviceClient) InitializeMQTTWithCallback(clientid string, ignore string, timeout int, ssl *tls.Config, ...) error
- func (d *DeviceClient) InsertData(collection_id string, data interface{}) error
- func (dvc *DeviceClient) Logout() error
- func (b *DeviceClient) NewClientID() string
- func (d *DeviceClient) Publish(topic string, message []byte, qos int) error
- func (d *DeviceClient) SetMqttClient(c MqttClient)
- func (d *DeviceClient) Subscribe(topic string, qos int) (<-chan *mqttTypes.Publish, error)
- func (d *DeviceClient) Unsubscribe(topic string) error
- func (d *DeviceClient) UpdateAdaptor(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DeviceClient) UpdateAdaptorFile(systemKey, adaptorName, fileName string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DeviceClient) UpdateData(collection_id string, query *Query, changes map[string]interface{}) error
- func (u *DeviceClient) UpdateDevice(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (u *DeviceClient) UpdateDevices(systemKey string, query *Query, changes map[string]interface{}) ([]interface{}, error)
- type EdgeConfig
- type EdgeProxy
- type Filter
- type LastWillPacket
- type MSSqlConfig
- type MqttClient
- type MySqlConfig
- type Ordering
- type PostgresqlConfig
- type Query
- func (q *Query) EqualTo(field string, value interface{})
- func (q *Query) GreaterThan(field string, value interface{})
- func (q *Query) GreaterThanEqualTo(field string, value interface{})
- func (q *Query) LessThan(field string, value interface{})
- func (q *Query) LessThanEqualTo(field string, value interface{})
- func (q *Query) Matches(field, regex string)
- func (q *Query) NotEqualTo(field string, value interface{})
- func (q *Query) Or(orQuery *Query)
- type Service
- type System
- type UserClient
- func (u *UserClient) AddColumn(collection_id, column_name, column_type string) error
- func (u *UserClient) AuthAnon() error
- func (u *UserClient) Authenticate() error
- func (u *UserClient) CallService(systemKey, name string, params map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) ControlAdaptor(systemKey, adaptorName string, controlSpec map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) CreateAdaptor(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) CreateAdaptorFile(systemKey, adaptorName, fileName string, data map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) CreateData(collection_id string, data interface{}) ([]interface{}, error)
- func (u *UserClient) CreateDeploymentByName(systemKey, name string, info map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) CreateDevice(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) CreateEdge(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) CreateEventHandler(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) CreateService(systemKey, name, code string, params []string) error
- func (u *UserClient) CreateTimer(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) CreateTrigger(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) DeleteAdaptor(systemKey, name string) error
- func (u *UserClient) DeleteAdaptorFile(systemKey, adaptorName, fileName string) error
- func (u *UserClient) DeleteCollection(colID string) error
- func (u *UserClient) DeleteColumn(collection_id, column_name string) error
- func (u *UserClient) DeleteData(collection_id string, query *Query) error
- func (u *UserClient) DeleteDeploymentByName(systemKey, name string) error
- func (u *UserClient) DeleteDevice(systemKey, name string) error
- func (u *UserClient) DeleteDevices(systemKey string, query *Query) error
- func (u *UserClient) DeleteEdge(systemKey, name string) error
- func (u *UserClient) DeleteEventHandler(systemKey, name string) error
- func (u *UserClient) DeleteService(systemKey, name string) error
- func (u *UserClient) DeleteTimer(systemKey, name string) error
- func (u *UserClient) DeleteTrigger(systemKey, name string) error
- func (u *UserClient) DeployAdaptor(systemKey, adaptorName string, deploySpec map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) Disconnect() error
- func (u *UserClient) GetAdaptor(systemKey, name string) (map[string]interface{}, error)
- func (u *UserClient) GetAdaptorFile(systemKey, adaptorName, fileName string) (map[string]interface{}, error)
- func (u *UserClient) GetAdaptorFiles(systemKey, adaptorName string) ([]interface{}, error)
- func (u *UserClient) GetAdaptors(systemKey string) ([]interface{}, error)
- func (u *UserClient) GetAllCollections(systemKey string) ([]interface{}, error)
- func (u *UserClient) GetAllDeployments(systemKey string) (map[string]interface{}, error)
- func (u *UserClient) GetCollectionInfo(collection_id string) (map[string]interface{}, error)
- func (u *UserClient) GetColumns(collection_id, systemKey, systemSecret string) ([]interface{}, error)
- func (u *UserClient) GetCurrentTopics(systemKey string) ([]string, error)
- func (u *UserClient) GetCurrentTopicsCount(systemKey string) (map[string]interface{}, error)
- func (u *UserClient) GetCurrentTopicsWithQuery(systemKey string, columns []string, pageSize, pageNum int, descending bool) ([]map[string]interface{}, error)
- func (u *UserClient) GetData(collection_id string, query *Query) (map[string]interface{}, error)
- func (u *UserClient) GetDataByKeyAndName(string, string, *Query) (map[string]interface{}, error)
- func (u *UserClient) GetDataByName(collectionName string, query *Query) (map[string]interface{}, error)
- func (u *UserClient) GetDataTotal(collection_id string, query *Query) (map[string]interface{}, error)
- func (u *UserClient) GetDeploymentByName(systemKey, name string) (map[string]interface{}, error)
- func (u *UserClient) GetDevice(systemKey, name string) (map[string]interface{}, error)
- func (u *UserClient) GetDevices(systemKey string, query *Query) ([]interface{}, error)
- func (u *UserClient) GetEdge(systemKey, name string) (map[string]interface{}, error)
- func (u *UserClient) GetEdges(systemKey string) ([]interface{}, error)
- func (u *UserClient) GetEdgesWithQuery(systemKey string, query *Query) ([]interface{}, error)
- func (u *UserClient) GetEventHandler(systemKey, name string) (map[string]interface{}, error)
- func (u *UserClient) GetEventHandlers(systemKey string) ([]interface{}, error)
- func (u *UserClient) GetItemCount(collection_id string) (int, error)
- func (u *UserClient) GetPlatformDBConnections(systemKey string, query *Query) (map[string]interface{}, error)
- func (u *UserClient) GetPlatformLogs(systemKey string, query *Query) (map[string]interface{}, error)
- func (u *UserClient) GetPlatformStatistics(systemKey string, query *Query) (map[string]interface{}, error)
- func (u *UserClient) GetService(systemKey, name string) (*Service, error)
- func (u *UserClient) GetServiceNames(systemKey string) ([]string, error)
- func (u *UserClient) GetTimer(systemKey, name string) (map[string]interface{}, error)
- func (u *UserClient) GetTimers(systemKey string) ([]interface{}, error)
- func (u *UserClient) GetTrigger(systemKey, name string) (map[string]interface{}, error)
- func (u *UserClient) GetUserCount(systemKey string) (int, error)
- func (u *UserClient) InitializeMQTT(clientid string, ignore string, timeout int, ssl *tls.Config, ...) error
- func (u *UserClient) InitializeMQTTWithCallback(clientid string, ignore string, timeout int, ssl *tls.Config, ...) error
- func (u *UserClient) InsertData(collection_id string, data interface{}) error
- func (u *UserClient) Logout() error
- func (b *UserClient) NewClientID() string
- func (u *UserClient) NewCollection(systemKey, name string) (string, error)
- func (u *UserClient) Publish(topic string, message []byte, qos int) error
- func (u *UserClient) Register(username, password string) error
- func (u *UserClient) RegisterUser(username, password string) (map[string]interface{}, error)
- func (u *UserClient) SetMqttClient(c MqttClient)
- func (u *UserClient) Subscribe(topic string, qos int) (<-chan *mqttTypes.Publish, error)
- func (u *UserClient) Unsubscribe(topic string) error
- func (u *UserClient) UpdateAdaptor(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) UpdateAdaptorFile(systemKey, adaptorName, fileName string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *UserClient) UpdateAutoDelete(systemKey string, preamble string, size_limit int, expiry_messages int, ...) (bool, error)
- func (u *UserClient) UpdateData(collection_id string, query *Query, changes map[string]interface{}) error
- func (u *UserClient) UpdateDeploymentByName(systemKey, name string, changes map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) UpdateDevice(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) UpdateDevices(systemKey string, query *Query, changes map[string]interface{}) ([]interface{}, error)
- func (u *UserClient) UpdateEdge(systemKey string, name string, changes map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) UpdateEventHandler(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) UpdateService(systemKey, name, code string, params []string) (error, map[string]interface{})
- func (u *UserClient) UpdateTimer(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) UpdateTrigger(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) UpdateUser(userQuery *Query, changes map[string]interface{}) error
Constants ¶
const ( PERM_READ = 1 PERM_CREATE = 2 PERM_UPDATE = 4 PERM_DELETE = 8 )
const ( ServiceSync = "service" LibrarySync = "library" TriggerSync = "trigger" TimerSync = "timer" )
const ( //Mqtt QOS 0 QOS_AtMostOnce = iota //Mqtt QOS 1 QOS_AtLeastOnce //Mqtt QOS 2 QOS_PreciselyOnce PUBLISH_HTTP_PREAMBLE = "/api/v/1/message/" )
Variables ¶
var ( //CB_ADDR is the address of the ClearBlade Platform you are speaking with CB_ADDR = "https://platform.clearblade.com" //CB_MSG_ADDR is the messaging address you wish to speak to CB_MSG_ADDR = "platform.clearblade.com:1883" )
Functions ¶
func CreateNewEdge ¶
func CreateNewEdge(e EdgeConfig) (*os.Process, error)
func CreateNewEdgeWithCmd ¶
func GetServiceNames ¶
Types ¶
type Callbacks ¶
type Callbacks struct { OnConnectCallback mqtt.OnConnectHandler OnConnectionLostCallback mqtt.ConnectionLostHandler }
type CbReq ¶
type CbReq struct { Body interface{} Method string Endpoint string QueryString string Headers map[string][]string HttpAddr string MqttAddr string }
CbReq is a wrapper around an HTTP request
type CbResp ¶
type CbResp struct { Body interface{} StatusCode int }
CbResp is a wrapper around an HTTP response
type Client ¶
type Client interface { //session bookkeeping calls Authenticate() error Logout() error //data calls CreateData(string, interface{}) ([]interface{}, error) InsertData(string, interface{}) error UpdateData(string, *Query, map[string]interface{}) error GetData(string, *Query) (map[string]interface{}, error) GetDataByName(string, *Query) (map[string]interface{}, error) GetDataByKeyAndName(string, string, *Query) (map[string]interface{}, error) DeleteData(string, *Query) error GetItemCount(string) (int, error) GetDataTotal(string, *Query) (map[string]interface{}, error) GetColumns(string, string, string) ([]interface{}, error) //mqtt calls SetMqttClient(MqttClient) InitializeMQTT(string, string, int, *tls.Config, *LastWillPacket) error Publish(string, []byte, int) error Subscribe(string, int) (<-chan *mqttTypes.Publish, error) Unsubscribe(string) error Disconnect() error // Device calls GetDevices(string, *Query) ([]interface{}, error) GetDevice(string, string) (map[string]interface{}, error) CreateDevice(string, string, map[string]interface{}) (map[string]interface{}, error) UpdateDevice(string, string, map[string]interface{}) (map[string]interface{}, error) DeleteDevice(string, string) error UpdateDevices(string, *Query, map[string]interface{}) ([]interface{}, error) DeleteDevices(string, *Query) error // Adaptor calls GetAdaptors(string) ([]interface{}, error) GetAdaptor(string, string) (map[string]interface{}, error) CreateAdaptor(string, string, map[string]interface{}) (map[string]interface{}, error) UpdateAdaptor(string, string, map[string]interface{}) (map[string]interface{}, error) DeleteAdaptor(string, string) error DeployAdaptor(string, string, map[string]interface{}) (map[string]interface{}, error) ControlAdaptor(string, string, map[string]interface{}) (map[string]interface{}, error) // Adaptor File calls GetAdaptorFiles(string, string) ([]interface{}, error) GetAdaptorFile(string, string, string) (map[string]interface{}, error) CreateAdaptorFile(string, string, string, map[string]interface{}) (map[string]interface{}, error) UpdateAdaptorFile(string, string, string, map[string]interface{}) (map[string]interface{}, error) DeleteAdaptorFile(string, string, string) error }
Client is a convience interface for API consumers, if they want to use the same functions for both developer users and unprivleged users
type DevClient ¶
type DevClient struct { DevToken string MQTTClient MqttClient Email string Password string HttpAddr string MqttAddr string // contains filtered or unexported fields }
DevClient is the type for developers
func NewDevClient ¶
NewDevClient allocates a new DevClient struct
func NewDevClientWithAddrs ¶
func NewDevClientWithToken ¶
func NewEdgeProxyDevClient ¶
func (*DevClient) AddCollectionToRole ¶
AddCollectionToRole associates some kind of permission regarding the collection to the role.
func (*DevClient) AddColumn ¶
AddColumn adds a column to a collection. Note that this does not apply to collections backed by a non-default datastore.
func (*DevClient) AddDeviceToRoles ¶
AddDeviceToRoles assigns a role to a device
func (*DevClient) AddGenericPermissionToRole ¶
func (*DevClient) AddPortalToRole ¶
func (*DevClient) AddServiceToRole ¶
AddServiceToRole associates some kind of permission dealing with the specified service to the role
func (*DevClient) AddTopicToRole ¶
AddTopicToRole associates some kind of permission dealing with the specified topic to the role
func (*DevClient) AddUserToRoles ¶
AddUserToRoles assigns a role to a user
func (*DevClient) AlterConnectionDetails ¶
AlterConnectionDetails allows the developer to change or add connection information, such as updating a username
func (*DevClient) AreServiceLogsEnabled ¶
AreServiceLogsEnabled allows the developer to query the state of logging
func (*DevClient) Authenticate ¶
Authenticate retrieves a token from the specified Clearblade Platform
func (*DevClient) CallService ¶
func (d *DevClient) CallService(systemKey, name string, params map[string]interface{}, log bool) (map[string]interface{}, error)
CallService performs a call against the specific service with the specified parameters. The logging argument will allow the developer to call the service with logging enabled for just that run. The return value is a map[string]interface{} where the results will be stored in the key "results". If logs were enabled, they'll be in "log".
func (*DevClient) ControlAdaptor ¶
func (*DevClient) CreateAdaptor ¶
func (*DevClient) CreateAdaptorFile ¶
func (*DevClient) CreateData ¶
CreateData is an alias for InsertData, but returns a response value, it should be a slice of strings representing the item ids (if not using an external datastore)
func (*DevClient) CreateDeployResourcesForSystem ¶
func (*DevClient) CreateDeploymentByName ¶
func (*DevClient) CreateDevice ¶
func (*DevClient) CreateDeviceColumn ¶
func (*DevClient) CreateEdge ¶
func (*DevClient) CreateEdgeColumn ¶
func (*DevClient) CreateEdgeGroup ¶
func (*DevClient) CreateEventHandler ¶
func (d *DevClient) CreateEventHandler(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
CreateEventHandler creates an event handler, otherwise known as a trigger Returns the same object as GetEventHandler corresponding to the created event
func (*DevClient) CreateLibrary ¶
func (d *DevClient) CreateLibrary(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
CreateLibrary allows the developer to create a library to be called by other service functions returns a single object following the pattern specified in GetLibraries for the newly-created library
func (*DevClient) CreatePlugin ¶
func (*DevClient) CreatePortal ¶
func (*DevClient) CreateRole ¶
CreateRole creates a new role returns a JSON object shaped like {"role_id":"role id goes here"}
func (*DevClient) CreateService ¶
func (*DevClient) CreateTimer ¶
func (d *DevClient) CreateTimer(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
CreateTimer allows the user to create the timer with code Returns a single instance of the object described in GetTimers for the newly created timer
func (*DevClient) CreateTrigger ¶
func (d *DevClient) CreateTrigger(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
Alias for CreateEventHandler() to better match up with Console terminology
func (*DevClient) CreateUserColumn ¶
CreateUserColumn creates a new column in the user table
func (*DevClient) DeleteAdaptor ¶
func (*DevClient) DeleteAdaptorFile ¶
func (*DevClient) DeleteCollection ¶
DeleteCollection deletes the collection. Note that this does not apply to collections backed by a non-default datastore.
func (*DevClient) DeleteColumn ¶
DeleteColumn removes a column from a collection. Note that this does not apply to collections backed by a non-default datastore.
func (*DevClient) DeleteData ¶
DeleteData removes data from a collection according to what matches the query. If the query is nil, then all data will be removed.
func (*DevClient) DeleteDeployResourcesForSystem ¶
func (*DevClient) DeleteDeploymentByName ¶
func (*DevClient) DeleteDevice ¶
func (*DevClient) DeleteDeviceColumn ¶
func (*DevClient) DeleteDeviceSession ¶
func (*DevClient) DeleteDevices ¶
func (*DevClient) DeleteEdge ¶
func (*DevClient) DeleteEdgeColumn ¶
func (*DevClient) DeleteEdgeGroup ¶
func (*DevClient) DeleteEventHandler ¶
DeleteEventHandler removes the event handler
func (*DevClient) DeleteFailedServices ¶
func (*DevClient) DeleteKeyset ¶
func (*DevClient) DeleteLibrary ¶
DeleteLibrary allows the developer to remove library content
func (*DevClient) DeletePlugin ¶
func (*DevClient) DeletePortal ¶
func (*DevClient) DeleteRole ¶
DeleteRole removes a role
func (*DevClient) DeleteService ¶
func (*DevClient) DeleteSystem ¶
DeleteSystem removes the system
func (*DevClient) DeleteTimer ¶
DeleteTimer removes the timer
func (*DevClient) DeleteTrigger ¶
Alias for DeleteEventHandler() to better match up with Console terminology
func (*DevClient) DeleteUser ¶
DeleteUser removes a specific user
func (*DevClient) DeleteUserColumn ¶
func (*DevClient) DeleteUserSession ¶
func (*DevClient) DeployAdaptor ¶
func (*DevClient) DevUserInfo ¶
DevUserInfo gets the user information for the developer
func (*DevClient) DisableLogsForService ¶
DisableLogsForService turns logging off for that service
func (*DevClient) Disconnect ¶
Disconnect stops the TCP connection and unsubscribes the client from any remaining topics
func (*DevClient) EnableLogsForService ¶
EnableLogsForService activates logging for execution of a service
func (*DevClient) EnterProvisioningMode ¶
func (*DevClient) EnterRuntimeMode ¶
func (*DevClient) GenerateKeyset ¶
func (*DevClient) GetAdaptor ¶
func (*DevClient) GetAdaptorFile ¶
func (*DevClient) GetAdaptorFiles ¶
func (*DevClient) GetAdaptors ¶
func (*DevClient) GetAllCollections ¶
GetAllCollections retrieves a list of every collection in the system The return value is a slice of strings
func (*DevClient) GetAllDeployments ¶
func (*DevClient) GetAllRoles ¶
GetAllRoles returns a slice of all roles, including their permissions the return value is a slice of [{"ID":"roleid","Name":"rolename","Description":"role description", "Permissions":{"Collections":[{"ID":"collectionid","Columns":[{"Name":"columnname","Level":0}],"Items":[{"Name":"itemid","Level":2}],"Name":"collectionname"}], "Topics":[{"Name":"topic/path","Level":1}],"CodeServices":[{"Name":"service name","SystemKey":"syskey","Level":4}],"UsersList":{"Name":"users","Level":8},"Push":{"Name":"push","Level":0},"MsgHistory":{"Name":"messagehistory","Level":1}}},...]
func (*DevClient) GetAllUsers ¶
func (*DevClient) GetAssetClassDeployments ¶
func (*DevClient) GetAssetDeployments ¶
func (*DevClient) GetAssetPlatformDeploymentStatus ¶
func (*DevClient) GetAssetsDeployedToEntity ¶
func (*DevClient) GetAssetsNotDeployedOnPlatform ¶
func (*DevClient) GetCollectionInfo ¶
GetCollectionInfo retrieves some describing information on the specified collection Keys "name","collectoinID","appID", and much, much more!
func (*DevClient) GetColumns ¶
GetColumns gets a slice of map[string]interface{} of the column names and values. As map[string]interface{}{"ColumnName":"name","ColumnType":"typename in string", "PK":bool}
func (*DevClient) GetCurrentTopics ¶
func (*DevClient) GetCurrentTopicsCount ¶
func (*DevClient) GetCurrentTopicsWithQuery ¶
func (*DevClient) GetData ¶
GetData performs a query against a collection. The query object is discussed elsewhere. If the query object is nil, then it will return all of the data. The return value is a key-value of the types. Note that due to the transport mechanism being JSON, ints will be turned into float64s.
func (*DevClient) GetDataByKeyAndName ¶
GetDataByKeyAndName is unimplemented
func (*DevClient) GetDataByName ¶
func (*DevClient) GetDataTotal ¶
func (*DevClient) GetDeployResourcesForSystem ¶
func (*DevClient) GetDeploymentByName ¶
func (*DevClient) GetDevelopersForSystem ¶
func (*DevClient) GetDeviceColumns ¶
func (*DevClient) GetDeviceRoles ¶
func (*DevClient) GetDeviceSession ¶
func (*DevClient) GetDevices ¶
func (*DevClient) GetEdgeColumns ¶
func (*DevClient) GetEdgeGroup ¶
func (*DevClient) GetEdgeGroups ¶
func (*DevClient) GetEdgesWithQuery ¶
func (*DevClient) GetEventDefinitions ¶
GetEventDefinitions returns a slice of the different kinds of events that can be handled. Returns a slice of strings
func (*DevClient) GetEventHandler ¶
GetEventHandler reuturns a single event handler Returns an object shaped map[string]interface{}{"system_key":"associated system key","system_secret":"secret","name":"event name","event_definition":map[string]interface{}{"def_module":"module","def_name":"definition name","event_keys":[]string{"event","keys"},"visibility":false|true}, KeyVals:map[string]interface{}{"keys":"values"},"service_name":"corresponding service name"}
func (*DevClient) GetEventHandlers ¶
GetEventHandlers returns a slice of the event handlers for a system
func (*DevClient) GetFailedServices ¶
func (*DevClient) GetItemCount ¶
func (*DevClient) GetLibraries ¶
GetLibrary returns a list of libraries for a system Returns an object of the following []map[string]interface{}{map[string]interface{}{"system_key":"associated system key","name":"the name of the library","description":"library description","version":1,"code":"function blabla(){return "blahbla"}","dependencies":"clearblade"}, ...}
func (*DevClient) GetLibrary ¶
GetLibrary returns information about a specific library Returns a single object following the pattern specified in GetLibraries
func (*DevClient) GetLogsForService ¶
GetLogsForService retrieves the logs for the service
func (*DevClient) GetPlatformDBConnections ¶
func (*DevClient) GetPlatformLogs ¶
func (*DevClient) GetPlatformStatistics ¶
func (*DevClient) GetPlugins ¶
func (*DevClient) GetPortals ¶
func (*DevClient) GetService ¶
GetService returns information about a specified service
func (*DevClient) GetServiceNames ¶
GetServiceNames retrieves the service names for a particular system
func (*DevClient) GetServiceRaw ¶
func (*DevClient) GetSyncResourcesForEdge ¶
func (*DevClient) GetSystemAssetDeployments ¶
func (*DevClient) GetSystemsForDeveloper ¶
func (*DevClient) GetTimer ¶
GetTimer returns the definition of a single timer Returns a single instance of the object described in GetTimers
func (*DevClient) GetTimers ¶
Returns a slice of timer descriptions Return value looks like []interface{}[map[string]interface{}{"timer_key":"clearblade generated timer identifier","name":"the name of the timer","start_time":"rfc3339 formatted date string","repeats":0,"frequency":5,"service_name":"name of service executed","system_key":"system key associated with timer","user_id":"userid associated with timer","user_token":"a token the timer runs with"},...]
func (*DevClient) GetTrigger ¶
Alias for GetEventHandler() to better match up with Console terminology
func (*DevClient) GetTriggers ¶
Alias for GetEventHandlers() to better match up with Console terminology
func (*DevClient) GetUserColumns ¶
GetUserColumns returns the description of the columns in the user table Returns a structure shaped []map[string]interface{}{map[string]interface{}{"ColumnName":"blah","ColumnType":"int"}}
func (*DevClient) GetUserInfo ¶
func (*DevClient) GetUserRoles ¶
func (*DevClient) GetUserSession ¶
func (*DevClient) GetVersion ¶
GetVersion gets the current version of a library Returns an object with the same shape as that of GetLibrariesForSystem, but a specific version thereof
func (*DevClient) GetVersionHistory ¶
GetVersionHistory returns a slice of library descriptions corresponding to each library Returns an object with the same shape as that of GetLibrariesForSystem, but with each version of the specified library
func (*DevClient) InitializeMQTT ¶
func (d *DevClient) InitializeMQTT(clientid, systemkey string, timeout int, ssl *tls.Config, lastWill *LastWillPacket) error
InitializeMQTT allocates the mqtt client for the developer. the second argument is a the systemkey you wish to use for authenticating with the message broker topics are isolated across systems, so in order to communicate with a specific system, you must supply the system key
func (*DevClient) InitializeMQTTWithCallback ¶
func (*DevClient) InsertData ¶
Inserts data into the platform. The interface is either a map[string]interface{} representing a row, or a []map[string]interface{} representing many rows.
func (*DevClient) MessageHistory ¶
MessageHistory allows the developer to retrieve the message history Returns a slice of []map[string]interface{}{map[string]interface{}{"topicid":"/topic/path", "ip":"127.0.0.1", "time":123141244, "payloadsize":12,"payload":"hello world\n","userid":"8675309","qos":0 }}
func (*DevClient) NewClientID ¶
func (b *DevClient) NewClientID() string
func (*DevClient) NewCollection ¶
func (*DevClient) NewConnectCollection ¶
func (d *DevClient) NewConnectCollection(systemkey string, connectConfig connectCollection) (string, error)
NewConnectCollection creates a new collection that is backed by a datastore of your own choosing.
func (*DevClient) NewService ¶
NewService creates a new service with a new name, code and params
func (*DevClient) NewServiceWithLibraries ¶
func (d *DevClient) NewServiceWithLibraries(systemKey, name, code, deps string, params []string) error
NewServiceWithLibraries creates a new service with the specified code, params, and libraries/dependencies. Parameters is a slice of strings of parameter names
func (*DevClient) NewSystem ¶
NewSystem creates a new system. The users parameter has been depreciated. Returned is the systemid.
func (*DevClient) PublishHttp ¶
func (*DevClient) RegisterDevUser ¶
func (d *DevClient) RegisterDevUser(username, password, fname, lname, org string) (map[string]interface{}, error)
Register creates a new developer user
func (*DevClient) RegisterDevUserWithKey ¶
func (d *DevClient) RegisterDevUserWithKey(username, password, fname, lname, org, key string) (map[string]interface{}, error)
Register creates a new developer user
func (*DevClient) RegisterNewUser ¶
func (*DevClient) RetryFailedServices ¶
func (*DevClient) RotateKeyset ¶
func (*DevClient) SetLongRunningServiceParams ¶
func (*DevClient) SetMqttClient ¶
func (d *DevClient) SetMqttClient(c MqttClient)
func (*DevClient) SetServiceEffectiveUser ¶
SetServiceEffectiveUser allows the developer to set the userid that a service executes under.
func (*DevClient) SetSystemAuthOff ¶
SetSystemAuthOff is depreciated
func (*DevClient) SetSystemAuthOn ¶
SetSystemAuthOn is depreciated
func (*DevClient) SetSystemDescription ¶
SetSystemDescription can change the content of the system's description
func (*DevClient) SetSystemName ¶
SetSystemName can change the name of the system
func (*DevClient) SetSystemTokenTTL ¶
SetSystemTokenTTL can change the value for the system's token TTL
func (*DevClient) Subscribe ¶
Subscribe subscribes a user to a topic. Incoming messages will be sent over the channel.
func (*DevClient) SyncResourceToEdge ¶
func (*DevClient) Unsubscribe ¶
Unsubscribe stops the flow of messages over the corresponding subscription chan
func (*DevClient) UpdateAdaptor ¶
func (*DevClient) UpdateAdaptorFile ¶
func (*DevClient) UpdateAssetClassDeployments ¶
func (*DevClient) UpdateAssetDeployments ¶
func (*DevClient) UpdateAssetPlatformDeploymentStatus ¶
func (*DevClient) UpdateAutoDelete ¶
func (d *DevClient) UpdateAutoDelete(systemKey string, preamble string, size_limit int, expiry_messages int64, time_interval int, truncateStat int, panic_truncate int, autoDelete int) (bool, error)
update the parameters of AutoDelete using the endpoint
func (*DevClient) UpdateData ¶
func (d *DevClient) UpdateData(collection_id string, query *Query, changes map[string]interface{}) error
UpdateData mutates the values in extant rows, selecting them via a query. If the query is nil, it updates all rows changes should be a map of the names of the columns, and the value you want them updated to
func (*DevClient) UpdateDeployResourcesForSystem ¶
func (*DevClient) UpdateDeploymentByName ¶
func (*DevClient) UpdateDevelopersForSystem ¶
func (*DevClient) UpdateDevice ¶
func (*DevClient) UpdateDeviceRoles ¶
func (*DevClient) UpdateDevices ¶
func (*DevClient) UpdateEdge ¶
func (*DevClient) UpdateEdgeGroup ¶
func (*DevClient) UpdateEventHandler ¶
func (d *DevClient) UpdateEventHandler(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
UpdateEventHandler allows the developer to alter the code executed by the event handler Returns an object corresponding to GetEventHandler with the altered values
func (*DevClient) UpdateLibrary ¶
func (d *DevClient) UpdateLibrary(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
UpdateLibrary allows the developer to change the content of the library returns a single object following the pattern specified in GetLibraries with the updated details
func (*DevClient) UpdatePlugin ¶
func (*DevClient) UpdatePortal ¶
func (*DevClient) UpdateRole ¶
func (*DevClient) UpdateService ¶
func (d *DevClient) UpdateService(systemKey, name, code string, params []string) (error, map[string]interface{})
UpdateService facillitates changes to the service's code
func (*DevClient) UpdateServiceWithLibraries ¶
func (*DevClient) UpdateTimer ¶
func (d *DevClient) UpdateTimer(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
UpdateTimer allows the developer to change the code executed with the timer Returns an updated version of the timer as described in GetTimer
func (*DevClient) UpdateTrigger ¶
func (d *DevClient) UpdateTrigger(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
Alias for UpdateEventHandler() to better match up with Console terminology
func (*DevClient) UpdateUser ¶
type DeviceClient ¶
type DeviceClient struct { DeviceName string ActiveKey string DeviceToken string MQTTClient MqttClient SystemKey string SystemSecret string HttpAddr string MqttAddr string // contains filtered or unexported fields }
func NewDeviceClient ¶
func NewDeviceClient(systemkey, systemsecret, deviceName, activeKey string) *DeviceClient
func NewDeviceClientWithAddrs ¶
func NewDeviceClientWithAddrs(httpAddr, mqttAddr, systemkey, systemsecret, deviceName, activeKey string) *DeviceClient
func NewEdgeProxyDeviceClient ¶
func NewEdgeProxyDeviceClient(systemkey, systemsecret, deviceName, activeKey, edgeName string) (*DeviceClient, error)
func (*DeviceClient) Authenticate ¶
func (dvc *DeviceClient) Authenticate() error
"Login and logout"
func (*DeviceClient) AuthenticateDeviceWithKey ¶
func (d *DeviceClient) AuthenticateDeviceWithKey(systemKey, name, activeKey string) (map[string]interface{}, error)
func (*DeviceClient) ControlAdaptor ¶
func (d *DeviceClient) ControlAdaptor(systemKey, adaptorName string, controlSpec map[string]interface{}) (map[string]interface{}, error)
func (*DeviceClient) CreateAdaptor ¶
func (d *DeviceClient) CreateAdaptor(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*DeviceClient) CreateAdaptorFile ¶
func (d *DeviceClient) CreateAdaptorFile(systemKey, adaptorName, fileName string, data map[string]interface{}) (map[string]interface{}, error)
func (*DeviceClient) CreateData ¶
func (d *DeviceClient) CreateData(collection_id string, data interface{}) ([]interface{}, error)
CreateData is an alias for InsertData, but returns a response value, it should be a slice of strings representing the item ids (if not using an external datastore)
func (*DeviceClient) CreateDevice ¶
func (d *DeviceClient) CreateDevice(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*DeviceClient) DeleteAdaptor ¶
func (d *DeviceClient) DeleteAdaptor(systemKey, name string) error
func (*DeviceClient) DeleteAdaptorFile ¶
func (d *DeviceClient) DeleteAdaptorFile(systemKey, adaptorName, fileName string) error
func (*DeviceClient) DeleteData ¶
func (d *DeviceClient) DeleteData(collection_id string, query *Query) error
DeleteData removes data from a collection according to what matches the query. If the query is nil, then all data will be removed.
func (*DeviceClient) DeleteDevice ¶
func (d *DeviceClient) DeleteDevice(systemKey, name string) error
func (*DeviceClient) DeleteDevices ¶
func (u *DeviceClient) DeleteDevices(systemKey string, query *Query) error
func (*DeviceClient) DeployAdaptor ¶
func (d *DeviceClient) DeployAdaptor(systemKey, adaptorName string, deploySpec map[string]interface{}) (map[string]interface{}, error)
func (*DeviceClient) Disconnect ¶
func (d *DeviceClient) Disconnect() error
Disconnect stops the TCP connection and unsubscribes the client from any remaining topics
func (*DeviceClient) GetAdaptor ¶
func (d *DeviceClient) GetAdaptor(systemKey, name string) (map[string]interface{}, error)
func (*DeviceClient) GetAdaptorFile ¶
func (d *DeviceClient) GetAdaptorFile(systemKey, adaptorName, fileName string) (map[string]interface{}, error)
func (*DeviceClient) GetAdaptorFiles ¶
func (d *DeviceClient) GetAdaptorFiles(systemKey, adaptorName string) ([]interface{}, error)
func (*DeviceClient) GetAdaptors ¶
func (d *DeviceClient) GetAdaptors(systemKey string) ([]interface{}, error)
func (*DeviceClient) GetColumns ¶
func (d *DeviceClient) GetColumns(collection_id, systemKey, systemSecret string) ([]interface{}, error)
GetColumns gets a slice of map[string]interface{} of the column names and values. As map[string]interface{}{"ColumnName":"name","ColumnType":"typename in string", "PK":bool}
func (*DeviceClient) GetData ¶
func (d *DeviceClient) GetData(collection_id string, query *Query) (map[string]interface{}, error)
GetData performs a query against a collection. The query object is discussed elsewhere. If the query object is nil, then it will return all of the data. The return value is a key-value of the types. Note that due to the transport mechanism being JSON, ints will be turned into float64s.
func (*DeviceClient) GetDataByKeyAndName ¶
GetDataByKeyAndName is unimplemented
func (*DeviceClient) GetDataByName ¶
func (d *DeviceClient) GetDataByName(collectionName string, query *Query) (map[string]interface{}, error)
GetDataByName performs a query against a collection, using the collection's name, rather than the ID. The query object is discussed elsewhere. If the query object is nil, then it will return all of the data. The return value is a key-value of the types. Note that due to the transport mechanism being JSON, ints will be turned into float64s.
func (*DeviceClient) GetDataTotal ¶
func (d *DeviceClient) GetDataTotal(collection_id string, query *Query) (map[string]interface{}, error)
func (*DeviceClient) GetDevice ¶
func (d *DeviceClient) GetDevice(systemKey, name string) (map[string]interface{}, error)
func (*DeviceClient) GetDevices ¶
func (u *DeviceClient) GetDevices(systemKey string, query *Query) ([]interface{}, error)
func (*DeviceClient) GetItemCount ¶
func (d *DeviceClient) GetItemCount(collection_id string) (int, error)
func (*DeviceClient) InitializeMQTT ¶
func (d *DeviceClient) InitializeMQTT(clientid string, ignore string, timeout int, ssl *tls.Config, lastWill *LastWillPacket) error
InitializeMQTT allocates the mqtt client for the user. an empty string can be passed as the second argument for the user client
func (*DeviceClient) InitializeMQTTWithCallback ¶
func (d *DeviceClient) InitializeMQTTWithCallback(clientid string, ignore string, timeout int, ssl *tls.Config, lastWill *LastWillPacket, callbacks *Callbacks) error
func (*DeviceClient) InsertData ¶
func (d *DeviceClient) InsertData(collection_id string, data interface{}) error
Inserts data into the platform. The interface is either a map[string]interface{} representing a row, or a []map[string]interface{} representing many rows.
func (*DeviceClient) Logout ¶
func (dvc *DeviceClient) Logout() error
func (*DeviceClient) NewClientID ¶
func (b *DeviceClient) NewClientID() string
func (*DeviceClient) Publish ¶
func (d *DeviceClient) Publish(topic string, message []byte, qos int) error
Publish publishes a message to the specified mqtt topic
func (*DeviceClient) SetMqttClient ¶
func (d *DeviceClient) SetMqttClient(c MqttClient)
func (*DeviceClient) Subscribe ¶
Subscribe subscribes a device to a topic. Incoming messages will be sent over the channel.
func (*DeviceClient) Unsubscribe ¶
func (d *DeviceClient) Unsubscribe(topic string) error
Unsubscribe stops the flow of messages over the corresponding subscription chan
func (*DeviceClient) UpdateAdaptor ¶
func (d *DeviceClient) UpdateAdaptor(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*DeviceClient) UpdateAdaptorFile ¶
func (d *DeviceClient) UpdateAdaptorFile(systemKey, adaptorName, fileName string, data map[string]interface{}) (map[string]interface{}, error)
func (*DeviceClient) UpdateData ¶
func (d *DeviceClient) UpdateData(collection_id string, query *Query, changes map[string]interface{}) error
func (*DeviceClient) UpdateDevice ¶
func (u *DeviceClient) UpdateDevice(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*DeviceClient) UpdateDevices ¶
func (u *DeviceClient) UpdateDevices(systemKey string, query *Query, changes map[string]interface{}) ([]interface{}, error)
type EdgeConfig ¶
type EdgeConfig struct { EdgeName string EdgeToken string PlatformIP string PlatformPort string ParentSystem string HttpPort string MqttPort string MqttTlsPort string WsPort string WssPort string AuthPort string AuthWsPort string AdapterRootDir string Lean bool Cache bool LogLevel string Insecure bool DevMode bool Stdout *os.File Stderr *os.File }
type Filter ¶
Filter is the atomic structure inside a query it contains A field a value and an operator
type LastWillPacket ¶
LastWillPacket is a type to represent the Last Will and Testament packet
type MSSqlConfig ¶
type MSSqlConfig struct {
Name, User, Password, Host, Port, DBName, Tablename string
}
MSSqlConfig houses configuration information for an MSSql-backed collection
type MqttClient ¶
type MySqlConfig ¶
type MySqlConfig struct {
Name, User, Password, Host, Port, DBName, Tablename string
}
MySqlConfig houses configuration information for an MySql-backed collection
type Ordering ¶
Ordering dictates the order the query values are returned in. True is Ascending, False is Descending
type PostgresqlConfig ¶
type PostgresqlConfig struct {
Name, User, Password, Host, Port, DBName, Tablename string
}
PostgresqlConfig houses configuration information for an Postgresql-backed collection
type Query ¶
type Query struct { Filters [][]Filter PageSize int PageNumber int Order []Ordering Columns []string }
Query contains configuration information for the request against a collection. It creates a subset of results for the operation to be performed upon
func (*Query) EqualTo ¶
EqualTo adds an equality constraint to the query. Similar to "WHERE foo = 'bar'"
func (*Query) GreaterThan ¶
GreaterThan adds the corresponding constraint to the query. Similar to "WHERE foo > 3"
func (*Query) GreaterThanEqualTo ¶
GreaterThanEqualTo adds the corresponding constraint to the query. Similar to "WHERE foo >= 3"
func (*Query) LessThan ¶
LessThan adds the corresponding constraint to the query. Similar to "WHERE foo < 3"
func (*Query) LessThanEqualTo ¶
LessThanEqualTo adds the corresponding constraint to the query. Similar to "WHERE foo <= 3"
func (*Query) NotEqualTo ¶
NotEqualTo adds the corresponding constraint to the query. Similar to "WHERE foo != 'bar'"
type System ¶
type System struct { Key string Secret string Name string Description string Users bool TokenTTL int32 }
System is a collection of facts about a system
type UserClient ¶
type UserClient struct { UserToken string MQTTClient MqttClient SystemKey string SystemSecret string Email string Password string HttpAddr string MqttAddr string // contains filtered or unexported fields }
UserClient is the type for users
func NewEdgeProxyUserClient ¶
func NewEdgeProxyUserClient(email, password, systemKey, systemSecret, edgeName string) (*UserClient, error)
func NewUserClient ¶
func NewUserClient(systemkey, systemsecret, email, password string) *UserClient
NewUserClient allocates a new UserClient struct
func NewUserClientWithAddrs ¶
func NewUserClientWithAddrs(httpAddr, mqttAddr, systemKey, systemSecret, email, password string) *UserClient
func (*UserClient) AddColumn ¶
func (u *UserClient) AddColumn(collection_id, column_name, column_type string) error
func (*UserClient) AuthAnon ¶
func (u *UserClient) AuthAnon() error
func (*UserClient) Authenticate ¶
func (u *UserClient) Authenticate() error
Authenticate retrieves a token from the specified Clearblade Platform
func (*UserClient) CallService ¶
func (u *UserClient) CallService(systemKey, name string, params map[string]interface{}) (map[string]interface{}, error)
CallService performs a call against the specific service with the specified parameters. The return value is a map[string]interface{} where the results will be stored in the key "results". If logs were enabled, they'll be in "log".
func (*UserClient) ControlAdaptor ¶
func (u *UserClient) ControlAdaptor(systemKey, adaptorName string, controlSpec map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) CreateAdaptor ¶
func (u *UserClient) CreateAdaptor(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) CreateAdaptorFile ¶
func (u *UserClient) CreateAdaptorFile(systemKey, adaptorName, fileName string, data map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) CreateData ¶
func (u *UserClient) CreateData(collection_id string, data interface{}) ([]interface{}, error)
CreateData is an alias for InsertData, but returns a response value, it should be a slice of strings representing the item ids (if not using an external datastore)
func (*UserClient) CreateDeploymentByName ¶
func (u *UserClient) CreateDeploymentByName(systemKey, name string, info map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) CreateDevice ¶
func (u *UserClient) CreateDevice(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) CreateEdge ¶
func (u *UserClient) CreateEdge(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) CreateEventHandler ¶
func (u *UserClient) CreateEventHandler(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) CreateService ¶
func (u *UserClient) CreateService(systemKey, name, code string, params []string) error
func (*UserClient) CreateTimer ¶
func (u *UserClient) CreateTimer(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) CreateTrigger ¶
func (u *UserClient) CreateTrigger(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) DeleteAdaptor ¶
func (u *UserClient) DeleteAdaptor(systemKey, name string) error
func (*UserClient) DeleteAdaptorFile ¶
func (u *UserClient) DeleteAdaptorFile(systemKey, adaptorName, fileName string) error
func (*UserClient) DeleteCollection ¶
func (u *UserClient) DeleteCollection(colID string) error
func (*UserClient) DeleteColumn ¶
func (u *UserClient) DeleteColumn(collection_id, column_name string) error
func (*UserClient) DeleteData ¶
func (u *UserClient) DeleteData(collection_id string, query *Query) error
DeleteData removes data from a collection according to what matches the query. If the query is nil, then all data will be removed.
func (*UserClient) DeleteDeploymentByName ¶
func (u *UserClient) DeleteDeploymentByName(systemKey, name string) error
func (*UserClient) DeleteDevice ¶
func (u *UserClient) DeleteDevice(systemKey, name string) error
func (*UserClient) DeleteDevices ¶
func (u *UserClient) DeleteDevices(systemKey string, query *Query) error
func (*UserClient) DeleteEdge ¶
func (u *UserClient) DeleteEdge(systemKey, name string) error
func (*UserClient) DeleteEventHandler ¶
func (u *UserClient) DeleteEventHandler(systemKey, name string) error
func (*UserClient) DeleteService ¶
func (u *UserClient) DeleteService(systemKey, name string) error
func (*UserClient) DeleteTimer ¶
func (u *UserClient) DeleteTimer(systemKey, name string) error
func (*UserClient) DeleteTrigger ¶
func (u *UserClient) DeleteTrigger(systemKey, name string) error
func (*UserClient) DeployAdaptor ¶
func (u *UserClient) DeployAdaptor(systemKey, adaptorName string, deploySpec map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) Disconnect ¶
func (u *UserClient) Disconnect() error
Disconnect stops the TCP connection and unsubscribes the client from any remaining topics
func (*UserClient) GetAdaptor ¶
func (u *UserClient) GetAdaptor(systemKey, name string) (map[string]interface{}, error)
func (*UserClient) GetAdaptorFile ¶
func (u *UserClient) GetAdaptorFile(systemKey, adaptorName, fileName string) (map[string]interface{}, error)
func (*UserClient) GetAdaptorFiles ¶
func (u *UserClient) GetAdaptorFiles(systemKey, adaptorName string) ([]interface{}, error)
func (*UserClient) GetAdaptors ¶
func (u *UserClient) GetAdaptors(systemKey string) ([]interface{}, error)
func (*UserClient) GetAllCollections ¶
func (u *UserClient) GetAllCollections(systemKey string) ([]interface{}, error)
func (*UserClient) GetAllDeployments ¶
func (u *UserClient) GetAllDeployments(systemKey string) (map[string]interface{}, error)
func (*UserClient) GetCollectionInfo ¶
func (u *UserClient) GetCollectionInfo(collection_id string) (map[string]interface{}, error)
func (*UserClient) GetColumns ¶
func (u *UserClient) GetColumns(collection_id, systemKey, systemSecret string) ([]interface{}, error)
GetColumns gets a slice of map[string]interface{} of the column names and values. As map[string]interface{}{"ColumnName":"name","ColumnType":"typename in string", "PK":bool}
func (*UserClient) GetCurrentTopics ¶
func (u *UserClient) GetCurrentTopics(systemKey string) ([]string, error)
func (*UserClient) GetCurrentTopicsCount ¶
func (u *UserClient) GetCurrentTopicsCount(systemKey string) (map[string]interface{}, error)
func (*UserClient) GetCurrentTopicsWithQuery ¶
func (*UserClient) GetData ¶
func (u *UserClient) GetData(collection_id string, query *Query) (map[string]interface{}, error)
GetData performs a query against a collection. The query object is discussed elsewhere. If the query object is nil, then it will return all of the data. The return value is a key-value of the types. Note that due to the transport mechanism being JSON, ints will be turned into float64s.
func (*UserClient) GetDataByKeyAndName ¶
GetDataByKeyAndName is unimplemented
func (*UserClient) GetDataByName ¶
func (u *UserClient) GetDataByName(collectionName string, query *Query) (map[string]interface{}, error)
GetDataByName performs a query against a collection, using the collection's name, rather than the ID. The query object is discussed elsewhere. If the query object is nil, then it will return all of the data. The return value is a key-value of the types. Note that due to the transport mechanism being JSON, ints will be turned into float64s.
func (*UserClient) GetDataTotal ¶
func (u *UserClient) GetDataTotal(collection_id string, query *Query) (map[string]interface{}, error)
func (*UserClient) GetDeploymentByName ¶
func (u *UserClient) GetDeploymentByName(systemKey, name string) (map[string]interface{}, error)
func (*UserClient) GetDevice ¶
func (u *UserClient) GetDevice(systemKey, name string) (map[string]interface{}, error)
func (*UserClient) GetDevices ¶
func (u *UserClient) GetDevices(systemKey string, query *Query) ([]interface{}, error)
func (*UserClient) GetEdge ¶
func (u *UserClient) GetEdge(systemKey, name string) (map[string]interface{}, error)
func (*UserClient) GetEdges ¶
func (u *UserClient) GetEdges(systemKey string) ([]interface{}, error)
func (*UserClient) GetEdgesWithQuery ¶
func (u *UserClient) GetEdgesWithQuery(systemKey string, query *Query) ([]interface{}, error)
func (*UserClient) GetEventHandler ¶
func (u *UserClient) GetEventHandler(systemKey, name string) (map[string]interface{}, error)
func (*UserClient) GetEventHandlers ¶
func (u *UserClient) GetEventHandlers(systemKey string) ([]interface{}, error)
func (*UserClient) GetItemCount ¶
func (u *UserClient) GetItemCount(collection_id string) (int, error)
func (*UserClient) GetPlatformDBConnections ¶
func (u *UserClient) GetPlatformDBConnections(systemKey string, query *Query) (map[string]interface{}, error)
func (*UserClient) GetPlatformLogs ¶
func (u *UserClient) GetPlatformLogs(systemKey string, query *Query) (map[string]interface{}, error)
func (*UserClient) GetPlatformStatistics ¶
func (u *UserClient) GetPlatformStatistics(systemKey string, query *Query) (map[string]interface{}, error)
func (*UserClient) GetService ¶
func (u *UserClient) GetService(systemKey, name string) (*Service, error)
GetService returns information about a specified service
func (*UserClient) GetServiceNames ¶
func (u *UserClient) GetServiceNames(systemKey string) ([]string, error)
GetServiceNames retrieves the service names for a particular system
func (*UserClient) GetTimer ¶
func (u *UserClient) GetTimer(systemKey, name string) (map[string]interface{}, error)
func (*UserClient) GetTimers ¶
func (u *UserClient) GetTimers(systemKey string) ([]interface{}, error)
func (*UserClient) GetTrigger ¶
func (u *UserClient) GetTrigger(systemKey, name string) (map[string]interface{}, error)
func (*UserClient) GetUserCount ¶
func (u *UserClient) GetUserCount(systemKey string) (int, error)
func (*UserClient) InitializeMQTT ¶
func (u *UserClient) InitializeMQTT(clientid string, ignore string, timeout int, ssl *tls.Config, lastWill *LastWillPacket) error
InitializeMQTT allocates the mqtt client for the user. an empty string can be passed as the second argument for the user client
func (*UserClient) InitializeMQTTWithCallback ¶
func (u *UserClient) InitializeMQTTWithCallback(clientid string, ignore string, timeout int, ssl *tls.Config, lastWill *LastWillPacket, callbacks *Callbacks) error
func (*UserClient) InsertData ¶
func (u *UserClient) InsertData(collection_id string, data interface{}) error
Inserts data into the platform. The interface is either a map[string]interface{} representing a row, or a []map[string]interface{} representing many rows.
func (*UserClient) NewClientID ¶
func (b *UserClient) NewClientID() string
func (*UserClient) NewCollection ¶
func (u *UserClient) NewCollection(systemKey, name string) (string, error)
func (*UserClient) Publish ¶
func (u *UserClient) Publish(topic string, message []byte, qos int) error
Publish publishes a message to the specified mqtt topic
func (*UserClient) Register ¶
func (u *UserClient) Register(username, password string) error
Register creates a new user
func (*UserClient) RegisterUser ¶
func (u *UserClient) RegisterUser(username, password string) (map[string]interface{}, error)
RegisterUser creates a new user, returning the body of the response.
func (*UserClient) SetMqttClient ¶
func (u *UserClient) SetMqttClient(c MqttClient)
func (*UserClient) Subscribe ¶
Subscribe subscribes a user to a topic. Incoming messages will be sent over the channel.
func (*UserClient) Unsubscribe ¶
func (u *UserClient) Unsubscribe(topic string) error
Unsubscribe stops the flow of messages over the corresponding subscription chan
func (*UserClient) UpdateAdaptor ¶
func (u *UserClient) UpdateAdaptor(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) UpdateAdaptorFile ¶
func (u *UserClient) UpdateAdaptorFile(systemKey, adaptorName, fileName string, data map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) UpdateAutoDelete ¶
func (d *UserClient) UpdateAutoDelete(systemKey string, preamble string, size_limit int, expiry_messages int, time_interval int, truncateStat int, panic_truncate int, autoDelete int) (bool, error)
update the parameters of AutoDelete using the endpoint
func (*UserClient) UpdateData ¶
func (u *UserClient) UpdateData(collection_id string, query *Query, changes map[string]interface{}) error
func (*UserClient) UpdateDeploymentByName ¶
func (u *UserClient) UpdateDeploymentByName(systemKey, name string, changes map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) UpdateDevice ¶
func (u *UserClient) UpdateDevice(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) UpdateDevices ¶
func (u *UserClient) UpdateDevices(systemKey string, query *Query, changes map[string]interface{}) ([]interface{}, error)
func (*UserClient) UpdateEdge ¶
func (*UserClient) UpdateEventHandler ¶
func (u *UserClient) UpdateEventHandler(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) UpdateService ¶
func (u *UserClient) UpdateService(systemKey, name, code string, params []string) (error, map[string]interface{})
func (*UserClient) UpdateTimer ¶
func (u *UserClient) UpdateTimer(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) UpdateTrigger ¶
func (u *UserClient) UpdateTrigger(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*UserClient) UpdateUser ¶
func (u *UserClient) UpdateUser(userQuery *Query, changes map[string]interface{}) error