From c7154f07798fa11effd6950f303ef26f6beba05a Mon Sep 17 00:00:00 2001 From: Adrian Zuercher Date: Sun, 4 May 2025 20:55:12 +0200 Subject: [PATCH] rename model --- models/subscription.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 models/subscription.go diff --git a/models/subscription.go b/models/subscription.go new file mode 100644 index 0000000..dce8a67 --- /dev/null +++ b/models/subscription.go @@ -0,0 +1,16 @@ +package models + +import "github.com/google/uuid" + +// Subscription model +type Subscription struct { + Uuid uuid.UUID `json:"uuid,omitempty"` // universally unique identifier + Path string `json:"path,omitempty"` // dbm path + Depth uint `json:"depth,omitempty"` // depth of subscriptions from found path or uuid + Value any `json:"value,omitempty"` // current value + Drivers *Drivers `json:"drivers,omitempty"` // assigned drivers + Driver string `json:"driver,omitempty"` // driver type to assign this subscription + OnCreate bool `json:"onCreate,omitempty"` // notify at datapoint creation + OnDelete bool `json:"onDelete,omitempty"` // notify on deletion + OnChange bool `json:"onChange,omitempty"` // notify change +}