greetserver.go 747 B

12345678910111213141516171819202122232425262728
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: hello.proto
  3. package server
  4. import (
  5. "context"
  6. greetlogic "github.com/wuntsong-org/go-zero-plus/tools/goctlwt/example/rpc/hello/internal/logic/greet"
  7. "github.com/wuntsong-org/go-zero-plus/tools/goctlwt/example/rpc/hello/internal/svc"
  8. "github.com/wuntsong-org/go-zero-plus/tools/goctlwt/example/rpc/hello/pb/hello"
  9. )
  10. type GreetServer struct {
  11. svcCtx *svc.ServiceContext
  12. hello.UnimplementedGreetServer
  13. }
  14. func NewGreetServer(svcCtx *svc.ServiceContext) *GreetServer {
  15. return &GreetServer{
  16. svcCtx: svcCtx,
  17. }
  18. }
  19. func (s *GreetServer) SayHello(ctx context.Context, in *hello.HelloReq) (*hello.HelloResp, error) {
  20. l := greetlogic.NewSayHelloLogic(ctx, s.svcCtx)
  21. return l.SayHello(in)
  22. }