model.go 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package model
  2. import "go-common/library/time"
  3. // StreamBase
  4. type StreamBase struct {
  5. StreamName string `json:"stream_name,omitempty"`
  6. DefaultUpStream int64 `json:"default_upstream,omitempty"`
  7. Origin int64 `json:"origin,omitempty"`
  8. Forward []int64 `json:"forward,omitempty"`
  9. Type int `json:"type,omitempty"`
  10. Key string `json:"-"`
  11. Options int64 `json:"options,omitempty"`
  12. Wmask bool `json:"wmask,omitempty"`
  13. Mmask bool `json:"mmask,omitempty"`
  14. }
  15. // StreamFullInfo,
  16. type StreamFullInfo struct {
  17. RoomID int64 `json:"room_id,omitempty"`
  18. Hot int64 `json:"hot"`
  19. StreamName string `json:"stream_name,omitempty"`
  20. Origin int64 `json:"origin,omitempty"`
  21. Forward []int64 `json:"forward,omitempty"`
  22. List []*StreamBase `json:"list,omitempty"`
  23. }
  24. // StreamChangeLog 修改cdnlog
  25. type StreamChangeLog struct {
  26. RoomID int64 `json:"room_id,omitempty"`
  27. FromOrigin int64 `json:"from_origin,omitempty"`
  28. ToOrigin int64 `json:"to_origin,omitempty"`
  29. Source string `json:"source,omitempty"`
  30. OperateName string `json:"operate_name,omitempty"`
  31. Reason string `json:"reason,omitempty"`
  32. CTime time.Time `json:"ctime,omitempty"`
  33. }
  34. // StreamStatus 流状态
  35. type StreamStatus struct {
  36. RoomID int64 `json:"room_id,omitempty"`
  37. StreamName string `json:"stream_name,omitempty"`
  38. DefaultUpStream int64 `json:"default_upstream,omitempty"`
  39. DefaultChange bool `json:"default_change,omitempty"`
  40. Origin int64 `json:"origin,omitempty"`
  41. OriginChange bool `json:"origin_change,omitempty"`
  42. Forward int64 `json:"forward,omitempty"`
  43. ForwardChange bool `json:"forward_change,omitempty"`
  44. Key string `json:"key,omitempty"`
  45. Add bool `json:"add,omitempty"`
  46. Options int64 `json:"options,omitempty"`
  47. OptionsChange bool `json:"options_change,omitempty"`
  48. }