models

package
v1.2.2-dev.2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package models provides an internal representation of data structures that can be used when interacting with MongoDB.

Deprecated: Mongo functionality is deprecated as of the Geneva release and no new functionality should be added; Only bugs which address legacy issues

******************************************************************************

  • Copyright 2019 Dell Technologies Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. * ******************************************************************************

******************************************************************************

  • Copyright 2018 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2018 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2018 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addressable deprecated

type Addressable struct {
	Created    int64         `bson:"created"`
	Modified   int64         `bson:"modified"`
	Origin     int64         `bson:"origin"`
	Id         bson.ObjectId `bson:"_id,omitempty"`
	Uuid       string        `bson:"uuid,omitempty"`
	Name       string        `bson:"name"`
	Protocol   string        `bson:"protocol"`  // Protocol for the address (HTTP/TCP)
	HTTPMethod string        `bson:"method"`    // Method for connecting (i.e. POST)
	Address    string        `bson:"address"`   // Address of the addressable
	Port       int           `bson:"port"`      // Port for the address
	Path       string        `bson:"path"`      // Path for callbacks
	Publisher  string        `bson:"publisher"` // For message bus protocols
	User       string        `bson:"user"`      // User id for authentication
	Password   string        `bson:"password"`  // Password of the user for authentication for the addressable
	Topic      string        `bson:"topic"`     // Topic for message bus addressables
}

Addressable

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*Addressable) FromContract

func (a *Addressable) FromContract(from contract.Addressable) (id string, err error)

func (*Addressable) TimestampForAdd

func (a *Addressable) TimestampForAdd()

func (*Addressable) TimestampForUpdate

func (a *Addressable) TimestampForUpdate()

func (*Addressable) ToContract

func (a *Addressable) ToContract() (c contract.Addressable)

type Channel deprecated

type Channel struct {
	Type          contract.ChannelType `bson:"type,omitempty"`
	MailAddresses []string             `bson:"mailAddresses,omitempty"`
	Url           string               `bson:"url,omitempty"`
}

Channel

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*Channel) FromContract

func (channel *Channel) FromContract(from contract.Channel)

func (*Channel) ToContract

func (channel *Channel) ToContract() (c contract.Channel)

type Command deprecated

type Command struct {
	CommandProfile `bson:",inline"`
	Id             bson.ObjectId `bson:"_id,omitempty"`
	Uuid           string        `bson:"uuid,omitempty"`
	DeviceID       string        `bson:"deviceId"`
	DeviceName     string        `bson:"deviceName"`
	Created        int64         `bson:"created"`
	Modified       int64         `bson:"modified"`
	Origin         int64         `bson:"origin"`
}

Command

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*Command) FromContract

func (c *Command) FromContract(fromCommand contract.Command, fromDeviceId string, fromDeviceName string) (contractId string, err error)

func (*Command) TimestampForAdd

func (c *Command) TimestampForAdd()

func (*Command) TimestampForUpdate

func (c *Command) TimestampForUpdate()

func (*Command) ToContract

func (c *Command) ToContract() (cmd contract.Command)

type CommandProfile deprecated

type CommandProfile struct {
	Name string `bson:"name"`
	Get  Get    `bson:"get"`
	Put  Put    `bson:"put"`
}

CommandProfile

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*CommandProfile) FromContract

func (c *CommandProfile) FromContract(from contract.Command) (contractId string, err error)

func (*CommandProfile) ToContract

func (c *CommandProfile) ToContract() (cmd contract.Command)

type Device deprecated

type Device struct {
	Created        int64                   `bson:"created"`
	Modified       int64                   `bson:"modified"`
	Origin         int64                   `bson:"origin"`
	Description    string                  `bson:"description"`
	Id             bson.ObjectId           `bson:"_id,omitempty"`
	Uuid           string                  `bson:"uuid,omitempty"`
	Protocols      string                  `bson:"protocols,omitempty"`  //Contains a JSON representation of the supported protocols for the device
	AutoEvents     string                  `bson:"autoEvents,omitempty"` //Contains a JSON representation of the device's auto-generated events
	Name           string                  `bson:"name"`                 // Unique name for identifying a device
	AdminState     contract.AdminState     `bson:"adminState"`           // Admin state (locked/unlocked)
	OperatingState contract.OperatingState `bson:"operatingState"`       // Operating state (enabled/disabled)
	LastConnected  int64                   `bson:"lastConnected"`        // Time (milliseconds) that the device last provided any feedback or responded to any request
	LastReported   int64                   `bson:"lastReported"`         // Time (milliseconds) that the device reported data to the core microservice
	Labels         []string                `bson:"labels"`               // Other labels applied to the device to help with searching
	Location       interface{}             `bson:"location"`             // Device service specific location (interface{} is an empty interface so it can be anything)
	Service        mgo.DBRef               `bson:"service"`              // Associated Device Service - One per device
	Profile        mgo.DBRef               `bson:"profile"`              // Associated Device Profile - Describes the device
	ProfileName    string                  `bson:"profileName"`          // Associated Device Profile Name
}

Device

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*Device) FromContract

func (d *Device) FromContract(from contract.Device, dsTransform deviceServiceTransform, dpTransform deviceProfileTransform, aTransform addressableTransform) (string, error)

func (*Device) TimestampForAdd

func (d *Device) TimestampForAdd()

func (*Device) TimestampForUpdate

func (d *Device) TimestampForUpdate()

func (*Device) ToContract

func (d *Device) ToContract(dsTransform deviceServiceTransform, dpTransform deviceProfileTransform, aTransform addressableTransform) (contract.Device, error)

type DeviceProfile deprecated

type DeviceProfile struct {
	Created         int64             `bson:"created"`
	Modified        int64             `bson:"modified"`
	Origin          int64             `bson:"origin"`
	Description     string            `bson:"description"`
	Id              bson.ObjectId     `bson:"_id,omitempty"`
	Uuid            string            `bson:"uuid,omitempty"`
	Name            string            `bson:"name"`
	Manufacturer    string            `bson:"manufacturer"`
	Model           string            `bson:"model"`
	Labels          []string          `bson:"labels"`
	DeviceResources []DeviceResource  `bson:"deviceResources"`
	DeviceCommands  []ProfileResource `bson:"resources"`
	CoreCommands    []CommandProfile  `bson:"commands"`
}

Addressable

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*DeviceProfile) FromContract

func (dp *DeviceProfile) FromContract(from contract.DeviceProfile) (contractId string, err error)

func (*DeviceProfile) TimestampForAdd

func (dp *DeviceProfile) TimestampForAdd()

func (*DeviceProfile) TimestampForUpdate

func (dp *DeviceProfile) TimestampForUpdate()

func (*DeviceProfile) ToContract

func (dp *DeviceProfile) ToContract() (c contract.DeviceProfile, err error)

type DeviceReport deprecated

type DeviceReport struct {
	Created  int64         `bson:"created"`
	Modified int64         `bson:"modified"`
	Origin   int64         `bson:"origin"`
	Id       bson.ObjectId `bson:"_id,omitempty"`
	Uuid     string        `bson:"uuid,omitempty"`
	Name     string        `bson:"name"`     // non-database identifier for a device report - must be unique
	Device   string        `bson:"device"`   // associated device name - should be a valid and unique device name
	Action   string        `bson:"action"`   // associated interval action name - should be a valid and unique interval action name
	Expected []string      `bson:"expected"` // array of value descriptor names describing the types of data captured in the report
}

DeviceReport

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*DeviceReport) FromContract

func (dr *DeviceReport) FromContract(from contract.DeviceReport) (id string, err error)

func (*DeviceReport) TimestampForAdd

func (dr *DeviceReport) TimestampForAdd()

func (*DeviceReport) TimestampForUpdate

func (dr *DeviceReport) TimestampForUpdate()

func (*DeviceReport) ToContract

func (dr *DeviceReport) ToContract() (c contract.DeviceReport)

type DeviceResource deprecated

type DeviceResource struct {
	Description string            `bson:"description"`
	Name        string            `bson:"name"`
	Tag         string            `bson:"tag"`
	Properties  ProfileProperty   `bson:"properties"`
	Attributes  map[string]string `bson:"attributes"`
}

DeviceResource

Deprecated: Mongo functionality is deprecated as of the Geneva release.

type DeviceService deprecated

type DeviceService struct {
	Created        int64                   `bson:"created"`
	Modified       int64                   `bson:"modified"`
	Origin         int64                   `bson:"origin"`
	Description    string                  `bson:"description"`
	Id             bson.ObjectId           `bson:"_id,omitempty"`
	Uuid           string                  `bson:"uuid,omitempty"`
	Name           string                  `bson:"name"`           // time in milliseconds that the device last provided any feedback or responded to any request
	LastConnected  int64                   `bson:"lastConnected"`  // time in milliseconds that the device last reported data to the core
	LastReported   int64                   `bson:"lastReported"`   // operational state - either enabled or disabled
	OperatingState contract.OperatingState `bson:"operatingState"` // operational state - ether enabled or disableddc
	Labels         []string                `bson:"labels"`         // tags or other labels applied to the device service for search or other identification needs
	Addressable    mgo.DBRef               `bson:"addressable"`    // address (MQTT topic, HTTP address, serial bus, etc.) for reaching the service
	AdminState     contract.AdminState     `bson:"adminState"`     // Device Service Admin State
}

DeviceService

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*DeviceService) FromContract

func (ds *DeviceService) FromContract(from contract.DeviceService, transform addressableTransform) (id string, err error)

func (*DeviceService) TimestampForAdd

func (s *DeviceService) TimestampForAdd()

func (*DeviceService) TimestampForUpdate

func (s *DeviceService) TimestampForUpdate()

func (*DeviceService) ToContract

func (ds *DeviceService) ToContract(transform addressableTransform) (c contract.DeviceService, err error)

type Event deprecated

type Event struct {
	Created  int64         `bson:"created"`
	Modified int64         `bson:"modified"`
	Origin   int64         `bson:"origin"`
	Id       bson.ObjectId `bson:"_id,omitempty"`
	Uuid     string        `bson:"uuid,omitempty"`
	Pushed   int64         `bson:"pushed"`
	Device   string        `bson:"device"`             // Device identifier (name or id)
	Readings []mgo.DBRef   `bson:"readings,omitempty"` // List of readings
	Checksum string        `bson:"checksum,omitempty"` // checksum used to identify events
}

Event

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*Event) FromContract

func (e *Event) FromContract(from correlation.Event, transform readingTransform) (id string, err error)

func (*Event) TimestampForAdd

func (e *Event) TimestampForAdd()

func (*Event) TimestampForUpdate

func (e *Event) TimestampForUpdate()

func (*Event) ToContract

func (e *Event) ToContract(transform readingTransform) (c contract.Event, err error)

type Get deprecated

type Get struct {
	Path      string     `bson:"path"`      // path used by service for action on a device or sensor
	Responses []Response `bson:"responses"` // responses from get or put requests to service
	URL       string     // url for requests from command service
}

Get

Deprecated: Mongo functionality is deprecated as of the Geneva release.

type Interval deprecated

type Interval struct {
	Created   int64         `bson:"created"`
	Modified  int64         `bson:"modified"`
	Origin    int64         `bson:"origin"`
	Id        bson.ObjectId `bson:"_id,omitempty"`
	Uuid      string        `bson:"uuid,omitempty"`
	Name      string        `bson:"name"`
	Start     string        `bson:"start"`
	End       string        `bson:"end"`
	Frequency string        `bson:"frequency"`
	Cron      string        `bson:"cron,omitempty"`
	RunOnce   bool          `bson:"runonce"`
}

Interval

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*Interval) FromContract

func (in *Interval) FromContract(from contract.Interval) (id string, err error)

func (*Interval) TimestampForAdd

func (in *Interval) TimestampForAdd()

func (*Interval) TimestampForUpdate

func (in *Interval) TimestampForUpdate()

func (*Interval) ToContract

func (in *Interval) ToContract() (c contract.Interval)

type IntervalAction deprecated

type IntervalAction struct {
	Created    int64         `bson:"created"`
	Modified   int64         `bson:"modified"`
	Origin     int64         `bson:"origin"`
	Id         bson.ObjectId `bson:"_id,omitempty"`
	Uuid       string        `bson:"uuid,omitempty"`
	Name       string        `bson:"name"`
	Interval   string        `bson:"interval"`
	Parameters string        `bson:"parameters"`
	Target     string        `bson:"target"`
	Protocol   string        `bson:"protocol"`
	HTTPMethod string        `bson:"httpMethod"`
	Address    string        `bson:"address"`
	Port       int           `bson:"port"`
	Path       string        `bson:"path"`
	Publisher  string        `bson:"publisher"`
	User       string        `bson:"user"`
	Password   string        `bson:"password"`
	Topic      string        `bson:"topic"`
}

IntervalAction

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*IntervalAction) FromContract

func (ia *IntervalAction) FromContract(from contract.IntervalAction) (id string, err error)

func (*IntervalAction) TimestampForAdd

func (ia *IntervalAction) TimestampForAdd()

func (*IntervalAction) TimestampForUpdate

func (ia *IntervalAction) TimestampForUpdate()

func (*IntervalAction) ToContract

func (ia *IntervalAction) ToContract() (c contract.IntervalAction)

type Notification deprecated

type Notification struct {
	Created     int64                          `bson:"created"`
	Modified    int64                          `bson:"modified"`
	Origin      int64                          `bson:"origin"`
	Id          bson.ObjectId                  `bson:"_id,omitempty"`
	Uuid        string                         `bson:"uuid,omitempty"`
	Slug        string                         `bson:"slug"`
	Sender      string                         `bson:"sender"`
	Category    contract.NotificationsCategory `bson:"category"`
	Severity    contract.NotificationsSeverity `bson:"severity"`
	Content     string                         `bson:"content"`
	Description string                         `bson:"description"`
	Status      contract.NotificationsStatus   `bson:"status"`
	Labels      []string                       `bson:"labels,omitempty"`
	ContentType string                         `bson:"contenttype"`
}

Notification

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*Notification) FromContract

func (n *Notification) FromContract(from contract.Notification) (id string, err error)

func (*Notification) TimestampForAdd

func (n *Notification) TimestampForAdd()

func (*Notification) TimestampForUpdate

func (n *Notification) TimestampForUpdate()

func (*Notification) ToContract

func (n *Notification) ToContract() (c contract.Notification)

type ProfileProperty deprecated

type ProfileProperty struct {
	Value PropertyValue `bson:"value"`
	Units Units         `bson:"units"`
}

ProfileProperty

Deprecated: Mongo functionality is deprecated as of the Geneva release.

type ProfileResource deprecated

type ProfileResource struct {
	Name string              `bson:"name"`
	Get  []ResourceOperation `bson:"get"`
	Set  []ResourceOperation `bson:"set"`
}

ProfileResource

Deprecated: Mongo functionality is deprecated as of the Geneva release.

type PropertyValue deprecated

type PropertyValue struct {
	Type          string `bson:"type"`         // ValueDescriptor Type of property after transformations
	ReadWrite     string `bson:"readWrite"`    // Read/Write Permissions set for this property
	Minimum       string `bson:"minimum"`      // Minimum value that can be get/set from this property
	Maximum       string `bson:"maximum"`      // Maximum value that can be get/set from this property
	DefaultValue  string `bson:"defaultValue"` // Default value set to this property if no argument is passed
	Size          string `bson:"size"`         // Size of this property in its type  (i.e. bytes for numeric types, characters for string types)
	Mask          string `bson:"mask"`         // Mask to be applied prior to get/set of property
	Shift         string `bson:"shift"`        // Shift to be applied after masking, prior to get/set of property
	Scale         string `bson:"scale"`        // Multiplicative factor to be applied after shifting, prior to get/set of property
	Offset        string `bson:"offset"`       // Additive factor to be applied after multiplying, prior to get/set of property
	Base          string `bson:"base"`         // Base for property to be applied to, leave 0 for no power operation (i.e. base ^ property: 2 ^ 10)
	Assertion     string `bson:"assertion"`    // Required value of the property, set for checking error state.  Failing an assertion condition will mark the device with an error state
	Precision     string `bson:"precision"`
	FloatEncoding string `bson:"floatEncoding"` // FloatEncoding indicates the representation of floating value of reading.  It should be 'Base64' or 'eNotation'
	MediaType     string `bson:"mediaType"`
}

PropertyValue

Deprecated: Mongo functionality is deprecated as of the Geneva release.

type ProvisionWatcher deprecated

type ProvisionWatcher struct {
	Created             int64                   `bson:"created"`
	Modified            int64                   `bson:"modified"`
	Origin              int64                   `bson:"origin"`
	Id                  bson.ObjectId           `bson:"_id,omitempty"`
	Uuid                string                  `bson:"uuid,omitempty"`
	Name                string                  `bson:"name"`                // unique name and identifier of the addressable
	Identifiers         map[string]string       `bson:"identifiers"`         // set of key value pairs that identify type of of address (MAC, HTTP,...) and address to watch for (00-05-1B-A1-99-99, 10.0.0.1,...)
	BlockingIdentifiers map[string][]string     `bson:"blockingidentifiers"` // set of keys and blocking values that disallow matches made on Identifiers
	Profile             mgo.DBRef               `bson:"profile"`             // device profile that should be applied to the devices available at the identifier addresses
	Service             mgo.DBRef               `bson:"service"`             // device service that owns the watcher
	OperatingState      contract.OperatingState `bson:"operatingState"`      // operational state - either enabled or disabled
	AdminState          contract.AdminState     `bson:"adminState"`          // administrative state - either unlocked or locked
}

ProvisionWatcher

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*ProvisionWatcher) FromContract

func (pw *ProvisionWatcher) FromContract(
	from contract.ProvisionWatcher,
	dpt deviceProfileTransform,
	dst deviceServiceTransform,
	at addressableTransform) (id string, err error)

func (*ProvisionWatcher) TimestampForAdd

func (pw *ProvisionWatcher) TimestampForAdd()

func (*ProvisionWatcher) TimestampForUpdate

func (pw *ProvisionWatcher) TimestampForUpdate()

func (*ProvisionWatcher) ToContract

func (pw *ProvisionWatcher) ToContract(dpt deviceProfileTransform, dst deviceServiceTransform, at addressableTransform) (c contract.ProvisionWatcher, err error)

type Put deprecated

type Put struct {
	Path           string     `bson:"path"`      // path used by service for action on a device or sensor
	Responses      []Response `bson:"responses"` // responses from get or put requests to service
	URL            string     // url for requests from command service
	ParameterNames []string   `bson:"parameterNames"`
}

Put

Deprecated: Mongo functionality is deprecated as of the Geneva release.

type Reading deprecated

type Reading struct {
	Created       int64         `bson:"created"`
	Modified      int64         `bson:"modified"`
	Origin        int64         `bson:"origin"`
	Id            bson.ObjectId `bson:"_id,omitempty"`
	Uuid          string        `bson:"uuid"`
	Pushed        int64         `bson:"pushed"` // When the data was pushed out of EdgeX (0 - not pushed yet)
	Device        string        `bson:"device"`
	Name          string        `bson:"name"`
	Value         string        `bson:"value"` // Device sensor data value
	ValueType     string        `bson:"valueType"`
	MediaType     string        `bson:"mediaType"`
	FloatEncoding string        `bson:"floatEncoding"`
}

Reading

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*Reading) FromContract

func (r *Reading) FromContract(from contract.Reading) (id string, err error)

func (*Reading) TimestampForAdd

func (r *Reading) TimestampForAdd()

func (*Reading) TimestampForUpdate

func (r *Reading) TimestampForUpdate()

func (*Reading) ToContract

func (r *Reading) ToContract() (c contract.Reading)

type ResourceOperation deprecated

type ResourceOperation struct {
	Index          string            `bson:"index"`
	Operation      string            `bson:"operation"`
	Object         string            `bson:"object"`
	DeviceResource string            `bson:"deviceresource"`
	Parameter      string            `bson:"parameter"`
	Resource       string            `bson:"resource"`
	DeviceCommand  string            `bson:"devicecommand"`
	Secondary      []string          `bson:"secondary"`
	Mappings       map[string]string `bson:"mappings"`
}

ResourceOperation

Deprecated: Mongo functionality is deprecated as of the Geneva release.

type Response deprecated

type Response struct {
	Code           string   `bson:"code"`
	Description    string   `bson:"description"`
	ExpectedValues []string `bson:"expectedValues"`
}

Response

Deprecated: Mongo functionality is deprecated as of the Geneva release.

type Subscription deprecated

type Subscription struct {
	Created              int64                            `bson:"created"`
	Modified             int64                            `bson:"modified"`
	Origin               int64                            `bson:"origin"`
	Id                   bson.ObjectId                    `bson:"_id,omitempty"`
	Uuid                 string                           `bson:"uuid,omitempty"`
	Slug                 string                           `bson:"slug"`
	Receiver             string                           `bson:"receiver"`
	Description          string                           `bson:"description"`
	SubscribedCategories []contract.NotificationsCategory `bson:"subscribedCategories,omitempty"`
	SubscribedLabels     []string                         `bson:"subscribedLabels,omitempty"`
	Channels             []Channel                        `bson:"channels,omitempty"`
}

Subscription

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*Subscription) FromContract

func (s *Subscription) FromContract(from contract.Subscription) (id string, err error)

func (*Subscription) TimestampForAdd

func (s *Subscription) TimestampForAdd()

func (*Subscription) TimestampForUpdate

func (s *Subscription) TimestampForUpdate()

func (*Subscription) ToContract

func (s *Subscription) ToContract() (c contract.Subscription)

type Transmission deprecated

type Transmission struct {
	Created      int64                       `bson:"created"`
	Modified     int64                       `bson:"modified"`
	Origin       int64                       `bson:"origin"`
	Id           bson.ObjectId               `bson:"_id,omitempty"`
	Uuid         string                      `bson:"uuid,omitempty"`
	Notification Notification                `bson:"notification,omitempty"`
	Receiver     string                      `bson:"receiver"`
	Channel      Channel                     `bson:"channel,omitempty"`
	Status       contract.TransmissionStatus `bson:"status"`
	ResendCount  int                         `bson:"resendcount"`
	Records      []TransmissionRecord        `bson:"records,omitempty"`
}

Transmission

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*Transmission) FromContract

func (t *Transmission) FromContract(from contract.Transmission) (id string, err error)

func (*Transmission) TimestampForAdd

func (t *Transmission) TimestampForAdd()

func (*Transmission) TimestampForUpdate

func (t *Transmission) TimestampForUpdate()

func (*Transmission) ToContract

func (t *Transmission) ToContract() (c contract.Transmission)

type TransmissionRecord

type TransmissionRecord struct {
	Status   contract.TransmissionStatus `bson:"status"`
	Response string                      `bson:"response"`
	Sent     int64                       `bson:"sent"`
}

type Units deprecated

type Units struct {
	Type         string `bson:"type"`
	ReadWrite    string `bson:"readWrite"`
	DefaultValue string `bson:"defaultValue"`
}

Units

Deprecated: Mongo functionality is deprecated as of the Geneva release.

type ValueDescriptor deprecated

type ValueDescriptor struct {
	Id            bson.ObjectId `bson:"_id,omitempty"`
	Uuid          string        `bson:"uuid"`
	Created       int64         `bson:"created"`
	Description   string        `bson:"description,omitempty"`
	Modified      int64         `bson:"modified"`
	Origin        int64         `bson:"origin"`
	Name          string        `bson:"name"`
	Min           interface{}   `bson:"min,omitempty"`
	Max           interface{}   `bson:"max,omitempty"`
	DefaultValue  interface{}   `bson:"defaultValue,omitempty"`
	Type          string        `bson:"type,omitempty"`
	UomLabel      string        `bson:"uomLabel,omitempty"`
	Formatting    string        `bson:"formatting,omitempty"`
	Labels        []string      `bson:"labels,omitempty"`
	MediaType     string        `bson:"mediaType,omitempty"`
	FloatEncoding string        `bson:"floatEncoding,omitempty"`
}

ValueDescriptor

Deprecated: Mongo functionality is deprecated as of the Geneva release.

func (*ValueDescriptor) FromContract

func (v *ValueDescriptor) FromContract(from contract.ValueDescriptor) (id string, err error)

func (*ValueDescriptor) ToContract

func (v *ValueDescriptor) ToContract() contract.ValueDescriptor

Jump to

Keyboard shortcuts

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