notify.go 547 B

12345678910111213141516171819202122232425
  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. NotifyTypeChannelTest = "channel_test"
  13. )
  14. func NewNotify(t string, title string, content string, values []interface{}) Notify {
  15. return Notify{
  16. Type: t,
  17. Title: title,
  18. Content: content,
  19. Values: values,
  20. }
  21. }