model

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Characteristic

type Characteristic struct {
	Id                 string           `json:"id"`
	Name               string           `json:"name"`
	DisplayUnit        string           `json:"display_unit"`
	Type               Type             `json:"type"`
	MinValue           interface{}      `json:"min_value,omitempty"`
	MaxValue           interface{}      `json:"max_value,omitempty"`
	AllowedValues      []interface{}    `json:"allowed_values"`
	Value              interface{}      `json:"value,omitempty"`
	SubCharacteristics []Characteristic `json:"sub_characteristics"`
}

type Criteria

type Criteria struct {
	Interaction   *Interaction `json:"interaction" bson:"interaction"`
	FunctionId    *string      `json:"function_id" bson:"function_id"`
	DeviceClassId *string      `json:"device_class_id" bson:"device_class_id"`
	AspectId      *string      `json:"aspect_id" bson:"aspect_id"`
}

type DesignQueryOptions

type DesignQueryOptions struct {
	Limit  int
	Offset int
	Sort   string
	Search string
}

func (DesignQueryOptions) GetLimit

func (this DesignQueryOptions) GetLimit() int64

func (DesignQueryOptions) GetOffset

func (this DesignQueryOptions) GetOffset() int64

func (DesignQueryOptions) GetSort

func (this DesignQueryOptions) GetSort() string

type Device

type Device struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	DisplayName string `json:"display_name"`
}

type DeviceGroup

type DeviceGroup struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type DeviceGroupSelection

type DeviceGroupSelection struct {
	Id string `json:"id"`
}

type DeviceSelection

type DeviceSelection struct {
	DeviceId         string  `json:"device_id"`
	ServiceId        *string `json:"service_id"`
	Path             *string `json:"path"`
	CharacteristicId *string `json:"characteristic_id,omitempty"`
}

type FilterPossibility

type FilterPossibility = string
const (
	DeviceFilter             FilterPossibility = "device"
	DeviceServiceGroupFilter FilterPossibility = "device_service_group"
	GroupFilter              FilterPossibility = "group"
	ImportFilter             FilterPossibility = "import"
)

type GenericEventSource

type GenericEventSource struct {
	FilterType       string  `json:"filter_type"`
	FilterIds        string  `json:"filter_ids"`
	Topic            string  `json:"topic"`
	Path             string  `json:"path"`
	CharacteristicId *string `json:"characteristic_id,omitempty"`
}

type HistoricProcessInstance

type HistoricProcessInstance struct {
	Id          string `json:"id"`
	EndTime     string `json:"endTime"`
	BusinessKey string `json:"businessKey"`
}

type Import

type Import struct {
	Id           string `json:"id"`
	Name         string `json:"name"`
	ImportTypeId string `json:"import_type_id"`
}

type ImportSelection

type ImportSelection struct {
	Id               string  `json:"id"`
	Path             *string `json:"path"`
	CharacteristicId *string `json:"characteristic_id,omitempty"`
}

type ImportType

type ImportType struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type InstanceQueryOptions

type InstanceQueryOptions struct {
	Limit  int
	Offset int
	Sort   string
}

func (InstanceQueryOptions) GetLimit

func (this InstanceQueryOptions) GetLimit() int64

func (InstanceQueryOptions) GetOffset

func (this InstanceQueryOptions) GetOffset() int64

func (InstanceQueryOptions) GetSort

func (this InstanceQueryOptions) GetSort() string

type Interaction

type Interaction string
const (
	EVENT             Interaction = "event"
	REQUEST           Interaction = "request"
	EVENT_AND_REQUEST Interaction = "event+request"
)

type IotDescription

type IotDescription struct {
	TypeFilter                   []FilterPossibility `json:"type_filter" bson:"type_filter"`
	Criteria                     []Criteria          `json:"criteria" bson:"criteria"`
	EntityOnly                   bool                `json:"entity_only" bson:"entity_only"`
	NeedsSameEntityIdInParameter string              `json:"needs_same_entity_id_in_parameter" bson:"needs_same_entity_id_in_parameter"`
}

type IotOption

type IotOption struct {
	DeviceSelection      *DeviceSelection      `json:"device_selection,omitempty"`
	DeviceGroupSelection *DeviceGroupSelection `json:"device_group_selection,omitempty"`
	ImportSelection      *ImportSelection      `json:"import_selection,omitempty"`
	GenericEventSource   *GenericEventSource   `json:"generic_event_source,omitempty"`
	Label                string                `json:"label"`
}

type MaintenanceProcedure

type MaintenanceProcedure struct {
	BpmnId                string                 `json:"bpmn_id" bson:"bpmn_id"`
	MessageRef            string                 `json:"message_ref" bson:"message_ref"`
	PublicEventId         string                 `json:"public_event_id" bson:"public_event_id"`
	InternalEventId       string                 `json:"internal_event_id" bson:"internal_event_id"`
	ParameterDescriptions []ParameterDescription `json:"parameter_descriptions" bson:"parameter_descriptions"`
}

type ModuleDeleteInfo

type ModuleDeleteInfo struct {
	Url    string `json:"url" bson:"url"` //url receives a DELETE request and responds with a status code < 300 || code == 404 if ok
	UserId string `json:"user_id" bson:"user_id"`
}

type ModuleQueryOptions

type ModuleQueryOptions struct {
	KeyFilter        *string
	TypeFilter       *string
	InstanceIdFilter *string
	Limit            int
	Offset           int
	Sort             string
}

func (ModuleQueryOptions) GetLimit

func (this ModuleQueryOptions) GetLimit() int64

func (ModuleQueryOptions) GetOffset

func (this ModuleQueryOptions) GetOffset() int64

func (ModuleQueryOptions) GetSort

func (this ModuleQueryOptions) GetSort() string

type Option

type Option struct {
	Value                        interface{} `json:"value"`
	Label                        string      `json:"label"`
	Kind                         string      `json:"kind"`                                        //optional helper for frontend to group options
	EntityId                     string      `json:"entity_id"`                                   //to be used in combination with needs_same_entity_id_in_parameter
	NeedsSameEntityIdInParameter string      `json:"needs_same_entity_id_in_parameter,omitempty"` //optional, frontend should filter this option depending on selection in referenced parameter
}

type ParameterDescription

type ParameterDescription struct {
	Id               string                 `json:"id" bson:"id"`
	Label            string                 `json:"label" bson:"label"`
	Description      string                 `json:"description" bson:"description"`
	Type             string                 `json:"type" bson:"type"`
	DefaultValue     interface{}            `json:"default_value" bson:"default_value"`
	Multiple         bool                   `json:"multiple" bson:"multiple"`
	AutoSelectAll    bool                   `json:"auto_select_all" bson:"auto_select_all"`
	Options          map[string]interface{} `json:"options,omitempty" bson:"options,omitempty"`
	IotDescription   *IotDescription        `json:"iot_description" bson:"iot_description"`
	Order            int                    `json:"order" bson:"order"`
	CharacteristicId *string                `json:"characteristic_id,omitempty"`
	Characteristic   *Characteristic        `json:"characteristic,omitempty"`
	Optional         bool                   `json:"optional"`
}

type PathOption

type PathOption struct {
	Path             string `json:"path"`
	CharacteristicId string `json:"characteristicId"`
}

type PermissionsInfo

type PermissionsInfo struct {
	Shared      bool            `json:"shared"`
	Permissions map[string]bool `json:"permissions"`
}

type ReleaseQueryOptions

type ReleaseQueryOptions struct {
	Limit  int
	Offset int
	Sort   string
	Search string
	Latest bool
	Rights string
}

func (ReleaseQueryOptions) GetLimit

func (this ReleaseQueryOptions) GetLimit() int64

func (ReleaseQueryOptions) GetOffset

func (this ReleaseQueryOptions) GetOffset() int64

func (ReleaseQueryOptions) GetSort

func (this ReleaseQueryOptions) GetSort() string

func (ReleaseQueryOptions) GetSortAsc

func (this ReleaseQueryOptions) GetSortAsc() bool

func (ReleaseQueryOptions) GetSortField

func (this ReleaseQueryOptions) GetSortField() string

type Selectable

type Selectable struct {
	Device             *Device                 `json:"device,omitempty"`
	Services           []Service               `json:"services,omitempty"`
	DeviceGroup        *DeviceGroup            `json:"device_group,omitempty"`
	Import             *Import                 `json:"import,omitempty"`
	ServicePathOptions map[string][]PathOption `json:"servicePathOptions,omitempty"`
}

type Service

type Service struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type SmartServiceDesign

type SmartServiceDesign struct {
	Id          string `json:"id" bson:"id"`
	UserId      string `json:"user_id" bson:"user_id"`
	Name        string `json:"name" bson:"name"`
	Description string `json:"description"`
	BpmnXml     string `json:"bpmn_xml" bson:"bpmn_xml"`
	SvgXml      string `json:"svg_xml" bson:"svg_xml"`
	UpdatedAt   int64  `json:"updated_at" bson:"updated_at"` //unix timestamp, set by service on creation
}

type SmartServiceExtendedParameter

type SmartServiceExtendedParameter struct {
	SmartServiceParameter
	Description      string          `json:"description"`
	DefaultValue     interface{}     `json:"default_value"`
	Type             Type            `json:"type"`
	Options          []Option        `json:"options"`  //if null -> "free text/number/etc"
	Multiple         bool            `json:"multiple"` //if true: Value = new([]Type); if false: Value = new(Type);
	Order            int             `json:"order"`
	CharacteristicId *string         `json:"characteristic_id,omitempty"`
	Characteristic   *Characteristic `json:"characteristic,omitempty"`
	Optional         bool            `json:"optional"`
	HasNoValidOption bool            `json:"has_no_valid_option"`
}

type SmartServiceInstance

type SmartServiceInstance struct {
	SmartServiceInstanceInit `bson:",inline"`
	Id                       string   `json:"id" bson:"id"`
	UserId                   string   `json:"user_id" bson:"user_id"`
	DesignId                 string   `json:"design_id" bson:"design_id"`
	ReleaseId                string   `json:"release_id" bson:"release_id"`
	NewReleaseId             string   `json:"new_release_id,omitempty"`
	RunningMaintenanceIds    []string `json:"running_maintenance_ids,omitempty"`
	Ready                    bool     `json:"ready" bson:"ready"`
	Deleting                 bool     `json:"deleting,omitempty" bson:"deleting"`
	Error                    string   `json:"error,omitempty" bson:"error"` //is set if module-worker notifies the repository about a error
	CreatedAt                int64    `json:"created_at" bson:"created_at"` //unix timestamp, set by service on creation
	UpdatedAt                int64    `json:"updated_at" bson:"updated_at"` //unix timestamp, set by service on creation
}

type SmartServiceInstanceInfo

type SmartServiceInstanceInfo struct {
	Name        string `json:"name" bson:"name"`
	Description string `json:"description" bson:"description"`
}

type SmartServiceInstanceInit

type SmartServiceInstanceInit struct {
	SmartServiceInstanceInfo `bson:",inline"`
	Parameters               []SmartServiceParameter `json:"parameters" bson:"parameters"`
}

type SmartServiceInstanceVariable

type SmartServiceInstanceVariable struct {
	InstanceId string      `json:"instance_id" bson:"instance_id"`
	UserId     string      `json:"user_id" bson:"user_id"`
	Name       string      `json:"name" bson:"name"`
	Value      interface{} `json:"value" bson:"value"`
}

type SmartServiceModule

type SmartServiceModule struct {
	SmartServiceModuleBase `bson:",inline"`
	SmartServiceModuleInit `bson:",inline"`
}

type SmartServiceModuleBase

type SmartServiceModuleBase struct {
	Id         string `json:"id"`
	UserId     string `json:"user_id" bson:"user_id"`
	InstanceId string `json:"instance_id" bson:"instance_id"`
	DesignId   string `json:"design_id" bson:"design_id"`
	ReleaseId  string `json:"release_id" bson:"release_id"`
}

type SmartServiceModuleInit

type SmartServiceModuleInit struct {
	DeleteInfo *ModuleDeleteInfo      `json:"delete_info" bson:"delete_info"`
	ModuleType string                 `json:"module_type" bson:"module_type"` //"process-deployment" | "analytics" ...
	ModuleData map[string]interface{} `json:"module_data" bson:"module_data"`
	Keys       []string               `json:"keys" bson:"keys"`
}

type SmartServiceModuleInitList

type SmartServiceModuleInitList = []SmartServiceModuleInit

type SmartServiceParameter

type SmartServiceParameter struct {
	Id         string      `json:"id"`
	Value      interface{} `json:"value"`
	Label      string      `json:"label"`
	ValueLabel string      `json:"value_label,omitempty"`
}

type SmartServiceParameters

type SmartServiceParameters []SmartServiceParameter

type SmartServiceRelease

type SmartServiceRelease struct {
	Id           string `json:"id" bson:"id"`
	DesignId     string `json:"design_id" bson:"design_id"`
	Name         string `json:"name" bson:"name"`
	Description  string `json:"description" bson:"description"`
	CreatedAt    int64  `json:"created_at" bson:"created_at"` //unix timestamp, set by service on creation
	Error        string `json:"error,omitempty" bson:"error"` //is set if errors occurred while releasing
	NewReleaseId string `json:"new_release_id,omitempty"`
}

cqrs

type SmartServiceReleaseExtended

type SmartServiceReleaseExtended struct {
	SmartServiceRelease `bson:",inline"`
	BpmnXml             string                  `json:"bpmn_xml" bson:"bpmn_xml"`
	SvgXml              string                  `json:"svg_xml" bson:"svg_xml"`
	ParsedInfo          SmartServiceReleaseInfo `json:"parsed_info" bson:"parsed_info"`
	PermissionsInfo     PermissionsInfo         `json:"permissions_info,omitempty"` //optional, set if query parameter permissions_info=true
}

type SmartServiceReleaseExtendedWithUsableFlag

type SmartServiceReleaseExtendedWithUsableFlag struct {
	SmartServiceReleaseExtended
	Usable bool `json:"usable"`
}

type SmartServiceReleaseInfo

type SmartServiceReleaseInfo struct {
	ParameterDescriptions []ParameterDescription `json:"parameter_descriptions" bson:"parameter_descriptions"`
	MaintenanceProcedures []MaintenanceProcedure `json:"maintenance_procedures" bson:"maintenance_procedures"`
}

type SmartServiceReleaseWithUsableFlag

type SmartServiceReleaseWithUsableFlag struct {
	SmartServiceRelease
	Usable bool `json:"usable"`
}

type Type

type Type string
const (
	String  Type = "https://schema.org/Text"
	Integer Type = "https://schema.org/Integer"
	Float   Type = "https://schema.org/Float"
	Boolean Type = "https://schema.org/Boolean"
)

type VariableQueryOptions

type VariableQueryOptions struct {
	Limit  int
	Offset int
	Sort   string
}

func (VariableQueryOptions) GetLimit

func (this VariableQueryOptions) GetLimit() int64

func (VariableQueryOptions) GetOffset

func (this VariableQueryOptions) GetOffset() int64

func (VariableQueryOptions) GetSort

func (this VariableQueryOptions) GetSort() string

Jump to

Keyboard shortcuts

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