You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
601 B
27 lines
601 B
package service
|
|
|
|
import (
|
|
"context"
|
|
|
|
"bkb-order/api"
|
|
"bkb-order/internal/biz"
|
|
|
|
"google.golang.org/protobuf/types/known/emptypb"
|
|
)
|
|
|
|
// GreeterService is a greeter service.
|
|
type GreeterService struct {
|
|
api.UnimplementedGreeterServer
|
|
|
|
uc *biz.GreeterUsecase
|
|
}
|
|
|
|
// NewGreeterService new a greeter service.
|
|
func NewGreeterService(uc *biz.GreeterUsecase) *GreeterService {
|
|
return &GreeterService{uc: uc}
|
|
}
|
|
|
|
// SayHello implements helloworld.GreeterServer.
|
|
func (s *GreeterService) Ping(ctx context.Context, in *emptypb.Empty) (*api.PingReply, error) {
|
|
return &api.PingReply{Message: "Hello"}, nil
|
|
}
|
|
|