db_server.go 873 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: db.proto
  3. package server
  4. import (
  5. "context"
  6. "call_center/db/rpc/internal/logic"
  7. "call_center/db/rpc/internal/svc"
  8. "call_center/db/rpc/pb"
  9. )
  10. type DbServer struct {
  11. svcCtx *svc.ServiceContext
  12. }
  13. func NewDbServer(svcCtx *svc.ServiceContext) *DbServer {
  14. return &DbServer{
  15. svcCtx: svcCtx,
  16. }
  17. }
  18. // 客服聊天
  19. func (s *DbServer) DbLogin(stream pb.Db_DbLoginServer) error {
  20. l := logic.NewDbLoginLogic(stream.Context(), s.svcCtx)
  21. return l.DbLogin(stream)
  22. }
  23. func (s *DbServer) DbCall(ctx context.Context, in *pb.DbMsgReq) (*pb.DbMsgRes, error) {
  24. l := logic.NewDbCallLogic(ctx, s.svcCtx)
  25. return l.DbCall(in)
  26. }
  27. // 游戏聊天
  28. func (s *DbServer) GetSensitiveWords(ctx context.Context, in *pb.SensReq) (*pb.SensRes, error) {
  29. l := logic.NewGetSensitiveWordsLogic(ctx, s.svcCtx)
  30. return l.GetSensitiveWords(in)
  31. }