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 }