stdlibserver.go 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: stdlib.proto
  3. package server
  4. import (
  5. "context"
  6. "app.yhyue.com/moapp/jy_docs/rpc/stdlib/internal/logic"
  7. "app.yhyue.com/moapp/jy_docs/rpc/stdlib/internal/svc"
  8. "app.yhyue.com/moapp/jy_docs/rpc/stdlib/type/stdlib"
  9. )
  10. type StdlibServer struct {
  11. svcCtx *svc.ServiceContext
  12. stdlib.UnimplementedStdlibServer
  13. }
  14. func NewStdlibServer(svcCtx *svc.ServiceContext) *StdlibServer {
  15. return &StdlibServer{
  16. svcCtx: svcCtx,
  17. }
  18. }
  19. func (s *StdlibServer) DocQuery(ctx context.Context, in *stdlib.DocQueryRequest) (*stdlib.DocQueryResponse, error) {
  20. l := logic.NewDocQueryLogic(ctx, s.svcCtx)
  21. return l.DocQuery(in)
  22. }
  23. func (s *StdlibServer) DocOn(ctx context.Context, in *stdlib.DocChangeReq) (*stdlib.DocChangeResp, error) {
  24. l := logic.NewDocOnLogic(ctx, s.svcCtx)
  25. return l.DocOn(in)
  26. }
  27. func (s *StdlibServer) DocOff(ctx context.Context, in *stdlib.DocChangeReq) (*stdlib.DocChangeResp, error) {
  28. l := logic.NewDocOffLogic(ctx, s.svcCtx)
  29. return l.DocOff(in)
  30. }
  31. func (s *StdlibServer) DocStatistics(ctx context.Context, in *stdlib.DocStatisticsReq) (*stdlib.DocChangeResp, error) {
  32. l := logic.NewDocStatisticsLogic(ctx, s.svcCtx)
  33. return l.DocStatistics(in)
  34. }
  35. func (s *StdlibServer) DocGetCheck(ctx context.Context, in *stdlib.DocGetCheckReq) (*stdlib.DocGetCheckResp, error) {
  36. l := logic.NewDocGetCheckLogic(ctx, s.svcCtx)
  37. return l.DocGetCheck(in)
  38. }
  39. func (s *StdlibServer) DocGetContent(ctx context.Context, in *stdlib.DocGetCheckReq) (*stdlib.DocGetContentResp, error) {
  40. l := logic.NewDocGetContentLogic(ctx, s.svcCtx)
  41. return l.DocGetContent(in)
  42. }
  43. func (s *StdlibServer) DocActivity(ctx context.Context, in *stdlib.DocActivityReq) (*stdlib.DocActivityResp, error) {
  44. l := logic.NewDocActivityLogic(ctx, s.svcCtx)
  45. return l.DocActivity(in)
  46. }
  47. func (s *StdlibServer) DocIndexTag(ctx context.Context, in *stdlib.DocIndexTagReq) (*stdlib.DocIndexTagRes, error) {
  48. l := logic.NewDocIndexTagLogic(ctx, s.svcCtx)
  49. return l.DocIndexTag(in)
  50. }