reservation

package
v0.0.0-...-82bdfc5 Latest Latest
Warning

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

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

Documentation

Index

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

func (*Request) GetCustomerName

func (m *Request) GetCustomerName() string

func (*Request) GetHotelId

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

func (*Request) GetInDate

func (m *Request) GetInDate() string

func (*Request) GetOutDate

func (m *Request) GetOutDate() string

func (*Request) GetRoomNumber

func (m *Request) GetRoomNumber() int32

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

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

func (*Result) GetHotelId

func (m *Result) GetHotelId() []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