model

package
v0.0.0-...-ae1d368 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection struct {
	ID          int64
	TeamID      int64
	Name        string
	Description string
}

Collection is a collection of trackers

type ConfidenceList

type ConfidenceList []string

OutputConfig is a generic mapping of config for an output

func (*ConfidenceList) Scan

func (list *ConfidenceList) Scan(src interface{}) error

Scan implements SQL scan driver

func (ConfidenceList) Value

func (list ConfidenceList) Value() (driver.Value, error)

Value implements SQL value driver

type GeoSubscription

type GeoSubscription struct {
	Subscription     Subscription
	ShapeCollection  ShapeCollection
	TrackerMovements []TrackerMovement
	Shapes           []Shape
}

GeoSubscription represents an aggregated struct containing both the subscription details, shape collection, subscription shapes and last tracker movements, all of which is needed to activate a full subscription between a Subscription and a trackable.

type MovementList

type MovementList []string

OutputConfig is a generic mapping of config for an output

func (*MovementList) Scan

func (list *MovementList) Scan(src interface{}) error

Scan implements SQL scan driver

func (MovementList) Value

func (list MovementList) Value() (driver.Value, error)

Value implements SQL value driver

type OutputConfig

type OutputConfig map[string]interface{}

OutputConfig is a generic mapping of config for an output

func (*OutputConfig) Scan

func (config *OutputConfig) Scan(src interface{}) error

Scan implements SQL scan driver

func (OutputConfig) Value

func (config OutputConfig) Value() (driver.Value, error)

Value implements SQL value driver

type Position

type Position struct {
	ID        int64
	TrackerID int64
	Timestamp int64
	Lat       float64
	Lon       float64
	Alt       float64
	Heading   float64
	Speed     float64
	Payload   []byte
	Precision float64
}

Position represents a datapoint from a tracker which may optionally carry a payload.

type Shape

type Shape struct {
	ID                int64
	ShapeCollectionID int64
	Name              string
	Properties        geometry.ShapeProperties
	Shape             geometry.Shape
}

Shape represents a shape, part of a ShapeCollection

type ShapeCollection

type ShapeCollection struct {
	ID          int64
	TeamID      int64
	Name        string
	Description string
}

ShapeCollection represents a collection of spatial shapes as a polygon or circle

type ShapeFeature

type ShapeFeature struct {
	ID                int64
	ShapeCollectionID int64
	Name              string
	Properties        geometry.ShapeProperties
	Shape             geometry.Shape
}

ShapeFeature represents a shape, part of a ShapeCollection, containing both raw and triangulized data

type Subscription

type Subscription struct {
	ID                int64
	TeamID            int64
	Name              string
	Description       string
	Active            bool
	Output            string
	OutputConfig      OutputConfig
	Types             MovementList
	Confidences       ConfidenceList
	ShapeCollectionID int64
	// TrackableType is which type of trackable we're talking about, typically a tracker
	// or a collection of trackers
	TrackableType string
	// TrackableID is the ID of trackable within its domain, either tracker og collection
	TrackableID int64
}

Subscription represents a subscription between a trackable entity and an output

type Team

type Team struct {
	ID          int64
	Name        string
	Description string
}

Team represents a team

type Token

type Token struct {
	Token     string
	Resource  string
	UserID    int64
	PermWrite bool
	Created   time.Time
}

Token represents API tokens

type Tracker

type Tracker struct {
	ID           int64
	CollectionID int64
	Name         string
	Description  string
}

Tracker represents a device that is being tracked

type TrackerMovement

type TrackerMovement struct {
	TrackerID      int64
	SubscriptionID int64
	ShapeID        int64
	PositionID     int64
	Movements      MovementList
}

TrackerMovement contains information where the position was last

type User

type User struct {
	ID            int64
	Name          string
	Email         string
	EmailVerified bool
	Phone         string
	PhoneVerified bool
	Deleted       bool
	Admin         bool
	Created       time.Time
	GithubID      string
	ConnectID     string
}

User represents a user

Jump to

Keyboard shortcuts

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