notify.go 505 B

123456789101112131415161718192021222324
  1. package dto
  2. type Notify struct {
  3. Type string `json:"type"`
  4. Title string `json:"title"`
  5. Content string `json:"content"`
  6. Values []interface{} `json:"values"`
  7. }
  8. const ContentValueParam = "{{value}}"
  9. const (
  10. NotifyTypeQuotaExceed = "quota_exceed"
  11. NotifyTypeChannelUpdate = "channel_update"
  12. )
  13. func NewNotify(t string, title string, content string, values []interface{}) Notify {
  14. return Notify{
  15. Type: t,
  16. Title: title,
  17. Content: content,
  18. Values: values,
  19. }
  20. }