advance.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package client
  2. import (
  3. "context"
  4. "go-common/app/interface/main/dm2/model"
  5. )
  6. const (
  7. _buyAdvance = "RPC.BuyAdvance"
  8. _advanceState = "RPC.AdvanceState"
  9. _advances = "RPC.Advances"
  10. _passAdvance = "RPC.PassAdvance"
  11. _denyAdvance = "RPC.DenyAdvance"
  12. _cancelAdvance = "RPC.CancelAdvance"
  13. )
  14. // BuyAdvance 购买高级弹幕
  15. func (s *Service) BuyAdvance(c context.Context, arg *model.ArgAdvance) (err error) {
  16. err = s.client.Call(c, _buyAdvance, arg, &_noArg)
  17. return
  18. }
  19. // AdvanceState 高级弹幕状态
  20. func (s *Service) AdvanceState(c context.Context, arg *model.ArgAdvance) (res *model.AdvState, err error) {
  21. err = s.client.Call(c, _advanceState, arg, &res)
  22. return
  23. }
  24. // Advances 高级弹幕申请列表
  25. func (s *Service) Advances(c context.Context, arg *model.ArgMid) (res []*model.Advance, err error) {
  26. err = s.client.Call(c, _advances, arg, &res)
  27. return
  28. }
  29. // PassAdvance 通过高级弹幕申请
  30. func (s *Service) PassAdvance(c context.Context, arg *model.ArgUpAdvance) (err error) {
  31. err = s.client.Call(c, _passAdvance, arg, _noArg)
  32. return
  33. }
  34. // DenyAdvance 拒绝高级弹幕申请
  35. func (s *Service) DenyAdvance(c context.Context, arg *model.ArgUpAdvance) (err error) {
  36. err = s.client.Call(c, _denyAdvance, arg, _noArg)
  37. return
  38. }
  39. // CancelAdvance 取消高级弹幕申请
  40. func (s *Service) CancelAdvance(c context.Context, arg *model.ArgUpAdvance) (err error) {
  41. err = s.client.Call(c, _cancelAdvance, arg, _noArg)
  42. return
  43. }