Documentation ¶
Index ¶
- func RegisterReservationServer(s *grpc.Server, srv ReservationServer)
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetCustomerName() string
- func (m *Request) GetHotelId() []string
- func (m *Request) GetInDate() string
- func (m *Request) GetOutDate() string
- func (m *Request) GetRoomNumber() int32
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
- type ReservationClient
- type ReservationServer
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterReservationServer ¶
func RegisterReservationServer(s *grpc.Server, srv ReservationServer)
Types ¶
type Request ¶
type Request struct { CustomerName string `protobuf:"bytes,1,opt,name=customerName,proto3" json:"customerName,omitempty"` HotelId []string `protobuf:"bytes,2,rep,name=hotelId,proto3" json:"hotelId,omitempty"` InDate string `protobuf:"bytes,3,opt,name=inDate,proto3" json:"inDate,omitempty"` OutDate string `protobuf:"bytes,4,opt,name=outDate,proto3" json:"outDate,omitempty"` RoomNumber int32 `protobuf:"varint,5,opt,name=roomNumber,proto3" json:"roomNumber,omitempty"` }
func (*Request) Descriptor ¶
func (*Request) GetCustomerName ¶
func (*Request) GetHotelId ¶
func (*Request) GetOutDate ¶
func (*Request) GetRoomNumber ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
type ReservationClient ¶
type ReservationClient interface { // MakeReservation makes a reservation based on given information MakeReservation(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error) // CheckAvailability checks if given information is available CheckAvailability(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error) }
ReservationClient is the client API for Reservation service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewReservationClient ¶
func NewReservationClient(cc *grpc.ClientConn) ReservationClient
type ReservationServer ¶
type ReservationServer interface { // MakeReservation makes a reservation based on given information MakeReservation(context.Context, *Request) (*Result, error) // CheckAvailability checks if given information is available CheckAvailability(context.Context, *Request) (*Result, error) }
ReservationServer is the server API for Reservation service.
type Result ¶
type Result struct {
HotelId []string `protobuf:"bytes,1,rep,name=hotelId,proto3" json:"hotelId,omitempty"`
}
func (*Result) Descriptor ¶
func (*Result) GetHotelId ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.