Create & Init Project...

This commit is contained in:
2019-04-22 18:49:16 +08:00
commit fc4fa37393
25440 changed files with 4054998 additions and 0 deletions

View File

@ -0,0 +1,26 @@
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
}