You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-zero/tools/goctl/example/rpc/hi/internal/server/greet/greetserver.go

34 lines
836 B
Go

// Code generated by goctl. DO NOT EDIT!
// Source: hi.proto
package server
import (
"context"
"github.com/zeromicro/go-zero/tools/goctl/example/rpc/hi/internal/logic/greet"
"github.com/zeromicro/go-zero/tools/goctl/example/rpc/hi/internal/svc"
"github.com/zeromicro/go-zero/tools/goctl/example/rpc/hi/pb/hi"
)
type GreetServer struct {
svcCtx *svc.ServiceContext
hi.UnimplementedGreetServer
}
func NewGreetServer(svcCtx *svc.ServiceContext) *GreetServer {
return &GreetServer{
svcCtx: svcCtx,
}
}
func (s *GreetServer) SayHi(ctx context.Context, in *hi.HiReq) (*hi.HiResp, error) {
l := greetlogic.NewSayHiLogic(ctx, s.svcCtx)
return l.SayHi(in)
}
func (s *GreetServer) SayHello(ctx context.Context, in *hi.HelloReq) (*hi.HelloResp, error) {
l := greetlogic.NewSayHelloLogic(ctx, s.svcCtx)
return l.SayHello(in)
}