Files
tecamino-json_data/subscribe.go
Adrian Zürcher 85bd8de2a2 add files
2025-04-25 18:56:27 +02:00

39 lines
709 B
Go

package models
type Subscribe struct {
Path string `json:"path"`
Depth *int `json:"depth,omitempty"`
Driver *string `json:"driver,omitempty"`
OnCreate *bool `json:"onCreate,omitempty"`
OnDelete *bool `json:"onDelete,omitempty"`
OnChange *bool `json:"onChange,omitempty"`
}
func (s *Subscribe) GetDepth() int {
if s.Depth == nil {
return 0
}
return *s.Depth
}
func (s *Subscribe) GetOnCreate() bool {
if s.OnCreate == nil {
return false
}
return *s.OnCreate
}
func (s *Subscribe) GetOnChange() bool {
if s.OnChange == nil {
return false
}
return *s.OnChange
}
func (s *Subscribe) GetOnDelete() bool {
if s.OnDelete == nil {
return false
}
return *s.OnDelete
}