message.go 835 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package databus
  2. import "encoding/json"
  3. // Message databus
  4. type Message struct {
  5. Action string `json:"action"`
  6. Table string `json:"table"`
  7. New json.RawMessage `json:"new"`
  8. Old json.RawMessage `json:"old"`
  9. }
  10. // const is
  11. const (
  12. RouteFirstRoundForbid = "first_round_forbid"
  13. RouteSecondRound = "second_round"
  14. RouteAutoOpen = "auto_open"
  15. RouteDelayOpen = "delay_open"
  16. RouteDeleteArchive = "delete_archive"
  17. RouteForceSync = "force_sync"
  18. )
  19. // Videoup message for videoup2BVC
  20. type Videoup struct {
  21. Route string `json:"route"`
  22. Timestamp int64 `json:"timestamp"`
  23. Aid int64 `json:"aid"`
  24. }
  25. // Rebuild is
  26. type Rebuild struct {
  27. Aid int64 `json:"aid"`
  28. }
  29. // AccountNotify is
  30. type AccountNotify struct {
  31. Mid int64 `json:"mid"`
  32. Action string `json:"action"`
  33. }