-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from 0x2142/notif-templates
Notif templates
- Loading branch information
Showing
15 changed files
with
166 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package models | ||
|
||
// MQTTEvent stores incoming MQTT payloads from Frigate | ||
type MQTTEvent struct { | ||
Before struct { | ||
Event | ||
} `json:"before,omitempty"` | ||
After struct { | ||
Event | ||
} `json:"after,omitempty"` | ||
Type string `json:"type"` | ||
} | ||
|
||
// Event stores Frigate alert attributes | ||
type Event struct { | ||
Area interface{} `json:"area"` | ||
Box interface{} `json:"box"` | ||
Camera string `json:"camera"` | ||
EndTime interface{} `json:"end_time"` | ||
FalsePositive interface{} `json:"false_positive"` | ||
HasClip bool `json:"has_clip"` | ||
HasSnapshot bool `json:"has_snapshot"` | ||
ID string `json:"id"` | ||
Label string `json:"label"` | ||
PlusID interface{} `json:"plus_id"` | ||
Ratio interface{} `json:"ratio"` | ||
Region interface{} `json:"region"` | ||
RetainIndefinitely bool `json:"retain_indefinitely"` | ||
StartTime float64 `json:"start_time"` | ||
SubLabel interface{} `json:"sub_label"` | ||
Thumbnail string `json:"thumbnail"` | ||
TopScore float64 `json:"top_score"` | ||
Zones []string `json:"zones"` | ||
CurrentZones []string `json:"current_zones"` | ||
EnteredZones []string `json:"entered_zones"` | ||
Extra ExtraFields | ||
} | ||
|
||
// Additional custom fields | ||
type ExtraFields struct { | ||
FormattedTime string | ||
TopScorePercent string | ||
LocalURL string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.