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.
 
 
 

26 lines
557 B

package service
import (
"context"
"fmt"
"go-common/app/tool/protoc-gen-bm/examples/helloworld/api"
)
// Service .
type Service struct{}
var _ v1.HelloServer = &Service{}
var _ v1.BMHelloServer = &Service{}
// SayHello .
func (s *Service) SayHello(ctx context.Context, req *v1.HelloRequest) (*v1.HelloReply, error) {
return &v1.HelloReply{
Message: fmt.Sprintf("hello %s", req.Name),
}, nil
}
// Echo .
func (s *Service) Echo(ctx context.Context, req *v1.EchoRequest) (*v1.EchoReply, error) {
return &v1.EchoReply{Content: req.Content}, nil
}