model

package
v0.0.0-...-c42e73f Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	Index string
	Doc   interface{}
}

func (*Document) String

func (d *Document) String() string

type KafkaData

type KafkaData struct {
	Key   string     `json:"key"`
	Value SensorData `json:"value"`
}

type Loc

type Loc struct {
	Lat float64 `json:"lat"`
	Lon float64 `json:"lon"`
}

type LogicData

type LogicData struct {
	SID       string             `json:"s_id"`
	SName     string             `json:"name"`
	Values    map[string]float64 `json:"values"`
	NodeInfo  Node               `json:"node"`
	Timestamp time.Time          `json:"timestamp"`
}

type Node

type Node struct {
	Name     string `json:"name"`
	Group    string `json:"group"`
	Location Loc    `json:"location"`
}

type Ring

type Ring struct {
	Id        primitive.ObjectID `bson:"_id" json:"id,omitempty"`
	Sensor    string             `json:"sensor_uuid"`
	LogicName string             `json:"logic_name"`
	Logic     []struct {
		Elem string                 `json:"elem"`
		Arg  map[string]interface{} `json:"arg"`
	} `json:"logic"`
}

type RingRequest

type RingRequest struct {
	Sensor    string `json:"sensor_uuid"`
	LogicName string `json:"logic_name"`
	Logic     []struct {
		Elem string                 `json:"elem"`
		Arg  map[string]interface{} `json:"arg"`
	} `json:"logic"`
}

type Sensor

type Sensor struct {
	Name       string   `json:"name"`
	ValueNames []string `json:"value_names"`
}

type SensorData

type SensorData struct {
	NID       string    `json:"nid"`
	Values    []float64 `json:"values"`
	Timestamp time.Time `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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