deploymentmodel

package
v0.0.11 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: 11 Imported by: 18

Documentation

Index

Constants

View Source
const CurrentVersion int64 = 3

Variables

This section is empty.

Functions

func ParseIsoDuration

func ParseIsoDuration(str string) (result time.Duration, err error)

func ParseIsoDurationInt64

func ParseIsoDurationInt64(value string) int64

Types

type ConditionalEvent

type ConditionalEvent struct {
	Script        string            `json:"script"`
	ValueVariable string            `json:"value_variable"`
	Variables     map[string]string `json:"variables"`
	Qos           int               `json:"qos"`
	EventId       string            `json:"event_id"`
	Selection     Selection         `json:"selection"`
}

type Deployment

type Deployment struct {
	Version          int64                   `json:"version"`
	Id               string                  `json:"id"`
	Name             string                  `json:"name"`
	Description      string                  `json:"description"`
	Diagram          Diagram                 `json:"diagram"`
	Elements         []Element               `json:"elements"`
	Executable       bool                    `json:"executable"`
	IncidentHandling *IncidentHandling       `json:"incident_handling,omitempty"`
	StartParameter   []ProcessStartParameter `json:"start_parameter,omitempty"`
}

func (Deployment) Validate

func (this Deployment) Validate(kind ValidationKind, optionals map[string]bool) (err error)

type Device

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

type DeviceGroup

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

type Diagram

type Diagram struct {
	XmlRaw      string `json:"xml_raw"`
	XmlDeployed string `json:"xml_deployed"`
	Svg         string `json:"svg"`
}

type Element

type Element struct {
	BpmnId           string            `json:"bpmn_id"`
	Group            *string           `json:"group"`
	Name             string            `json:"name"`
	Order            int64             `json:"order"`
	TimeEvent        *TimeEvent        `json:"time_event"`
	Notification     *Notification     `json:"notification"`
	MessageEvent     *MessageEvent     `json:"message_event"`
	ConditionalEvent *ConditionalEvent `json:"conditional_event"`
	Task             *Task             `json:"task"`
}

func (Element) Validate

func (this Element) Validate(kind ValidationKind, optionals map[string]bool) error

type FilterCriteria

type FilterCriteria struct {
	CharacteristicId *string `json:"characteristic_id"` //TODO: remove?
	FunctionId       *string `json:"function_id"`
	DeviceClassId    *string `json:"device_class_id"`
	AspectId         *string `json:"aspect_id"`
}

func (FilterCriteria) ToDeviceTypeFilter

func (this FilterCriteria) ToDeviceTypeFilter() (result deviceselectionmodel.FilterCriteria)

type GenericEventSource

type GenericEventSource struct {
	FilterType string `json:"filter_type"`
	FilterIds  string `json:"filter_ids"`
	Topic      string `json:"topic"`
}

type IncidentHandling

type IncidentHandling struct {
	Restart bool `json:"restart"`
	Notify  bool `json:"notify"`
}

type MessageEvent

type MessageEvent struct {
	Value         string    `json:"value"`
	FlowId        string    `json:"flow_id"`
	EventId       string    `json:"event_id"`
	UseMarshaller bool      `json:"use_marshaller"`
	Selection     Selection `json:"selection"`
}

type Notification

type Notification struct {
	Title   string `json:"title"`
	Message string `json:"message"`
}

type ProcessStartParameter

type ProcessStartParameter struct {
	Id         string            `json:"id"`
	Label      string            `json:"label"`
	Type       string            `json:"type"`
	Default    string            `json:"default"`
	Properties map[string]string `json:"properties"`
}

type Selection

type Selection struct {
	FilterCriteria             FilterCriteria                   `json:"filter_criteria"`
	SelectionOptions           []SelectionOption                `json:"selection_options"`
	SelectedDeviceId           *string                          `json:"selected_device_id"`
	SelectedServiceId          *string                          `json:"selected_service_id"`
	SelectedDeviceGroupId      *string                          `json:"selected_device_group_id"`
	SelectedImportId           *string                          `json:"selected_import_id"`
	SelectedGenericEventSource *GenericEventSource              `json:"selected_generic_event_source"`
	SelectedPath               *deviceselectionmodel.PathOption `json:"selected_path"`
}

type SelectionOption

type SelectionOption struct {
	Device      *Device                                      `json:"device"`
	Services    []Service                                    `json:"services"`
	DeviceGroup *DeviceGroup                                 `json:"device_group"`
	Import      *importmodel.Import                          `json:"import"`
	ImportType  *importmodel.ImportType                      `json:"importType"`
	PathOptions map[string][]deviceselectionmodel.PathOption `json:"path_options,omitempty"`
}

type Service

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

type Task

type Task struct {
	Retries     int64             `json:"retries"`
	Parameter   map[string]string `json:"parameter"`
	Selection   Selection         `json:"selection"`
	PreferEvent bool              `json:"prefer_event,omitempty"`
}

type TimeEvent

type TimeEvent struct {
	Type string `json:"type"`
	Time string `json:"time"`
}

type ValidationKind

type ValidationKind = bool
const (
	ValidatePublish ValidationKind = true
	ValidateRequest ValidationKind = false
)

Jump to

Keyboard shortcuts

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