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.
34 lines
836 B
Go
34 lines
836 B
Go
2 years ago
|
// 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)
|
||
|
}
|