mirror of
https://github.com/kerberos-io/agent.git
synced 2026-10-27 18:58:23 +00:00
Attempt to fix saving changes detected into filename models/MotionData.go is meant to be a model containing all of the data in regards to currently recorded video Since I currently mostly need pixel changed saved in the filename properly, I've created 2 structs: Partial= Timestamp + Changes working Full= Everything - Not yet used but prepared for fully implementing the rest of data into the filename Currently filename only saves proper timestamp and the rest is hardcoded, this is one step forwards to have it fully save a dynamic filename.
17 lines
635 B
Go
17 lines
635 B
Go
package models
|
|
|
|
type MotionDataPartial struct {
|
|
Timestamp int64 `json:"timestamp" bson:"timestamp"`
|
|
NumberOfChanges int `json:"numberOfChanges" bson:"numberOfChanges"`
|
|
}
|
|
|
|
type MotionDataFull struct {
|
|
Timestamp int64 `json:"timestamp" bson:"timestamp"`
|
|
Size float64 `json:"size" bson:"size"`
|
|
Microseconds float64 `json:"microseconds" bson:"microseconds"`
|
|
DeviceName string `json:"deviceName" bson:"deviceName"`
|
|
Region string `json:"region" bson:"region"`
|
|
NumberOfChanges int `json:"numberOfChanges" bson:"numberOfChanges"`
|
|
Token int `json:"token" bson:"token"`
|
|
}
|