eventserver.go 732 B

12345678910111213141516171819202122232425262728
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: hi.proto
  3. package server
  4. import (
  5. "context"
  6. eventlogic "github.com/wuntsong-org/go-zero-plus/tools/goctlwt/example/rpc/hi/internal/logic/event"
  7. "github.com/wuntsong-org/go-zero-plus/tools/goctlwt/example/rpc/hi/internal/svc"
  8. "github.com/wuntsong-org/go-zero-plus/tools/goctlwt/example/rpc/hi/pb/hi"
  9. )
  10. type EventServer struct {
  11. svcCtx *svc.ServiceContext
  12. hi.UnimplementedEventServer
  13. }
  14. func NewEventServer(svcCtx *svc.ServiceContext) *EventServer {
  15. return &EventServer{
  16. svcCtx: svcCtx,
  17. }
  18. }
  19. func (s *EventServer) AskQuestion(ctx context.Context, in *hi.EventReq) (*hi.EventResp, error) {
  20. l := eventlogic.NewAskQuestionLogic(ctx, s.svcCtx)
  21. return l.AskQuestion(in)
  22. }