diff --git a/go.mod b/go.mod
index 73364bf3cf3a87d00099af5b673eefa6ebab05f2..0152de5829a6e039abf47b4ba7aa23a1302892f4 100644
--- a/go.mod
+++ b/go.mod
@@ -4,7 +4,7 @@ go 1.23.4
require (
gorm.io/gorm v1.25.12
- jonasled.dev/firehouse-smokedetection/plugin-interface v0.0.5
+ jonasled.dev/firehouse-smokedetection/plugin-interface v0.0.6
)
require (
diff --git a/go.sum b/go.sum
index f0de3d818a5214b4429f2e3c1d2ea1c5b019adb6..53f661fab604a4a87616576230c2e36fcef7268d 100644
--- a/go.sum
+++ b/go.sum
@@ -6,5 +6,5 @@ golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8=
gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ=
-jonasled.dev/firehouse-smokedetection/plugin-interface v0.0.5 h1:DsxFy25O4HIP2PfxMq8d/RodejFOZviiV4h8DSqYIHM=
-jonasled.dev/firehouse-smokedetection/plugin-interface v0.0.5/go.mod h1:7OmpERugGg+B1OKE5R2glhdbbF2XmYP0OTfbdNNBm40=
+jonasled.dev/firehouse-smokedetection/plugin-interface v0.0.6 h1:ywcIP76K6G14hJdW1Q06lJvGzxZtpkG9zISqrnsMUxg=
+jonasled.dev/firehouse-smokedetection/plugin-interface v0.0.6/go.mod h1:7OmpERugGg+B1OKE5R2glhdbbF2XmYP0OTfbdNNBm40=
diff --git a/main.go b/main.go
index 2e9761c54553b378462618f33beeb8ff0fad699c..e263e008ce5364e63be472d901433e068ab2512d 100644
--- a/main.go
+++ b/main.go
@@ -79,6 +79,9 @@ func (g *GotifyPlugin) templateString(smokeSensor plugininterface.AlarmSmokeSens
func (g *GotifyPlugin) GetMetadata() plugininterface.PluginMetadata {
return g.metadata
}
+func (g *GotifyPlugin) GetConfigType() GotifyPluginConfig {
+ return GotifyPluginConfig{}
+}
var Plugin = GotifyPlugin{
metadata: plugininterface.PluginMetadata{
diff --git a/pluginConfig.go b/pluginConfig.go
index 107a7256dbdb251d011e1f03d21a03137dc89f2d..7298783e4bf68999fdbe16a3e4db12e1d51dc6e3 100644
--- a/pluginConfig.go
+++ b/pluginConfig.go
@@ -6,15 +6,15 @@ import (
)
type GotifyPluginConfig struct {
- ID uint `gorm:"primaryKey"`
+ ID uint `gorm:"primaryKey" json:"-"`
CreatedAt time.Time
UpdatedAt time.Time
- Name string
- GotifyUrl string
- GotifyToken string
- MessageTemplate string
- TitleTemplate string
- Priority int
+ Name string `json:"Name"`
+ GotifyUrl string `json:"gotifyUrl"`
+ GotifyToken string `json:"gotifyToken"`
+ MessageTemplate string `json:"messageTemplate"`
+ TitleTemplate string `json:"titleTemplate"`
+ Priority int `json:"messagePriority"`
}
func (g GotifyPluginConfig) GetGotifyUrl() (string, error) {