greetserver.go 879 B

123456789101112131415161718192021222324252627282930313233
  1. // Code generated by goctlwt. DO NOT EDIT!
  2. // Source: hi.proto
  3. package server
  4. import (
  5. "context"
  6. greetlogic "github.com/wuntsong-org/go-zero-plus/tools/goctlwt/example/rpc/hi/internal/logic/greet"
  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 GreetServer struct {
  11. svcCtx *svc.ServiceContext
  12. hi.UnimplementedGreetServer
  13. }
  14. func NewGreetServer(svcCtx *svc.ServiceContext) *GreetServer {
  15. return &GreetServer{
  16. svcCtx: svcCtx,
  17. }
  18. }
  19. func (s *GreetServer) SayHi(ctx context.Context, in *hi.HiReq) (*hi.HiResp, error) {
  20. l := greetlogic.NewSayHiLogic(ctx, s.svcCtx)
  21. return l.SayHi(in)
  22. }
  23. func (s *GreetServer) SayHello(ctx context.Context, in *hi.HelloReq) (*hi.HelloResp, error) {
  24. l := greetlogic.NewSayHelloLogic(ctx, s.svcCtx)
  25. return l.SayHello(in)
  26. }