Documentation
¶
Index ¶
- Constants
- Variables
- func ServiceIdToTopic(id string) string
- type Analytics
- func (this *Analytics) Do(task model.CamundaExternalTask) (modules []model.Module, outputs map[string]interface{}, err error)
- func (this *Analytics) GetFlowInputs(token auth.Token, id string) (result []FlowModelCell, err error, code int)
- func (this *Analytics) Remove(token auth.Token, pipelineId string) error
- func (this *Analytics) SendDeployRequest(token auth.Token, request PipelineRequest) (result Pipeline, err error, code int)
- func (this *Analytics) SendUpdateRequest(token auth.Token, request PipelineRequest) (result Pipeline, err error, code int)
- func (this *Analytics) Undo(modules []model.Module, reason error)
- type CellConfig
- type Config
- type Devices
- type EventNode
- type EventPipelineDescription
- type Flow
- type FlowModel
- type FlowModelCell
- type Imports
- type InputTopic
- type Mapping
- type NodeConfig
- type NodeInput
- type NodeValue
- type Operator
- type Pipeline
- type PipelineNode
- type PipelineRequest
- type SmartServiceRepo
Constants ¶
View Source
const DeviceFilterType = "deviceId"
View Source
const ImportFilterType = "ImportId"
View Source
const ModuleUpdateVersionField = "module_update_version"
Variables ¶
View Source
var DefaultTimeout = 30 * time.Second
Functions ¶
func ServiceIdToTopic ¶
Types ¶
type Analytics ¶
type Analytics struct {
// contains filtered or unexported fields
}
func New ¶
func New(config Config, libConfig configuration.Config, auth *auth.Auth, smartServiceRepo SmartServiceRepo, imports Imports, devices Devices) *Analytics
func (*Analytics) GetFlowInputs ¶
func (*Analytics) SendDeployRequest ¶
func (*Analytics) SendUpdateRequest ¶
type CellConfig ¶
type Config ¶
type Config struct { WorkerParamPrefix string `json:"worker_param_prefix"` FlowEngineUrl string `json:"flow_engine_url"` FlowParserUrl string `json:"flow_parser_url"` ImportDeployUrl string `json:"import_deploy_url"` DeviceRepositoryUrl string `json:"device_repository_url"` Debug bool `json:"debug"` EnableMultiplePaths bool `json:"enable_multiple_paths"` DevicePathPrefix string `json:"device_path_prefix"` GroupPathPrefix string `json:"group_path_prefix"` ImportPathPrefix string `json:"import_path_prefix"` RemoveImportPathRoot bool `json:"remove_import_path_root"` }
type Devices ¶
type Devices interface { GetDeviceInfosOfGroup(token auth.Token, groupId string) (devices []devices.Device, deviceTypeIds []string, err error) GetDeviceInfosOfDevices(token auth.Token, deviceIds []string) (devices []devices.Device, deviceTypeIds []string, err error) GetDeviceTypeSelectables(token auth.Token, criteria []devices.FilterCriteria, includeModified bool, servicesMustMatchAllCriteria bool) (result []devices.DeviceTypeSelectable, err error) }
type EventNode ¶
type EventNode struct { Id string `json:"id"` Name string `json:"name"` Configs []NodeConfig `json:"configs"` }
type EventPipelineDescription ¶
type EventPipelineDescription struct { ImportId string `json:"import_id,omitempty"` DeviceGroupId string `json:"device_group_id,omitempty"` DeviceId string `json:"device_id,omitempty"` ServiceId string `json:"service_id,omitempty"` FunctionId string `json:"function_id,omitempty"` AspectId string `json:"aspect_id,omitempty"` ValuePath string `json:"value_path,omitempty"` OperatorValue string `json:"operator_value"` EventId string `json:"event_id"` DeploymentId string `json:"deployment_id"` FlowId string `json:"flow_id,omitempty"` }
type FlowModel ¶
type FlowModel struct {
Cells []FlowModelCell `json:"cells"`
}
type FlowModelCell ¶
type FlowModelCell struct { Id string `json:"id"` Name string `json:"name"` DeploymentType string `json:"deploymentType"` InPorts []string `json:"inPorts,omitempty"` OutPorts []string `json:"outPorts,omitempty"` Type string `json:"type"` Source map[string]interface{} `json:"source"` Target map[string]interface{} `json:"target"` Image string `json:"image"` Config []CellConfig `json:"config,omitempty"` OperatorId string `json:"operatorId"` }
type InputTopic ¶
type NodeConfig ¶
type Operator ¶
type Operator struct { Id string `json:"id,omitempty"` Name string `json:"name,omitempty"` ImageId string `json:"imageId,omitempty"` DeploymentType string `json:"deploymentType,omitempty"` OperatorId string `json:"operatorId,omitempty"` Config map[string]string `json:"config,omitempty"` InputTopics []InputTopic }
type PipelineNode ¶
type PipelineNode struct { NodeId string `json:"nodeId,omitempty"` Inputs []NodeInput `json:"inputs,omitempty"` Config []NodeConfig `json:"config,omitempty"` PersistData bool `json:"persistData,omitempty"` }
type PipelineRequest ¶
type PipelineRequest struct { Id string `json:"id,omitempty"` FlowId string `json:"flowId,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` WindowTime int `json:"windowTime,omitempty"` ConsumeAllMessages bool `json:"consumeAllMessages,omitempty"` MergeStrategy string `json:"mergeStrategy,omitempty"` Nodes []PipelineNode `json:"nodes,omitempty"` }
type SmartServiceRepo ¶
type SmartServiceRepo interface { GetInstanceUser(instanceId string) (userId string, err error) ListExistingModules(processInstanceId string, query model.ModulQuery) (result []model.SmartServiceModule, err error) }
Click to show internal directories.
Click to hide internal directories.