controller

package
v0.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HistoryMayOnlyDeletedIfFinishedOrPlaceholderErr = errors.New("history may only deleted if the process instance is finished or the element is a placeholder")
View Source
var IsMarkedForDeleteErr = errors.New("is market for deletion")
View Source
var IsPlaceholderProcessErr = errors.New("is placeholder process")

Functions

This section is empty.

Types

type BaseDeviceRepoFactory

type BaseDeviceRepoFactory = func(token string, deviceRepoUrl string) eventinterfaces.Devices

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func New

func New(config configuration.Config, ctx context.Context, db database.Database, security Security, baseDeviceRepoFactory BaseDeviceRepoFactory, deviceProvider DeviceProvider) (ctrl *Controller, err error)

func NewDefault

func NewDefault(conf configuration.Config, ctx context.Context) (ctrl *Controller, err error)

func (*Controller) ApiCheckAccess

func (this *Controller) ApiCheckAccess(request *http.Request, networkId string, rights string) (err error, errCode int)

func (*Controller) ApiCheckAccessMultiple

func (this *Controller) ApiCheckAccessMultiple(request *http.Request, networkIds []string, rights string) (err error, errCode int)

func (*Controller) ApiCheckAccessReturnToken

func (this *Controller) ApiCheckAccessReturnToken(request *http.Request, networkId string, rights string) (token string, err error, errCode int)

func (*Controller) ApiCreateDeployment

func (this *Controller) ApiCreateDeployment(token string, networkId string, deployment deploymentmodel.Deployment) (err error, errCode int)

func (*Controller) ApiDeleteDeployment

func (this *Controller) ApiDeleteDeployment(networkId string, deploymentId string) (err error, errCode int)

func (*Controller) ApiDeleteHistoricProcessInstance

func (this *Controller) ApiDeleteHistoricProcessInstance(networkId string, id string) (err error, errCode int)

func (*Controller) ApiDeleteIncident

func (this *Controller) ApiDeleteIncident(networkId string, id string) (err error, errCode int)

func (*Controller) ApiDeleteProcessInstance

func (this *Controller) ApiDeleteProcessInstance(networkId string, id string) (err error, errCode int)

func (*Controller) ApiListDeployments

func (this *Controller) ApiListDeployments(networkIds []string, limit int64, offset int64, sort string) (result []model.Deployment, err error, errCode int)

func (*Controller) ApiListHistoricProcessInstance

func (this *Controller) ApiListHistoricProcessInstance(networkIds []string, query model.HistoryQuery, limit int64, offset int64, sort string) (result []model.HistoricProcessInstance, total int64, err error, errCode int)

func (*Controller) ApiListIncidents

func (this *Controller) ApiListIncidents(networkIds []string, processInstanceId string, limit int64, offset int64, sort string) (result []model.Incident, err error, errCode int)

func (*Controller) ApiListNetworks

func (this *Controller) ApiListNetworks(request *http.Request) (result []SearchHub, err error, errCode int)

func (*Controller) ApiListProcessDefinitions

func (this *Controller) ApiListProcessDefinitions(networkIds []string, limit int64, offset int64, sort string) (result []model.ProcessDefinition, err error, errCode int)

func (*Controller) ApiListProcessInstances

func (this *Controller) ApiListProcessInstances(networkIds []string, limit int64, offset int64, sort string) (result []model.ProcessInstance, err error, errCode int)

func (*Controller) ApiReadDeployment

func (this *Controller) ApiReadDeployment(networkId string, deploymentId string) (result model.Deployment, err error, errCode int)

func (*Controller) ApiReadDeploymentMetadata

func (this *Controller) ApiReadDeploymentMetadata(networkId string, deploymentId string) (result model.DeploymentMetadata, err error, errCode int)

func (*Controller) ApiReadHistoricProcessInstance

func (this *Controller) ApiReadHistoricProcessInstance(networkId string, id string) (result model.HistoricProcessInstance, err error, errCode int)

func (*Controller) ApiReadIncident

func (this *Controller) ApiReadIncident(networkId string, id string) (result model.Incident, err error, errCode int)

func (*Controller) ApiReadProcessDefinition

func (this *Controller) ApiReadProcessDefinition(networkId string, id string) (result model.ProcessDefinition, err error, errCode int)

func (*Controller) ApiReadProcessInstance

func (this *Controller) ApiReadProcessInstance(networkId string, id string) (result model.ProcessInstance, err error, errCode int)

func (*Controller) ApiSearchDeployments

func (this *Controller) ApiSearchDeployments(networkIds []string, search string, limit int64, offset int64, sort string) (result []model.Deployment, err error, errCode int)

func (*Controller) ApiStartDeployment

func (this *Controller) ApiStartDeployment(networkId string, deploymentId string, parameter map[string]interface{}) (err error, errCode int)

func (*Controller) DeleteDeployment

func (this *Controller) DeleteDeployment(networkId string, deploymentId string)

func (*Controller) DeleteHistoricProcessInstance

func (this *Controller) DeleteHistoricProcessInstance(networkId string, historicInstanceId string)

func (*Controller) DeleteIncident

func (this *Controller) DeleteIncident(networkId string, incidentId string)

func (*Controller) DeleteProcessDefinition

func (this *Controller) DeleteProcessDefinition(networkId string, definitionId string)

func (*Controller) DeleteProcessInstance

func (this *Controller) DeleteProcessInstance(networkId string, instanceId string)

func (*Controller) DeleteUnknownDeployments

func (this *Controller) DeleteUnknownDeployments(networkId string, knownIds []string)

func (*Controller) DeleteUnknownHistoricProcessInstances

func (this *Controller) DeleteUnknownHistoricProcessInstances(networkId string, knownIds []string)

func (*Controller) DeleteUnknownIncidents

func (this *Controller) DeleteUnknownIncidents(networkId string, knownIds []string)

func (*Controller) DeleteUnknownProcessDefinitions

func (this *Controller) DeleteUnknownProcessDefinitions(networkId string, knownIds []string)

func (*Controller) DeleteUnknownProcessInstances

func (this *Controller) DeleteUnknownProcessInstances(networkId string, knownIds []string)

func (*Controller) ExtendDeployments

func (this *Controller) ExtendDeployments(deployments []model.Deployment) (result []model.ExtendedDeployment)

func (*Controller) ListDeploymentMetadata

func (this *Controller) ListDeploymentMetadata(query model.MetadataQuery) (result []model.DeploymentMetadata, err error)

func (*Controller) LogNetworkInteraction

func (this *Controller) LogNetworkInteraction(networkId string)

func (*Controller) RemoveOldEntities

func (this *Controller) RemoveOldEntities(maxAge time.Duration) error

func (*Controller) SetErrCode

func (this *Controller) SetErrCode(err error) int

func (*Controller) UpdateDeployment

func (this *Controller) UpdateDeployment(networkId string, deployment camundamodel.Deployment)

func (*Controller) UpdateDeploymentMetadata

func (this *Controller) UpdateDeploymentMetadata(networkId string, metadata model.Metadata)

func (*Controller) UpdateDeviceGroup

func (this *Controller) UpdateDeviceGroup(token string, deviceGroupId string) error

func (*Controller) UpdateHistoricProcessInstance

func (this *Controller) UpdateHistoricProcessInstance(networkId string, historicProcessInstance camundamodel.HistoricProcessInstance)

func (*Controller) UpdateIncident

func (this *Controller) UpdateIncident(networkId string, incident camundamodel.Incident)

func (*Controller) UpdateProcessDefinition

func (this *Controller) UpdateProcessDefinition(networkId string, processDefinition camundamodel.ProcessDefinition)

func (*Controller) UpdateProcessInstance

func (this *Controller) UpdateProcessInstance(networkId string, instance camundamodel.ProcessInstance)

type DeviceGroupCommand

type DeviceGroupCommand struct {
	Command     string             `json:"command"`
	Id          string             `json:"id"`
	Owner       string             `json:"owner"`
	DeviceGroup models.DeviceGroup `json:"device_group"`
}

type DeviceProvider

type DeviceProvider = func(token string, baseUrl string, deviceId string) (result models.Device, err error, code int)

type Devices

type Devices interface {
	GetDeviceInfosOfGroup(token auth.Token, groupId string) (devices []model.Device, deviceTypeIds []string, err error, code int)
	GetDeviceInfosOfDevices(token auth.Token, deviceIds []string) (devices []model.Device, deviceTypeIds []string, err error, code int)
	GetDeviceTypeSelectables(token auth.Token, criteria []model.FilterCriteria) (result []model.DeviceTypeSelectable, err error, code int)
	GetConcept(token auth.Token, conceptId string) (result model.Concept, err error, code int)
	GetFunction(token auth.Token, functionId string) (result model.Function, err error, code int)
	GetService(token auth.Token, serviceId string) (result models.Service, err error, code int)
	GetDevice(token auth.Token, id string) (devicemodel.Device, error, int)
}

type DoneNotification

type DoneNotification struct {
	Command string `json:"command"`
	Id      string `json:"id"`
	Handler string `json:"handler"`
}

type SearchHub

type SearchHub = models.Hub

type Security

type Security interface {
	GetAdminToken() (token string, err error)
	CheckBool(token string, kind string, id string, rights string) (allowed bool, err error)
	CheckMultiple(token string, kind string, ids []string, rights string) (result map[string]bool, err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL