setsmatch_handler.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package handler
  2. import (
  3. "bet24.com/servers/micros/matches/handler/setsmatch"
  4. pb "bet24.com/servers/micros/matches/proto"
  5. "context"
  6. )
  7. func (h *MatchesService) QuitSetsMatch(ctx context.Context, req *pb.SetsMatch_req, rsp *pb.Response) error {
  8. rsp.BoolValue = setsmatch.QuitMatch(req.UserId, req.MatchNo)
  9. return nil
  10. }
  11. func (h *MatchesService) GetSetsMatchInfo(ctx context.Context, req *pb.SetsMatch_req, rsp *pb.Response) error {
  12. rsp.Data = setsmatch.GetMatchInfo(req.MatchNo)
  13. return nil
  14. }
  15. func (h *MatchesService) GetUserSetsMatches(ctx context.Context, req *pb.Request, rsp *pb.Response) error {
  16. rsp.Data = setsmatch.GetUserMatches(req.UserId)
  17. return nil
  18. }
  19. func (h *MatchesService) GetSetsMatchConfigs(ctx context.Context, req *pb.Request, rsp *pb.Response) error {
  20. rsp.Data = setsmatch.GetMatchConfigs()
  21. return nil
  22. }
  23. func (h *MatchesService) GetEnrolledSetsMatch(ctx context.Context, req *pb.Request, rsp *pb.Response) error {
  24. rsp.Data = setsmatch.GetEnrolledMatch(req.UserId)
  25. return nil
  26. }
  27. func (h *MatchesService) GetSetsMatchHistory(ctx context.Context, req *pb.Request, rsp *pb.Response) error {
  28. rsp.Data = setsmatch.GetMatchHistory(req.UserId)
  29. return nil
  30. }