Files
tecamino-json_data/models/subscription.go
2025-07-25 17:47:38 +02:00

19 lines
928 B
Go

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
Rights Rights `json:"rights,omitempty"` // read /write rights
HasChild bool `json:"hasChild,omitempty"` // inidicates path has children
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
}