pkg

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJson

func GetJson(token string, url string, out interface{}) (err error)

Types

type AspectNodeQuery

type AspectNodeQuery struct {
	Ids []string `json:"ids"`
}

type BpmnResource

type BpmnResource struct {
	Id string `json:"id" bson:"id"`
	// contains filtered or unexported fields
}

type CharacteristicsWrapper

type CharacteristicsWrapper struct {
	Raw model.Characteristic `json:"raw"`
}

type Config

type Config struct {
	ServerPort string `json:"server_port"`

	IotUrl           string `json:"iot_url"`
	ImportRepoUrl    string `json:"import_repo_url"`
	ConnectionLogUrl string `json:"connection_log_url"`

	CamundaWrapperUrl    string `json:"camunda_wrapper_url"`
	ProcessDeploymentUrl string `json:"process_deployment_url"`
	EventManagerUrl      string `json:"event_manager_url"`
	HttpClientTimeout    string `json:"http_client_timeout"`
}

func LoadConfig

func LoadConfig(location string) (config Config, err error)

type Dependencies

type Dependencies struct {
	DeploymentId string             `json:"deployment_id" bson:"deployment_id"`
	Owner        string             `json:"owner" bson:"owner"`
	Devices      []DeviceDependency `json:"devices" bson:"devices"`
	Events       []EventDependency  `json:"events" bson:"events"`
	Online       bool               `json:"-"`
}

type DeviceDependency

type DeviceDependency struct {
	DeviceId      string         `json:"device_id" bson:"device_id"`
	Name          string         `json:"name" bson:"name"`
	BpmnResources []BpmnResource `json:"bpmn_resources" bson:"bpmn_resources"`
	Online        bool           `json:"-"`
}

type EventDependency

type EventDependency struct {
	EventId       string         `json:"event_id" bson:"event_id"`
	BpmnResources []BpmnResource `json:"bpmn_resources" bson:"bpmn_resources"`
	Online        bool           `json:"-"`
}

type Function

type Function struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	ConceptId   string `json:"concept_id"`
	RdfType     string `json:"rdf_type"`
}

type HistoryResult

type HistoryResult struct {
	Series []HistorySeries `json:"Series"`
}

type HistorySeries

type HistorySeries struct {
	Name    string            `json:"name"`
	Tags    map[string]string `json:"tags"`
	Columns []string          `json:"columns"`
	Values  [][]interface{}   `json:"values"`
}

type ImportTypeCriteria added in v0.0.11

type ImportTypeCriteria struct {
	FunctionId string
	AspectId   string
}

type ImportTypeWithCriteria added in v0.0.11

type ImportTypeWithCriteria struct {
	model.ImportType
	Criteria []ImportTypeCriteria
}

type Interface

type Interface interface {
	Config() Config
	ListGateways(token auth.Token, limit int64, offset int64) (result []map[string]interface{}, err error)
	GetExtendedProcessList(token auth.Token, query url.Values) (result []map[string]interface{}, err error)
	CompleteDeviceHistory(token auth.Token, duration string, devices []map[string]interface{}) (result []map[string]interface{}, err error)
	CompleteGatewayHistory(token auth.Token, duration string, devices []map[string]interface{}) (result []map[string]interface{}, err error)
	ListAllGateways(token auth.Token) (result []map[string]interface{}, err error)
	FindDevices(token auth.Token, limit int, offset int) ([]map[string]interface{}, error)
	GetMeasuringFunctionsForAspect(token auth.Token, aspectId string) (functions []Function, err error, code int)
	GetMeasuringFunctions(token auth.Token, functionIds []string) (functions []Function, err error, code int)
	GetImportTypesWithAspect(token auth.Token, aspectIds []string) (importTypes []ImportTypeWithCriteria, err error, code int)
	GetAspectNodes(ids []string, token auth.Token) ([]model.AspectNode, error)
	GetAspectNodesWithMeasuringFunction(token auth.Token) ([]model.AspectNode, error)
	GetImportTypes(token auth.Token) (importTypes []ImportTypeWithCriteria, err error, code int)
	GetDeviceClassUses(token auth.Token) (result interface{}, err error)
}

type Lib

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

func New

func New(config Config) *Lib

func (*Lib) CheckEventStates

func (this *Lib) CheckEventStates(token string, ids []string) (result map[string]bool, err error)

func (*Lib) CompleteDeviceHistory

func (this *Lib) CompleteDeviceHistory(token auth.Token, duration string, devices []map[string]interface{}) (result []map[string]interface{}, err error)

func (*Lib) CompleteGatewayHistory

func (this *Lib) CompleteGatewayHistory(token auth.Token, duration string, gateways []map[string]interface{}) (result []map[string]interface{}, err error)

func (*Lib) Config

func (this *Lib) Config() Config

func (*Lib) FindDevices

func (this *Lib) FindDevices(token auth.Token, limit int, offset int) (devices []map[string]interface{}, err error)

func (*Lib) GetAspectNodes

func (this *Lib) GetAspectNodes(ids []string, token auth.Token) ([]model.AspectNode, error)

func (*Lib) GetAspectNodesWithMeasuringFunction

func (this *Lib) GetAspectNodesWithMeasuringFunction(token auth.Token) ([]model.AspectNode, error)

func (*Lib) GetDeviceClassUses

func (this *Lib) GetDeviceClassUses(token auth.Token) (result interface{}, err error)

func (*Lib) GetDeviceLogHistory

func (this *Lib) GetDeviceLogHistory(token auth.Token, deviceIds []string, duration string) (result map[string]HistorySeries, err error)

func (*Lib) GetDeviceLogStates

func (this *Lib) GetDeviceLogStates(token auth.Token, deviceIds []string) (result map[string]bool, err error)

func (*Lib) GetExtendedProcessList

func (this *Lib) GetExtendedProcessList(token auth.Token, query url.Values) (result []map[string]interface{}, err error)

func (*Lib) GetGatewayLogHistory

func (this *Lib) GetGatewayLogHistory(token auth.Token, ids []string, duration string) (result map[string]HistorySeries, err error)

func (*Lib) GetGatewayLogStates

func (this *Lib) GetGatewayLogStates(token auth.Token, ids []string) (result map[string]bool, err error)

func (*Lib) GetImportTypes

func (this *Lib) GetImportTypes(token auth.Token) (importTypes []ImportTypeWithCriteria, err error, code int)

func (*Lib) GetImportTypesWithAspect

func (this *Lib) GetImportTypesWithAspect(token auth.Token, aspectIds []string) (importTypes []ImportTypeWithCriteria, err error, code int)

func (*Lib) GetLogHistory

func (this *Lib) GetLogHistory(token auth.Token, kind string, ids []string, duration string) (result map[string]HistorySeries, err error)

func (*Lib) GetLogedges

func (this *Lib) GetLogedges(token auth.Token, kind string, ids []string, duration string) (result map[string]interface{}, err error)

func (*Lib) GetLogstarts

func (this *Lib) GetLogstarts(token auth.Token, kind string, ids []string) (result map[string]interface{}, err error)

func (*Lib) GetMeasuringFunctions

func (this *Lib) GetMeasuringFunctions(token auth.Token, functionIds []string) (functions []Function, err error, code int)

func (*Lib) GetMeasuringFunctionsForAspect

func (this *Lib) GetMeasuringFunctionsForAspect(token auth.Token, aspectId string) (functions []Function, err error, code int)

func (*Lib) GetProcessDependencyList

func (this *Lib) GetProcessDependencyList(token auth.Token, processIds []string) (result []Dependencies, err error)

func (*Lib) GetProcessDeploymentList

func (this *Lib) GetProcessDeploymentList(token auth.Token, query url.Values) (result []map[string]interface{}, err error)

func (*Lib) ListAllGateways

func (this *Lib) ListAllGateways(token auth.Token) (result []map[string]interface{}, err error)

func (*Lib) ListGateways

func (this *Lib) ListGateways(token auth.Token, limit int64, offset int64) (result []map[string]interface{}, err error)

func (*Lib) SetOnlineState

func (this *Lib) SetOnlineState(token auth.Token, dependencies []Dependencies) (result []Dependencies, err error)

type OfflineReason

type OfflineReason struct {
	Type           string      `json:"type"`
	Id             string      `json:"id"`
	AdditionalInfo interface{} `json:"additional_info,omitempty"`
	Description    string      `json:"description"`
}

Directories

Path Synopsis
api
tests

Jump to

Keyboard shortcuts

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