Documentation ¶
Overview ¶
Package rate is a generated protocol buffer package.
It is generated from these files:
srv/rate/proto/rate.proto
It has these top-level messages:
Request Result RatePlan RoomType
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRateHandler ¶
func RegisterRateHandler(s server.Server, hdlr RateHandler, opts ...server.HandlerOption)
Types ¶
type Rate ¶
type Rate struct {
RateHandler
}
type RateClient ¶
type RateClient interface { // GetRates returns rate codes for hotels for a given date range GetRates(ctx context.Context, in *Request, opts ...client.CallOption) (*Result, error) }
func NewRateClient ¶
func NewRateClient(serviceName string, c client.Client) RateClient
type RateHandler ¶
type RatePlan ¶
type RatePlan struct { HotelId string `protobuf:"bytes,1,opt,name=hotelId" json:"hotelId,omitempty"` Code string `protobuf:"bytes,2,opt,name=code" json:"code,omitempty"` InDate string `protobuf:"bytes,3,opt,name=inDate" json:"inDate,omitempty"` OutDate string `protobuf:"bytes,4,opt,name=outDate" json:"outDate,omitempty"` RoomType *RoomType `protobuf:"bytes,5,opt,name=roomType" json:"roomType,omitempty"` }
func (*RatePlan) Descriptor ¶
func (*RatePlan) GetRoomType ¶
func (*RatePlan) ProtoMessage ¶
func (*RatePlan) ProtoMessage()
type Request ¶
type Request struct { HotelIds []string `protobuf:"bytes,1,rep,name=hotelIds" json:"hotelIds,omitempty"` InDate string `protobuf:"bytes,2,opt,name=inDate" json:"inDate,omitempty"` OutDate string `protobuf:"bytes,3,opt,name=outDate" json:"outDate,omitempty"` }
func (*Request) Descriptor ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
type Result ¶
type Result struct {
RatePlans []*RatePlan `protobuf:"bytes,1,rep,name=ratePlans" json:"ratePlans,omitempty"`
}
func (*Result) Descriptor ¶
func (*Result) GetRatePlans ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
type RoomType ¶
type RoomType struct { BookableRate float64 `protobuf:"fixed64,1,opt,name=bookableRate" json:"bookableRate,omitempty"` TotalRate float64 `protobuf:"fixed64,2,opt,name=totalRate" json:"totalRate,omitempty"` TotalRateInclusive float64 `protobuf:"fixed64,3,opt,name=totalRateInclusive" json:"totalRateInclusive,omitempty"` Code string `protobuf:"bytes,4,opt,name=code" json:"code,omitempty"` Currency string `protobuf:"bytes,5,opt,name=currency" json:"currency,omitempty"` RoomDescription string `protobuf:"bytes,6,opt,name=roomDescription" json:"roomDescription,omitempty"` }
func (*RoomType) Descriptor ¶
func (*RoomType) ProtoMessage ¶
func (*RoomType) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.