message.go 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package message
  2. // videoup route
  3. const (
  4. // videoup
  5. RouteSyncCid = "sync_cid"
  6. RouteFirstRound = "first_round"
  7. RouteUGCFirstRound = "ugc_first_round"
  8. RouteSecondRound = "second_round"
  9. RouteAddArchive = "add_archive"
  10. RouteModifyArchive = "modify_archive"
  11. RouteDeleteVideo = "delete_video"
  12. RouteDeleteArchive = "delete_archive"
  13. RouteForceSync = "force_sync"
  14. )
  15. // Videoup msg
  16. type Videoup struct {
  17. Route string `json:"route"`
  18. Fans int64 `json:"fans,omitempty"`
  19. Filename string `json:"filename"`
  20. Timestamp int64 `json:"timestamp"`
  21. // cid
  22. Cid int64 `json:"cid,omitempty"`
  23. DMIndex string `json:"dm_index,omitempty"`
  24. // encode
  25. Xcode int8 `json:"xcode"`
  26. EncodePurpose string `json:"encode_purpose,omitempty"`
  27. EncodeRegionID int16 `json:"encode_region_id,omitempty"`
  28. EncodeTypeID int16 `json:"encode_type_id,omitempty"`
  29. VideoDesign *VideoDesign `json:"video_design,omitempty"`
  30. Status int16 `json:"status,omitempty"`
  31. // add or modify archive
  32. Aid int64 `json:"aid,omitempty"`
  33. EditArchive bool `json:"edit_archive,omitempty"`
  34. EditVideo bool `json:"edit_video,omitempty"`
  35. SendEmail bool `json:"send_email"`
  36. // ChangeTypeID
  37. ChangeTypeID bool `json:"change_typeid"`
  38. // ChangeCopyright
  39. ChangeCopyright bool `json:"change_copyright"`
  40. // ChangeCover
  41. ChangeCover bool `json:"change_cover"`
  42. // ChangeTitle
  43. ChangeTitle bool `json:"change_title"`
  44. // Notify
  45. Notify bool `json:"send_notify"`
  46. // MissionID
  47. MissionID int64 `json:"mission_id,omitempty"`
  48. // AdminChange
  49. AdminChange bool `json:"admin_change,omitempty"`
  50. FromList string `json:"from_list"`
  51. }
  52. //VideoDesign video design
  53. type VideoDesign struct {
  54. Mosaic []*Mosaic `json:"mosaic,omitempty"`
  55. WaterMark []*WaterMark `json:"watermark,omitempty"`
  56. }
  57. //Mosaic mosaic
  58. type Mosaic struct {
  59. X int64 `json:"x"`
  60. Y int64 `json:"y"`
  61. W int64 `json:"w"`
  62. H int64 `json:"h"`
  63. Start int64 `json:"start"`
  64. End int64 `json:"end"`
  65. }
  66. //WaterMark watermark
  67. type WaterMark struct {
  68. LOC int8 `json:"loc,omitempty"`
  69. URL string `json:"url,omitempty"`
  70. MD5 string `json:"md5,omitempty"`
  71. Start int64 `json:"start,omitempty"`
  72. End int64 `json:"end,omitempty"`
  73. X int64 `json:"x,omitempty"`
  74. Y int64 `json:"y,omitempty"`
  75. }