mirror of
https://github.com/kerberos-io/agent.git
synced 2026-11-29 00:00:55 +00:00
add comments to model
This commit is contained in:
@@ -16,25 +16,44 @@ type Config struct {
|
||||
MQTTURI string `json:"mqtturi,omitempty" bson:"mqtturi,omitempty"`
|
||||
}
|
||||
|
||||
//Capture defines which camera type (Id) you are using (IP, USB or Raspberry Pi camera),
|
||||
//and also contains recording specific parameters.
|
||||
type Capture struct {
|
||||
Id string `json:"id"`
|
||||
IPCamera IPCamera `json:"ipcamera"`
|
||||
USBCamera USBCamera `json:"usbcamera"`
|
||||
RaspiCamera RaspiCamera `json:"raspicamera"`
|
||||
Continuous string `json:"continuous,omitempty"`
|
||||
PostRecording int64 `json:"postrecording"`
|
||||
PreRecording int `json:"prerecording"`
|
||||
MaxLengthRecording int64 `json:"maxlengthrecording"`
|
||||
}
|
||||
|
||||
//IPCamera configuration, such as the RTSP url of the IPCamera and the FPS.
|
||||
type IPCamera struct {
|
||||
RTSP string `json:"rtsp"`
|
||||
FPS string `json:"fps"`
|
||||
}
|
||||
|
||||
//USBCamera configuration, such as the device path (/dev/video*)
|
||||
type USBCamera struct {
|
||||
Device string `json:"device"`
|
||||
}
|
||||
|
||||
//RaspiCamera configuration, such as the device path (/dev/video*)
|
||||
type RaspiCamera struct {
|
||||
Device string `json:"device"`
|
||||
}
|
||||
|
||||
//Region specifies the type (Id) of Region Of Interest (ROI), you
|
||||
//would like to use.
|
||||
type Region struct {
|
||||
Id string `json:"id"`
|
||||
Rectangle Rectangle `json:"rectangle"`
|
||||
Polygon []Polygon `json:"polygon"`
|
||||
}
|
||||
|
||||
//Rectangle is defined by a starting point, left top (x1,y1) and end point (x2,y2).
|
||||
type Rectangle struct {
|
||||
X1 int `json:"x1"`
|
||||
Y1 int `json:"y1"`
|
||||
@@ -42,16 +61,21 @@ type Rectangle struct {
|
||||
Y2 int `json:"y2"`
|
||||
}
|
||||
|
||||
//Polygon is a sequence of coordinates (x,y).
|
||||
type Polygon struct {
|
||||
Id string `json:"id"`
|
||||
Coordinates []Coordinate `json:"coordinates"`
|
||||
}
|
||||
|
||||
//Coordinate belongs to a Polygon.
|
||||
type Coordinate struct {
|
||||
X float64 `json:"x"`
|
||||
Y float64 `json:"y"`
|
||||
}
|
||||
|
||||
//Timetable allows you to set a Time Of Intterest (TOI), which limits recording or
|
||||
//detection to a predefined time interval. Two tracks can be set, which allows you
|
||||
//to give some flexibility.
|
||||
type Timetable struct {
|
||||
Start1 int `json:"start1"`
|
||||
End1 int `json:"end1"`
|
||||
@@ -59,6 +83,8 @@ type Timetable struct {
|
||||
End2 int `json:"end2"`
|
||||
}
|
||||
|
||||
//KStorage contains the credentials of the Kerberos Storage/Kerberos Cloud instance.
|
||||
//By defining KStorage you can make your recordings available in the cloud, at a centrel place.
|
||||
type KStorage struct {
|
||||
URI string `json:"uri,omitempty" bson:"uri,omitempty"`
|
||||
CloudKey string `json:"cloud_key,omitempty" bson:"cloud_key,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user