Documentation ¶
Index ¶
- Constants
- Variables
- func ConnectedDeviceCount(client cbClient, systemKey string) (map[string]interface{}, error)
- func ConnectedDevices(client cbClient, systemKey string) (map[string]interface{}, error)
- func CreateNewEdge(e EdgeConfig) (*os.Process, error)
- func CreateNewEdgeWithCmd(e EdgeConfig) (*exec.Cmd, *os.Process, error)
- func DeviceConnections(client cbClient, systemKey, deviceName string) (map[string]interface{}, error)
- func GenerateConnectCollection(co map[string]interface{}) (connectCollection, error)
- func GetServiceNames(c cbClient, systemKey string) ([]string, error)
- func SetAllAutodeletionSettings(c cbClient, newSettings AutodeletionSettings) (systems []string, err error)
- type AuthResponse
- type AutodeletionSettings
- type Callbacks
- type CbReq
- type CbResp
- type Client
- type CodeLog
- type CountResp
- type DevAuthResponse
- 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) AddExternalDBConnection(systemKey string, data map[string]interface{}) error
- func (d *DevClient) AddExternalDBToRole(systemKey, name, role_id string, level int) error
- func (d *DevClient) AddGenericPermissionToRole(systemKey, roleId, permission string, level int) error
- func (d *DevClient) AddGoogleStorageSettings(settings map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) AddPortalToRole(systemKey, portalName, roleId string, level int) error
- func (d *DevClient) AddServiceCacheMetaToRole(systemKey, cacheName, 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) AllUsersAndDevices(inputText string) (map[string]interface{}, error)
- func (d *DevClient) AlterConnectionDetails(systemkey string, connectConfig connectCollection) error
- func (d *DevClient) AreServiceLogsEnabled(systemKey, name string) (bool, error)
- func (d *DevClient) Authenticate() (*AuthResponse, error)
- func (d *DevClient) AuthenticateMQTT(username, password, systemKey, systemSecret string, timeout int, ...) 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) CopyBucketSetFile(systemKey, deploymentName, fromBox, fromPath, toBox, toPath string) 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) CreateBucketSetFile(systemKey, deploymentName, box, relPath, contents string) (map[string]interface{}, error)
- func (d *DevClient) CreateData(collection_id string, data interface{}) ([]interface{}, error)
- func (d *DevClient) CreateDataByName(system_key, collection_name string, item 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) CreateIndex(systemKey, collectionName, columnToIndex string) 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) CreateServiceCacheMeta(systemKey, name string, meta map[string]interface{}) error
- func (d *DevClient) CreateThrottlerCase(throttlerName string, caseInfo map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) CreateThrottlerException(throttlerName string, caseInfo map[string]interface{}) (map[string]interface{}, 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) CreateUniqueIndex(systemKey, collectionName, columnToIndex string) error
- func (d *DevClient) CreateUserColumn(systemKey, columnName, columnType string) error
- func (d *DevClient) CreateWebhook(systemKey, name string, meta map[string]interface{}) error
- func (d *DevClient) DeleteAdaptor(systemKey, name string) error
- func (d *DevClient) DeleteAdaptorFile(systemKey, adaptorName, fileName string) error
- func (d *DevClient) DeleteAllThrottlerCases(throttlerName string) ([]interface{}, error)
- func (d *DevClient) DeleteAllThrottlerExceptions(throttlerName string) ([]interface{}, error)
- func (d *DevClient) DeleteBucketSetFile(systemKey, deploymentName, box, relPath 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) DeleteExternalDBConnection(systemKey, name string) error
- func (d *DevClient) DeleteFailedServices(systemKey string, ids []string) ([]map[string]interface{}, error)
- func (d *DevClient) DeleteGoogleStorageSettings() 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) DeleteServiceCacheMeta(systemKey, name string) error
- func (d *DevClient) DeleteSystem(s string) error
- func (d *DevClient) DeleteThrottlerCase(throttlerName, caseName string) (map[string]interface{}, error)
- func (d *DevClient) DeleteThrottlerCasesAndExceptions(throttlerName string) (map[string]interface{}, error)
- func (d *DevClient) DeleteThrottlerException(throttlerName, caseName string) (map[string]interface{}, 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) DeleteWebhook(systemKey, name string) error
- func (d *DevClient) DemoteDevFromPlatformAdmin(email string) 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) DisableSystem(systemKey string) (map[string]interface{}, error)
- func (d *DevClient) Disconnect() error
- func (d *DevClient) DropIndex(systemKey, collectionName, columnToIndex string) error
- func (d *DevClient) DropUniqueIndex(systemKey, collectionName, columnToIndex string) error
- func (d *DevClient) EnableLogsForService(systemKey, name string) error
- func (d *DevClient) EnableSystem(systemKey string) (map[string]interface{}, 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) GetAllDevelopers() (map[string]interface{}, error)
- func (d *DevClient) GetAllExternalDBConnections(systemKey string) ([]interface{}, error)
- func (d *DevClient) GetAllRoles(SystemKey string) ([]interface{}, error)
- func (d *DevClient) GetAllServiceCacheMeta(systemKey string) ([]map[string]interface{}, error)
- func (d *DevClient) GetAllSystemsAnalytics(query string) ([]interface{}, error)
- func (d *DevClient) GetAllThrottlers() (map[string]interface{}, error)
- func (d *DevClient) GetAllUsers(systemKey string) ([]map[string]interface{}, error)
- func (d *DevClient) GetAllWebhooks(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) GetBucketSet(systemKey, deploymentName string) (map[string]interface{}, error)
- func (d *DevClient) GetBucketSetFile(systemKey, deploymentName, box, relPath string) (map[string]interface{}, error)
- func (d *DevClient) GetBucketSetFiles(systemKey, deploymentName, box string) (map[string]interface{}, error)
- func (d *DevClient) GetBucketSets(systemKey string) ([]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) GetColumnsByCollectionName(systemKey, collectionName 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) GetDataTotalByName(system_key, collection_name 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) GetDeploymentSyncStatus(systemKey, deployment string) (map[string]interface{}, error)
- func (d *DevClient) GetDeveloper(devEmail 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) GetDevicesCount(systemKey string, query *Query) (CountResp, 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) GetEdgeSyncStatus(systemKey, edge string) ([]map[string]interface{}, error)
- func (d *DevClient) GetEdges(systemKey string) ([]interface{}, error)
- func (d *DevClient) GetEdgesCountWithQuery(systemKey string, query *Query) (CountResp, 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) GetExternalDBConnection(systemKey, name string) (map[string]interface{}, error)
- func (d *DevClient) GetFailedServices(systemKey string) ([]map[string]interface{}, error)
- func (d *DevClient) GetGoogleStorageSettings() (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) GetMetrics(metricType string) (interface{}, 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) GetRole(SystemKey, roleName string) (map[string]interface{}, error)
- func (d *DevClient) GetRolesCount(SystemKey string, query *Query) (CountResp, error)
- func (d *DevClient) GetRolesWithQuery(SystemKey string, query *Query) ([]interface{}, error)
- func (d *DevClient) GetRunningServices(systemKey string) (map[string]interface{}, error)
- func (d *DevClient) GetService(systemKey, name string) (*Service, error)
- func (d *DevClient) GetServiceCacheMeta(systemKey, name string) (map[string]interface{}, 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) GetSystemAnalytics(systemKey string) (interface{}, error)
- func (d *DevClient) GetSystemAssetDeployments(systemKey string, query *Query) ([]interface{}, error)
- func (d *DevClient) GetSystemsForDeveloper(devId string) (map[string]interface{}, error)
- func (d *DevClient) GetThrottler(throttlerName 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) GetUserCountWithQuery(systemKey string, query *Query) (CountResp, 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) GetUsersWithQuery(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) GetWebhook(systemKey, name string) (map[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) ListIndexes(systemKey, collectionName string) (map[string]interface{}, error)
- func (d *DevClient) ListIndexesWithID(collectionID string) (map[string]interface{}, error)
- func (d *DevClient) Logout() error
- func (d *DevClient) MessageHistory(systemKey string) (interface{}, error)
- func (d *DevClient) MoveBucketSetFile(systemKey, deploymentName, fromBox, fromPath, toBox, toPath string) 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) NewServiceWithBody(systemKey, name, code string, extra map[string]interface{}) 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) OneSystemUsersAndDevices(systemKey, inputText string) (map[string]interface{}, error)
- func (d *DevClient) PerformExternalDBOperation(systemKey, name string, operation map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) PerformMonitoring() (map[string]interface{}, error)
- func (d *DevClient) PromoteDevToPlatformAdmin(email 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) ReadBucketSetFile(systemKey, deploymentName, box, relPath string) (string, 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) RegisterNewUserWithOptions(systemKey, systemSecret string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) ResetDevelopersPassword(email, newPassword string) 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) SetDeveloper(email string, admin, disabled bool) (map[string]interface{}, error)
- func (d *DevClient) SetLongRunningServiceParams(systemKey, name string, autoRestart, autoBalance 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) UpdateDataByName(system_key, collection_name string, query *Query, ...) (UpdateResponse, 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) UpdateDevInfo(changes 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) UpdateExternalDBConnection(systemKey, name string, changes map[string]interface{}) error
- func (d *DevClient) UpdateGoogleStorageSettings(settings 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) (map[string]interface{}, error)
- func (d *DevClient) UpdateServiceCacheMeta(systemKey, name string, changes map[string]interface{}) error
- func (d *DevClient) UpdateServiceWithBody(systemKey, name, code string, extra map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateServiceWithLibraries(systemKey, name, code, deps string, params []string) (map[string]interface{}, error)
- func (d *DevClient) UpdateServiceWithMap(systemKey, name string, changes map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateThrottlerCase(throttlerName, caseName string, updates map[string]interface{}) (map[string]interface{}, error)
- func (d *DevClient) UpdateThrottlerException(throttlerName, caseName string, updates map[string]interface{}) (map[string]interface{}, error)
- 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
- func (d *DevClient) UpdateWebhook(systemKey, name string, changes map[string]interface{}) error
- func (d *DevClient) UpsertData(collection_id string, changes map[string]interface{}, conflictColumn string) (map[string]interface{}, error)
- func (d *DevClient) UpsertDataByName(system_key, collection_name string, changes map[string]interface{}, ...) (map[string]interface{}, error)
- func (d *DevClient) VerifyAuthentication(verifyParams VerifyAuthenticationParams) error
- type DeviceClient
- func NewDeviceClient(systemkey, systemsecret, deviceName, activeKey string) *DeviceClient
- func NewDeviceClientWithAddrs(httpAddr, mqttAddr, systemkey, systemsecret, deviceName, activeKey string) *DeviceClient
- func NewDeviceClientWithServiceAccountAndAddrs(httpAddr, mqttAddr, systemkey, systemsecret, deviceName, token string) *DeviceClient
- func NewEdgeProxyDeviceClient(systemkey, systemsecret, deviceName, activeKey, edgeName string) (*DeviceClient, error)
- func (dvc *DeviceClient) Authenticate() (*AuthResponse, error)
- func (d *DeviceClient) AuthenticateDeviceWithKey(systemKey, name, activeKey string) (map[string]interface{}, error)
- func (d *DeviceClient) AuthenticateMQTT(username, password, systemKey, systemSecret string, timeout int, ...) error
- func (d *DeviceClient) ControlAdaptor(systemKey, adaptorName string, controlSpec map[string]interface{}) (map[string]interface{}, error)
- func (dv *DeviceClient) CopyBucketSetFile(systemKey, deploymentName, fromBox, fromPath, toBox, toPath string) 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 (dv *DeviceClient) CreateBucketSetFile(systemKey, deploymentName, box, relPath, contents string) (map[string]interface{}, error)
- func (d *DeviceClient) CreateData(collection_id string, data interface{}) ([]interface{}, error)
- func (d *DeviceClient) CreateDataByName(system_key, collection_name string, item interface{}) ([]interface{}, error)
- func (d *DeviceClient) CreateDevice(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
- func (d *DeviceClient) CreateIndex(systemKey, collectionName, columnToIndex string) error
- func (d *DeviceClient) CreateUniqueIndex(systemKey, collectionName, columnToIndex string) error
- func (d *DeviceClient) DeleteAdaptor(systemKey, name string) error
- func (d *DeviceClient) DeleteAdaptorFile(systemKey, adaptorName, fileName string) error
- func (dv *DeviceClient) DeleteBucketSetFile(systemKey, deploymentName, box, relPath 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) DropIndex(systemKey, collectionName, columnToIndex string) error
- func (d *DeviceClient) DropUniqueIndex(systemKey, collectionName, columnToIndex string) 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 (dv *DeviceClient) GetBucketSet(systemKey, deploymentName string) (map[string]interface{}, error)
- func (dv *DeviceClient) GetBucketSetFile(systemKey, deploymentName, box, relPath string) (map[string]interface{}, error)
- func (dv *DeviceClient) GetBucketSetFiles(systemKey, deploymentName, box string) (map[string]interface{}, error)
- func (dv *DeviceClient) GetBucketSets(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) GetDataTotalByName(system_key, collection_name 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 (u *DeviceClient) GetDevicesCount(systemKey string, query *Query) (CountResp, 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 (d *DeviceClient) ListIndexes(systemKey, collectionName string) (map[string]interface{}, error)
- func (d *DeviceClient) ListIndexesWithID(collectionID string) (map[string]interface{}, error)
- func (dvc *DeviceClient) Logout() error
- func (dv *DeviceClient) MoveBucketSetFile(systemKey, deploymentName, fromBox, fromPath, toBox, toPath string) error
- func (b *DeviceClient) NewClientID() string
- func (d *DeviceClient) Publish(topic string, message []byte, qos int) error
- func (dv *DeviceClient) ReadGetBucketSetFile(systemKey, deploymentName, box, relPath string) (string, 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 (d *DeviceClient) UpdateDataByName(system_key, collection_name string, query *Query, ...) (UpdateResponse, 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)
- func (d *DeviceClient) UpsertData(collection_id string, changes map[string]interface{}, conflictColumn string) (map[string]interface{}, error)
- func (d *DeviceClient) UpsertDataByName(system_key, collection_name string, changes map[string]interface{}, ...) (map[string]interface{}, error)
- type EdgeConfig
- type EdgeProxy
- type Filter
- type LastWillPacket
- type MSSqlConfig
- type MongoDBConfig
- 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 RoleChanges
- type Service
- type System
- type UpdateResponse
- type UserClient
- func NewEdgeProxyUserClient(email, password, systemKey, systemSecret, edgeName string) (*UserClient, error)
- func NewRefreshUserClientWithAddrs(httpAddr, mqttAddr, systemKey, systemSecret, refreshToken, accessToken string) *UserClient
- func NewUserClient(systemkey, systemsecret, email, password string) *UserClient
- func NewUserClientWithAddrs(httpAddr, mqttAddr, systemKey, systemSecret, email, password string) *UserClient
- func NewUserClientWithServiceAccountAndAddrs(httpAddr, mqttAddr, systemkey, systemsecret, email, token string) *UserClient
- func (u *UserClient) AddColumn(collection_id, column_name, column_type string) error
- func (u *UserClient) AddExternalDBConnection(systemKey string, data map[string]interface{}) error
- func (u *UserClient) AuthAnon() error
- func (u *UserClient) Authenticate() (*AuthResponse, error)
- func (u *UserClient) AuthenticateMQTT(username, password, systemKey, systemSecret string, timeout int, ...) error
- func (u *UserClient) CallService(systemKey, name string, params map[string]interface{}) (map[string]interface{}, error)
- func (d *UserClient) CheckAuth() error
- func (u *UserClient) ControlAdaptor(systemKey, adaptorName string, controlSpec map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) CopyBucketSetFile(systemKey, deploymentName, fromBox, fromPath, toBox, toPath string) 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) CreateBucketSetFile(systemKey, deploymentName, box, relPath, contents string) (map[string]interface{}, error)
- func (u *UserClient) CreateData(collection_id string, data interface{}) ([]interface{}, error)
- func (u *UserClient) CreateDataByName(system_key, collection_name string, item 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) CreateIndex(systemKey, collectionName, columnToIndex string) 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) CreateUniqueIndex(systemKey, collectionName, columnToIndex string) error
- func (u *UserClient) DeleteAdaptor(systemKey, name string) error
- func (u *UserClient) DeleteAdaptorFile(systemKey, adaptorName, fileName string) error
- func (u *UserClient) DeleteBucketSetFile(systemKey, deploymentName, box, relPath 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) DeleteExternalDBConnection(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) DropIndex(systemKey, collectionName, columnToIndex string) error
- func (u *UserClient) DropUniqueIndex(systemKey, collectionName, columnToIndex string) 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) GetAllUsers(systemKey string) ([]map[string]interface{}, error)
- func (u *UserClient) GetBucketSet(systemKey, deploymentName string) (map[string]interface{}, error)
- func (u *UserClient) GetBucketSetFile(systemKey, deploymentName, box, relPath string) (map[string]interface{}, error)
- func (u *UserClient) GetBucketSetFiles(systemKey, deploymentName, box string) (map[string]interface{}, error)
- func (u *UserClient) GetBucketSets(systemKey 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) GetDataTotalByName(system_key, collection_name 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) GetDevicesCount(systemKey string, query *Query) (CountResp, 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) GetExternalDBConnection(systemKey, name string) (map[string]interface{}, error)
- func (u *UserClient) GetItemCount(collection_id string) (int, error)
- func (u *UserClient) GetOwnUserInfo() (map[string]interface{}, 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) GetUserInfo(systemKey, email string) (map[string]interface{}, error)
- func (u *UserClient) GetUserRoles(systemKey, userId string) ([]interface{}, 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) ListIndexes(systemKey, collectionName string) (map[string]interface{}, error)
- func (u *UserClient) ListIndexesWithID(collectionID string) (map[string]interface{}, error)
- func (u *UserClient) Logout() error
- func (u *UserClient) MoveBucketSetFile(systemKey, deploymentName, fromBox, fromPath, toBox, toPath string) error
- func (b *UserClient) NewClientID() string
- func (u *UserClient) NewCollection(systemKey, name string) (string, error)
- func (u *UserClient) PerformExternalDBOperation(systemKey, name string, operation map[string]interface{}) (map[string]interface{}, error)
- func (u *UserClient) Publish(topic string, message []byte, qos int) error
- func (u *UserClient) ReadGetBucketSetFile(systemKey, deploymentName, box, relPath string) (string, error)
- func (u *UserClient) RefreshAuthentication() 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 (u *UserClient) UpdateData(collection_id string, query *Query, changes map[string]interface{}) error
- func (u *UserClient) UpdateDataByName(system_key, collection_name string, query *Query, ...) (UpdateResponse, 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) UpdateExternalDBConnection(systemKey, name string, changes 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
- func (u *UserClient) UpdateUserPassword(userID, newPassword string) error
- func (u *UserClient) UpdateUserRoles(userID string, changes RoleChanges) error
- func (u *UserClient) UpsertData(collection_id string, changes map[string]interface{}, conflictColumn string) (map[string]interface{}, error)
- func (u *UserClient) UpsertDataByName(system_key, collection_name string, changes map[string]interface{}, ...) (map[string]interface{}, error)
- type VerifyAuthenticationParams
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" CB_MSG_AUTH_ADDR = "platform.clearblade.com:8905" )
Functions ¶
func ConnectedDeviceCount ¶
func ConnectedDevices ¶
func CreateNewEdge ¶
func CreateNewEdge(e EdgeConfig) (*os.Process, error)
func CreateNewEdgeWithCmd ¶
func DeviceConnections ¶
func GetServiceNames ¶
func SetAllAutodeletionSettings ¶
func SetAllAutodeletionSettings(c cbClient, newSettings AutodeletionSettings) (systems []string, err error)
Types ¶
type AuthResponse ¶
type AuthResponse struct {
DevResponse *DevAuthResponse
}
type AutodeletionSettings ¶
type AutodeletionSettings struct { Enabled bool `json:"enabled"` MaxSizeKb int `json:"expiration_age_seconds"` MaxRows int `json:"max_size_kb"` MaxAgeSeconds int64 `json:"max_rows"` }
func GetAutodeletionSettings ¶
func GetAutodeletionSettings(c cbClient, systemkey string) (AutodeletionSettings, error)
func SetAutodeletionSettings ¶
func SetAutodeletionSettings(c cbClient, systemkey string, newSettings AutodeletionSettings) (AutodeletionSettings, error)
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() (*AuthResponse, error) Logout() error //data calls CreateData(string, interface{}) ([]interface{}, error) CreateDataByName(string, string, interface{}) ([]interface{}, error) InsertData(string, interface{}) error UpdateData(string, *Query, map[string]interface{}) error UpdateDataByName(string, string, *Query, map[string]interface{}) (UpdateResponse, 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 DevAuthResponse ¶
type DevAuthResponse struct { DevToken string `json:"dev_token"` IsTwoFactor bool `json:"is_two_factor"` NextStepURL string `json:"next_step_url"` IntermediateToken string `json:"intermediate_token"` TwoFactorMethod string `json:"two_factor_method"` OtpID string `json:"otp_id"` OtpIssued string `json:"otp_issued"` }
type DevClient ¶
type DevClient struct { DevToken string RefreshToken string ExpiresAt float64 MQTTClient MqttClient Email string Password string HttpAddr string MqttAddr string MqttAuthAddr 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) AddExternalDBConnection ¶
func (*DevClient) AddExternalDBToRole ¶
func (*DevClient) AddGenericPermissionToRole ¶
func (*DevClient) AddGoogleStorageSettings ¶
func (*DevClient) AddPortalToRole ¶
func (*DevClient) AddServiceCacheMetaToRole ¶
AddServiceCacheMetaToRole associates some kind of permission dealing with the specified code cache meta to the role
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) AllUsersAndDevices ¶
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 ¶
func (d *DevClient) Authenticate() (*AuthResponse, error)
Authenticate retrieves a token from the specified Clearblade Platform
func (*DevClient) AuthenticateMQTT ¶
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) CopyBucketSetFile ¶
func (*DevClient) CreateAdaptor ¶
func (*DevClient) CreateAdaptorFile ¶
func (*DevClient) CreateBucketSetFile ¶
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) CreateDataByName ¶
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) CreateIndex ¶
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) CreateServiceCacheMeta ¶
func (*DevClient) CreateThrottlerCase ¶
func (*DevClient) CreateThrottlerException ¶
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) CreateUniqueIndex ¶
func (*DevClient) CreateUserColumn ¶
CreateUserColumn creates a new column in the user table
func (*DevClient) CreateWebhook ¶
func (*DevClient) DeleteAdaptor ¶
func (*DevClient) DeleteAdaptorFile ¶
func (*DevClient) DeleteAllThrottlerCases ¶
func (*DevClient) DeleteAllThrottlerExceptions ¶
func (*DevClient) DeleteBucketSetFile ¶
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) DeleteExternalDBConnection ¶
func (*DevClient) DeleteFailedServices ¶
func (*DevClient) DeleteGoogleStorageSettings ¶
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) DeleteServiceCacheMeta ¶
func (*DevClient) DeleteSystem ¶
DeleteSystem removes the system
func (*DevClient) DeleteThrottlerCase ¶
func (*DevClient) DeleteThrottlerCasesAndExceptions ¶
func (*DevClient) DeleteThrottlerException ¶
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) DeleteWebhook ¶
func (*DevClient) DemoteDevFromPlatformAdmin ¶
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) DisableSystem ¶
func (*DevClient) Disconnect ¶
Disconnect stops the TCP connection and unsubscribes the client from any remaining topics
func (*DevClient) DropUniqueIndex ¶
func (*DevClient) EnableLogsForService ¶
EnableLogsForService activates logging for execution of a service
func (*DevClient) EnableSystem ¶
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) GetAllDevelopers ¶
func (*DevClient) GetAllExternalDBConnections ¶
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) GetAllServiceCacheMeta ¶
func (*DevClient) GetAllSystemsAnalytics ¶
func (*DevClient) GetAllThrottlers ¶
func (*DevClient) GetAllUsers ¶
func (*DevClient) GetAllWebhooks ¶
func (*DevClient) GetAssetClassDeployments ¶
func (*DevClient) GetAssetDeployments ¶
func (*DevClient) GetAssetPlatformDeploymentStatus ¶
func (*DevClient) GetAssetsDeployedToEntity ¶
func (*DevClient) GetAssetsNotDeployedOnPlatform ¶
func (*DevClient) GetBucketSet ¶
func (*DevClient) GetBucketSetFile ¶
func (*DevClient) GetBucketSetFiles ¶
func (*DevClient) GetBucketSets ¶
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) GetColumnsByCollectionName ¶
func (d *DevClient) GetColumnsByCollectionName(systemKey, collectionName string) ([]interface{}, error)
GetColumnsByCollectionName 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) GetDataTotalByName ¶
func (*DevClient) GetDeployResourcesForSystem ¶
func (*DevClient) GetDeploymentByName ¶
func (*DevClient) GetDeploymentSyncStatus ¶
func (*DevClient) GetDeveloper ¶
func (*DevClient) GetDevelopersForSystem ¶
func (*DevClient) GetDeviceColumns ¶
func (*DevClient) GetDeviceRoles ¶
func (*DevClient) GetDeviceSession ¶
func (*DevClient) GetDevices ¶
func (*DevClient) GetDevicesCount ¶
func (*DevClient) GetEdgeColumns ¶
func (*DevClient) GetEdgeGroup ¶
func (*DevClient) GetEdgeGroups ¶
func (*DevClient) GetEdgeSyncStatus ¶
func (*DevClient) GetEdgesCountWithQuery ¶
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) GetExternalDBConnection ¶
func (*DevClient) GetFailedServices ¶
func (*DevClient) GetGoogleStorageSettings ¶
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) GetMetrics ¶
func (*DevClient) GetPlatformDBConnections ¶
func (*DevClient) GetPlatformLogs ¶
func (*DevClient) GetPlatformStatistics ¶
func (*DevClient) GetPlugins ¶
func (*DevClient) GetPortals ¶
func (*DevClient) GetRole ¶
GetRole returns a slice of the desired role, including its 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) GetRolesCount ¶
GetRolesCount returns the number of roles that match a given query
func (*DevClient) GetRolesWithQuery ¶
GetRolesWithQuery returns a slice of roles that match the given query, 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) GetRunningServices ¶
func (*DevClient) GetService ¶
GetService returns information about a specified service
func (*DevClient) GetServiceCacheMeta ¶
func (*DevClient) GetServiceNames ¶
GetServiceNames retrieves the service names for a particular system
func (*DevClient) GetServiceRaw ¶
func (*DevClient) GetSyncResourcesForEdge ¶
func (*DevClient) GetSystemAnalytics ¶
func (*DevClient) GetSystemAssetDeployments ¶
func (*DevClient) GetSystemsForDeveloper ¶
func (*DevClient) GetThrottler ¶
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) GetUserCountWithQuery ¶
func (*DevClient) GetUserInfo ¶
func (*DevClient) GetUserRoles ¶
func (*DevClient) GetUserSession ¶
func (*DevClient) GetUsersWithQuery ¶
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) GetWebhook ¶
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) ListIndexes ¶
func (*DevClient) ListIndexesWithID ¶
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) MoveBucketSetFile ¶
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) NewServiceWithBody ¶
func (d *DevClient) NewServiceWithBody(systemKey, name, code string, extra map[string]interface{}) error
NewServiceWithBody creates a new service with a new name, code and any additional info passed in (parameters, execution_timeout, etc.)
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) OneSystemUsersAndDevices ¶
func (*DevClient) PerformExternalDBOperation ¶
func (*DevClient) PerformMonitoring ¶
func (*DevClient) PromoteDevToPlatformAdmin ¶
func (*DevClient) PublishHttp ¶
func (*DevClient) ReadBucketSetFile ¶
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) RegisterNewUserWithOptions ¶
func (*DevClient) ResetDevelopersPassword ¶
func (*DevClient) RetryFailedServices ¶
func (*DevClient) RotateKeyset ¶
func (*DevClient) SetDeveloper ¶
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) UpdateDataByName ¶
func (d *DevClient) UpdateDataByName(system_key, collection_name string, query *Query, changes map[string]interface{}) (UpdateResponse, error)
UpdateDataByName 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) UpdateDevInfo ¶
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) UpdateExternalDBConnection ¶
func (*DevClient) UpdateGoogleStorageSettings ¶
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) (map[string]interface{}, error)
UpdateService facillitates changes to the service's code
func (*DevClient) UpdateServiceCacheMeta ¶
func (*DevClient) UpdateServiceWithBody ¶
func (d *DevClient) UpdateServiceWithBody(systemKey, name, code string, extra map[string]interface{}) (map[string]interface{}, error)
UpdateServiceWithBody updates a service code and any additional info passed in (parameters, execution_timeout, etc.)
func (*DevClient) UpdateServiceWithLibraries ¶
func (*DevClient) UpdateServiceWithMap ¶
func (*DevClient) UpdateThrottlerCase ¶
func (*DevClient) UpdateThrottlerException ¶
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 ¶
func (*DevClient) UpdateUserRoles ¶
func (*DevClient) UpdateWebhook ¶
func (*DevClient) UpsertData ¶
func (d *DevClient) UpsertData(collection_id string, changes map[string]interface{}, conflictColumn string) (map[string]interface{}, error)
UpsertData 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) UpsertDataByName ¶
func (d *DevClient) UpsertDataByName(system_key, collection_name string, changes map[string]interface{}, conflictColumn string) (map[string]interface{}, error)
UpsertDataByName 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) VerifyAuthentication ¶
func (d *DevClient) VerifyAuthentication(verifyParams VerifyAuthenticationParams) error
type DeviceClient ¶
type DeviceClient struct { DeviceName string ActiveKey string DeviceToken string RefreshToken string ExpiresAt float64 MQTTClient MqttClient SystemKey string SystemSecret string HttpAddr string MqttAddr string MqttAuthAddr 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 NewDeviceClientWithServiceAccountAndAddrs ¶
func NewDeviceClientWithServiceAccountAndAddrs(httpAddr, mqttAddr, systemkey, systemsecret, deviceName, token string) *DeviceClient
func NewEdgeProxyDeviceClient ¶
func NewEdgeProxyDeviceClient(systemkey, systemsecret, deviceName, activeKey, edgeName string) (*DeviceClient, error)
func (*DeviceClient) Authenticate ¶
func (dvc *DeviceClient) Authenticate() (*AuthResponse, error)
"Login and logout"
func (*DeviceClient) AuthenticateDeviceWithKey ¶
func (d *DeviceClient) AuthenticateDeviceWithKey(systemKey, name, activeKey string) (map[string]interface{}, error)
func (*DeviceClient) AuthenticateMQTT ¶
func (*DeviceClient) ControlAdaptor ¶
func (d *DeviceClient) ControlAdaptor(systemKey, adaptorName string, controlSpec map[string]interface{}) (map[string]interface{}, error)
func (*DeviceClient) CopyBucketSetFile ¶
func (dv *DeviceClient) CopyBucketSetFile(systemKey, deploymentName, fromBox, fromPath, toBox, toPath string) 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) CreateBucketSetFile ¶
func (dv *DeviceClient) CreateBucketSetFile(systemKey, deploymentName, box, relPath, contents string) (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) CreateDataByName ¶
func (d *DeviceClient) CreateDataByName(system_key, collection_name string, item interface{}) ([]interface{}, error)
func (*DeviceClient) CreateDevice ¶
func (d *DeviceClient) CreateDevice(systemKey, name string, data map[string]interface{}) (map[string]interface{}, error)
func (*DeviceClient) CreateIndex ¶
func (d *DeviceClient) CreateIndex(systemKey, collectionName, columnToIndex string) error
func (*DeviceClient) CreateUniqueIndex ¶
func (d *DeviceClient) CreateUniqueIndex(systemKey, collectionName, columnToIndex string) 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) DeleteBucketSetFile ¶
func (dv *DeviceClient) DeleteBucketSetFile(systemKey, deploymentName, box, relPath 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) DropIndex ¶
func (d *DeviceClient) DropIndex(systemKey, collectionName, columnToIndex string) error
func (*DeviceClient) DropUniqueIndex ¶
func (d *DeviceClient) DropUniqueIndex(systemKey, collectionName, columnToIndex string) error
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) GetBucketSet ¶
func (dv *DeviceClient) GetBucketSet(systemKey, deploymentName string) (map[string]interface{}, error)
func (*DeviceClient) GetBucketSetFile ¶
func (dv *DeviceClient) GetBucketSetFile(systemKey, deploymentName, box, relPath string) (map[string]interface{}, error)
func (*DeviceClient) GetBucketSetFiles ¶
func (dv *DeviceClient) GetBucketSetFiles(systemKey, deploymentName, box string) (map[string]interface{}, error)
func (*DeviceClient) GetBucketSets ¶
func (dv *DeviceClient) GetBucketSets(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) GetDataTotalByName ¶
func (d *DeviceClient) GetDataTotalByName(system_key, collection_name 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) GetDevicesCount ¶
func (u *DeviceClient) GetDevicesCount(systemKey string, query *Query) (CountResp, 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) ListIndexes ¶
func (d *DeviceClient) ListIndexes(systemKey, collectionName string) (map[string]interface{}, error)
func (*DeviceClient) ListIndexesWithID ¶
func (d *DeviceClient) ListIndexesWithID(collectionID string) (map[string]interface{}, error)
func (*DeviceClient) Logout ¶
func (dvc *DeviceClient) Logout() error
func (*DeviceClient) MoveBucketSetFile ¶
func (dv *DeviceClient) MoveBucketSetFile(systemKey, deploymentName, fromBox, fromPath, toBox, toPath string) 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) ReadGetBucketSetFile ¶
func (dv *DeviceClient) ReadGetBucketSetFile(systemKey, deploymentName, box, relPath string) (string, error)
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) UpdateDataByName ¶
func (d *DeviceClient) UpdateDataByName(system_key, collection_name string, query *Query, changes map[string]interface{}) (UpdateResponse, 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)
func (*DeviceClient) UpsertData ¶
func (*DeviceClient) UpsertDataByName ¶
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 MongoDBConfig ¶
type MongoDBConfig struct {
Name, User, Password, Host, Port, DBName, Tablename string
}
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 RoleChanges ¶
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 UpdateResponse ¶
type UpdateResponse struct {
Count float64
}
type UserClient ¶
type UserClient struct { UserToken string RefreshToken string ExpiresAt float64 MQTTClient MqttClient SystemKey string SystemSecret string Email string Password string HttpAddr string MqttAddr string MqttAuthAddr 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 NewRefreshUserClientWithAddrs ¶
func NewRefreshUserClientWithAddrs(httpAddr, mqttAddr, systemKey, systemSecret, refreshToken, accessToken string) *UserClient
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 NewUserClientWithServiceAccountAndAddrs ¶
func NewUserClientWithServiceAccountAndAddrs(httpAddr, mqttAddr, systemkey, systemsecret, email, token string) *UserClient
func (*UserClient) AddColumn ¶
func (u *UserClient) AddColumn(collection_id, column_name, column_type string) error
func (*UserClient) AddExternalDBConnection ¶
func (u *UserClient) AddExternalDBConnection(systemKey string, data map[string]interface{}) error
func (*UserClient) AuthAnon ¶
func (u *UserClient) AuthAnon() error
func (*UserClient) Authenticate ¶
func (u *UserClient) Authenticate() (*AuthResponse, error)
Authenticate retrieves a token from the specified Clearblade Platform
func (*UserClient) AuthenticateMQTT ¶
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) CopyBucketSetFile ¶
func (u *UserClient) CopyBucketSetFile(systemKey, deploymentName, fromBox, fromPath, toBox, toPath string) 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) CreateBucketSetFile ¶
func (u *UserClient) CreateBucketSetFile(systemKey, deploymentName, box, relPath, contents string) (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) CreateDataByName ¶
func (u *UserClient) CreateDataByName(system_key, collection_name string, item interface{}) ([]interface{}, error)
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) CreateIndex ¶
func (u *UserClient) CreateIndex(systemKey, collectionName, columnToIndex string) 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) CreateUniqueIndex ¶
func (u *UserClient) CreateUniqueIndex(systemKey, collectionName, columnToIndex string) 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) DeleteBucketSetFile ¶
func (u *UserClient) DeleteBucketSetFile(systemKey, deploymentName, box, relPath 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) DeleteExternalDBConnection ¶
func (u *UserClient) DeleteExternalDBConnection(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) DropIndex ¶
func (u *UserClient) DropIndex(systemKey, collectionName, columnToIndex string) error
func (*UserClient) DropUniqueIndex ¶
func (u *UserClient) DropUniqueIndex(systemKey, collectionName, columnToIndex string) error
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) GetAllUsers ¶
func (u *UserClient) GetAllUsers(systemKey string) ([]map[string]interface{}, error)
func (*UserClient) GetBucketSet ¶
func (u *UserClient) GetBucketSet(systemKey, deploymentName string) (map[string]interface{}, error)
func (*UserClient) GetBucketSetFile ¶
func (u *UserClient) GetBucketSetFile(systemKey, deploymentName, box, relPath string) (map[string]interface{}, error)
func (*UserClient) GetBucketSetFiles ¶
func (u *UserClient) GetBucketSetFiles(systemKey, deploymentName, box string) (map[string]interface{}, error)
func (*UserClient) GetBucketSets ¶
func (u *UserClient) GetBucketSets(systemKey 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) GetDataTotalByName ¶
func (u *UserClient) GetDataTotalByName(system_key, collection_name 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) GetDevicesCount ¶
func (u *UserClient) GetDevicesCount(systemKey string, query *Query) (CountResp, 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) GetExternalDBConnection ¶
func (u *UserClient) GetExternalDBConnection(systemKey, name string) (map[string]interface{}, error)
func (*UserClient) GetItemCount ¶
func (u *UserClient) GetItemCount(collection_id string) (int, error)
func (*UserClient) GetOwnUserInfo ¶
func (u *UserClient) GetOwnUserInfo() (map[string]interface{}, 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) GetUserInfo ¶
func (u *UserClient) GetUserInfo(systemKey, email string) (map[string]interface{}, error)
func (*UserClient) GetUserRoles ¶
func (u *UserClient) GetUserRoles(systemKey, userId string) ([]interface{}, 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) ListIndexes ¶
func (u *UserClient) ListIndexes(systemKey, collectionName string) (map[string]interface{}, error)
func (*UserClient) ListIndexesWithID ¶
func (u *UserClient) ListIndexesWithID(collectionID string) (map[string]interface{}, error)
func (*UserClient) MoveBucketSetFile ¶
func (u *UserClient) MoveBucketSetFile(systemKey, deploymentName, fromBox, fromPath, toBox, toPath string) error
func (*UserClient) NewClientID ¶
func (b *UserClient) NewClientID() string
func (*UserClient) NewCollection ¶
func (u *UserClient) NewCollection(systemKey, name string) (string, error)
func (*UserClient) PerformExternalDBOperation ¶
func (u *UserClient) PerformExternalDBOperation(systemKey, name string, operation map[string]interface{}) (map[string]interface{}, 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) ReadGetBucketSetFile ¶
func (u *UserClient) ReadGetBucketSetFile(systemKey, deploymentName, box, relPath string) (string, error)
func (*UserClient) RefreshAuthentication ¶
func (u *UserClient) RefreshAuthentication() error
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) UpdateData ¶
func (u *UserClient) UpdateData(collection_id string, query *Query, changes map[string]interface{}) error
func (*UserClient) UpdateDataByName ¶
func (u *UserClient) UpdateDataByName(system_key, collection_name string, query *Query, changes map[string]interface{}) (UpdateResponse, 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) UpdateExternalDBConnection ¶
func (u *UserClient) UpdateExternalDBConnection(systemKey, name string, changes 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
func (*UserClient) UpdateUserPassword ¶
func (u *UserClient) UpdateUserPassword(userID, newPassword string) error
func (*UserClient) UpdateUserRoles ¶
func (u *UserClient) UpdateUserRoles(userID string, changes RoleChanges) error
func (*UserClient) UpsertData ¶
func (*UserClient) UpsertDataByName ¶
Source Files ¶
- adaptorcalls.go
- admincalls.go
- assetcalls.go
- autodeletion.go
- bucketcalls.go
- codeadmin.go
- codecalls.go
- connect.go
- datacalls.go
- devcalls.go
- devicecalls.go
- edgecalls.go
- edgegroupcalls.go
- eventcalls.go
- externaldbcalls.go
- librarycalls.go
- mdevcalls.go
- metriccalls.go
- mqtt.go
- plugincalls.go
- portalcalls.go
- provisioningcalls.go
- query.go
- settingscalls.go
- throttlercalls.go
- triagecalls.go
- usercalls.go
- utils.go