Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRecommendationServer ¶
func RegisterRecommendationServer(s *grpc.Server, srv RecommendationServer)
Types ¶
type RecommendationClient ¶
type RecommendationClient interface { // GetRecommendations returns recommended hotels for a given requirement GetRecommendations(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error) }
RecommendationClient is the client API for Recommendation service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRecommendationClient ¶
func NewRecommendationClient(cc *grpc.ClientConn) RecommendationClient
type RecommendationServer ¶
type RecommendationServer interface { // GetRecommendations returns recommended hotels for a given requirement GetRecommendations(context.Context, *Request) (*Result, error) }
RecommendationServer is the server API for Recommendation service.
type Request ¶
type Request struct { Require string `protobuf:"bytes,1,opt,name=require" json:"require,omitempty"` Lat float64 `protobuf:"fixed64,2,opt,name=lat" json:"lat,omitempty"` Lon float64 `protobuf:"fixed64,3,opt,name=lon" json:"lon,omitempty"` }
The requirement of the recommendation.
func (*Request) Descriptor ¶
func (*Request) GetRequire ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
type Result ¶
type Result struct {
HotelIds []string `protobuf:"bytes,1,rep,name=HotelIds" json:"HotelIds,omitempty"`
}
func (*Result) Descriptor ¶
func (*Result) GetHotelIds ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.