recommendation

package
v0.0.0-...-27db7c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

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) Descriptor() ([]byte, []int)

func (*Request) GetLat

func (m *Request) GetLat() float64

func (*Request) GetLon

func (m *Request) GetLon() float64

func (*Request) GetRequire

func (m *Request) GetRequire() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

type Result

type Result struct {
	HotelIds []string `protobuf:"bytes,1,rep,name=HotelIds" json:"HotelIds,omitempty"`
}

func (*Result) Descriptor

func (*Result) Descriptor() ([]byte, []int)

func (*Result) GetHotelIds

func (m *Result) GetHotelIds() []string

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) Reset

func (m *Result) Reset()

func (*Result) String

func (m *Result) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL