rate

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package rate is a generated protocol buffer package.

It is generated from these files:

github.com/micro/examples/booking/srv/rate/proto/rate.proto

It has these top-level messages:

Request
Result
RatePlan
RoomType

Package rate is a generated protocol buffer package.

It is generated from these files:

github.com/micro/examples/booking/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)

func RegisterRateServer

func RegisterRateServer(s *grpc.Server, srv RateServer)

Types

type RateClient

type RateClient interface {
	// GetRates returns rate codes for hotels for a given date range
	GetRates(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error)
}

func NewRateClient

func NewRateClient(cc *grpc.ClientConn) RateClient

type RateHandler

type RateHandler interface {
	// GetRates returns rate codes for hotels for a given date range
	GetRates(context.Context, *Request, *Result) error
}

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

func (*RatePlan) GetCode

func (m *RatePlan) GetCode() string

func (*RatePlan) GetHotelId

func (m *RatePlan) GetHotelId() string

func (*RatePlan) GetInDate

func (m *RatePlan) GetInDate() string

func (*RatePlan) GetOutDate

func (m *RatePlan) GetOutDate() string

func (*RatePlan) GetRoomType

func (m *RatePlan) GetRoomType() *RoomType

func (*RatePlan) ProtoMessage

func (*RatePlan) ProtoMessage()

func (*RatePlan) Reset

func (m *RatePlan) Reset()

func (*RatePlan) String

func (m *RatePlan) String() string

type RateServer

type RateServer interface {
	// GetRates returns rate codes for hotels for a given date range
	GetRates(context.Context, *Request) (*Result, error)
}

type RateService

type RateService interface {
	// GetRates returns rate codes for hotels for a given date range
	GetRates(ctx context.Context, in *Request, opts ...client.CallOption) (*Result, error)
}

func NewRateService

func NewRateService(serviceName string, c client.Client) RateService

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

func (*Request) GetHotelIds

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

func (*Request) GetInDate

func (m *Request) GetInDate() string

func (*Request) GetOutDate

func (m *Request) GetOutDate() 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 {
	RatePlans []*RatePlan `protobuf:"bytes,1,rep,name=ratePlans" json:"ratePlans,omitempty"`
}

func (*Result) Descriptor

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

func (*Result) GetRatePlans

func (m *Result) GetRatePlans() []*RatePlan

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) Reset

func (m *Result) Reset()

func (*Result) String

func (m *Result) String() string

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

func (*RoomType) GetBookableRate

func (m *RoomType) GetBookableRate() float64

func (*RoomType) GetCode

func (m *RoomType) GetCode() string

func (*RoomType) GetCurrency

func (m *RoomType) GetCurrency() string

func (*RoomType) GetRoomDescription

func (m *RoomType) GetRoomDescription() string

func (*RoomType) GetTotalRate

func (m *RoomType) GetTotalRate() float64

func (*RoomType) GetTotalRateInclusive

func (m *RoomType) GetTotalRateInclusive() float64

func (*RoomType) ProtoMessage

func (*RoomType) ProtoMessage()

func (*RoomType) Reset

func (m *RoomType) Reset()

func (*RoomType) String

func (m *RoomType) String() string

Jump to

Keyboard shortcuts

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