Documentation ¶
Overview ¶
Package bikerentalv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterBikeRentalServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterBikeRentalServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BikeRentalServiceClient) error
- func RegisterBikeRentalServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterBikeRentalServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BikeRentalServiceServer) error
- func RegisterBikeRentalServiceServer(s *grpc.Server, srv BikeRentalServiceServer)
- type Bike
- type BikeData
- func (*BikeData) Descriptor() ([]byte, []int)deprecated
- func (x *BikeData) GetModelName() string
- func (x *BikeData) GetPricePerHour() int32
- func (x *BikeData) GetWeight() float32
- func (*BikeData) ProtoMessage()
- func (x *BikeData) ProtoReflect() protoreflect.Message
- func (x *BikeData) Reset()
- func (x *BikeData) String() string
- type BikeRentalServiceClient
- type BikeRentalServiceServer
- type CancelReservationRequest
- func (*CancelReservationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CancelReservationRequest) GetBikeId() string
- func (x *CancelReservationRequest) GetId() string
- func (*CancelReservationRequest) ProtoMessage()
- func (x *CancelReservationRequest) ProtoReflect() protoreflect.Message
- func (x *CancelReservationRequest) Reset()
- func (x *CancelReservationRequest) String() string
- type CreateBikeRequest
- type CreateReservationRequest
- func (*CreateReservationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateReservationRequest) GetBikeId() string
- func (x *CreateReservationRequest) GetCustomer() *Customer
- func (x *CreateReservationRequest) GetEndTime() *timestamp.Timestamp
- func (x *CreateReservationRequest) GetLocation() *Location
- func (x *CreateReservationRequest) GetStartTime() *timestamp.Timestamp
- func (*CreateReservationRequest) ProtoMessage()
- func (x *CreateReservationRequest) ProtoReflect() protoreflect.Message
- func (x *CreateReservationRequest) Reset()
- func (x *CreateReservationRequest) String() string
- type CreateReservationResponse
- func (*CreateReservationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateReservationResponse) GetReason() string
- func (x *CreateReservationResponse) GetReservation() *Reservation
- func (x *CreateReservationResponse) GetStatus() ReservationStatus
- func (*CreateReservationResponse) ProtoMessage()
- func (x *CreateReservationResponse) ProtoReflect() protoreflect.Message
- func (x *CreateReservationResponse) Reset()
- func (x *CreateReservationResponse) String() string
- type Customer
- type CustomerData
- func (*CustomerData) Descriptor() ([]byte, []int)deprecated
- func (x *CustomerData) GetEmail() string
- func (x *CustomerData) GetFirstName() string
- func (x *CustomerData) GetSurname() string
- func (x *CustomerData) GetType() CustomerType
- func (*CustomerData) ProtoMessage()
- func (x *CustomerData) ProtoReflect() protoreflect.Message
- func (x *CustomerData) Reset()
- func (x *CustomerData) String() string
- type CustomerType
- func (CustomerType) Descriptor() protoreflect.EnumDescriptor
- func (x CustomerType) Enum() *CustomerType
- func (CustomerType) EnumDescriptor() ([]byte, []int)deprecated
- func (x CustomerType) Number() protoreflect.EnumNumber
- func (x CustomerType) String() string
- func (CustomerType) Type() protoreflect.EnumType
- type DeleteBikeRequest
- type GetBikeAvailabilityRequest
- func (*GetBikeAvailabilityRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetBikeAvailabilityRequest) GetBikeId() string
- func (x *GetBikeAvailabilityRequest) GetEndTime() *timestamp.Timestamp
- func (x *GetBikeAvailabilityRequest) GetStartTime() *timestamp.Timestamp
- func (*GetBikeAvailabilityRequest) ProtoMessage()
- func (x *GetBikeAvailabilityRequest) ProtoReflect() protoreflect.Message
- func (x *GetBikeAvailabilityRequest) Reset()
- func (x *GetBikeAvailabilityRequest) String() string
- type GetBikeAvailabilityResponse
- func (*GetBikeAvailabilityResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetBikeAvailabilityResponse) GetAvailable() bool
- func (*GetBikeAvailabilityResponse) ProtoMessage()
- func (x *GetBikeAvailabilityResponse) ProtoReflect() protoreflect.Message
- func (x *GetBikeAvailabilityResponse) Reset()
- func (x *GetBikeAvailabilityResponse) String() string
- type GetBikeRequest
- type ListBikesResponse
- type ListReservationsRequest
- func (*ListReservationsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListReservationsRequest) GetBikeId() string
- func (x *ListReservationsRequest) GetEndTime() *timestamp.Timestamp
- func (x *ListReservationsRequest) GetStartTime() *timestamp.Timestamp
- func (*ListReservationsRequest) ProtoMessage()
- func (x *ListReservationsRequest) ProtoReflect() protoreflect.Message
- func (x *ListReservationsRequest) Reset()
- func (x *ListReservationsRequest) String() string
- type ListReservationsResponse
- func (*ListReservationsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListReservationsResponse) GetReservations() []*Reservation
- func (*ListReservationsResponse) ProtoMessage()
- func (x *ListReservationsResponse) ProtoReflect() protoreflect.Message
- func (x *ListReservationsResponse) Reset()
- func (x *ListReservationsResponse) String() string
- type Location
- type Reservation
- func (*Reservation) Descriptor() ([]byte, []int)deprecated
- func (x *Reservation) GetAppliedDiscount() int32
- func (x *Reservation) GetBike() *Bike
- func (x *Reservation) GetCustomer() *Customer
- func (x *Reservation) GetEndTime() *timestamp.Timestamp
- func (x *Reservation) GetId() string
- func (x *Reservation) GetStartTime() *timestamp.Timestamp
- func (x *Reservation) GetStatus() ReservationStatus
- func (x *Reservation) GetTotalValue() int32
- func (*Reservation) ProtoMessage()
- func (x *Reservation) ProtoReflect() protoreflect.Message
- func (x *Reservation) Reset()
- func (x *Reservation) String() string
- type ReservationStatus
- func (ReservationStatus) Descriptor() protoreflect.EnumDescriptor
- func (x ReservationStatus) Enum() *ReservationStatus
- func (ReservationStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x ReservationStatus) Number() protoreflect.EnumNumber
- func (x ReservationStatus) String() string
- func (ReservationStatus) Type() protoreflect.EnumType
- type UnimplementedBikeRentalServiceServer
- func (*UnimplementedBikeRentalServiceServer) CancelReservation(context.Context, *CancelReservationRequest) (*empty.Empty, error)
- func (*UnimplementedBikeRentalServiceServer) CreateBike(context.Context, *CreateBikeRequest) (*Bike, error)
- func (*UnimplementedBikeRentalServiceServer) CreateReservation(context.Context, *CreateReservationRequest) (*CreateReservationResponse, error)
- func (*UnimplementedBikeRentalServiceServer) DeleteBike(context.Context, *DeleteBikeRequest) (*empty.Empty, error)
- func (*UnimplementedBikeRentalServiceServer) GetBike(context.Context, *GetBikeRequest) (*Bike, error)
- func (*UnimplementedBikeRentalServiceServer) GetBikeAvailability(context.Context, *GetBikeAvailabilityRequest) (*GetBikeAvailabilityResponse, error)
- func (*UnimplementedBikeRentalServiceServer) ListBikes(context.Context, *empty.Empty) (*ListBikesResponse, error)
- func (*UnimplementedBikeRentalServiceServer) ListReservations(context.Context, *ListReservationsRequest) (*ListReservationsResponse, error)
- func (*UnimplementedBikeRentalServiceServer) UpdateBike(context.Context, *UpdateBikeRequest) (*empty.Empty, error)
- type UpdateBikeRequest
- func (*UpdateBikeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateBikeRequest) GetData() *BikeData
- func (x *UpdateBikeRequest) GetId() string
- func (*UpdateBikeRequest) ProtoMessage()
- func (x *UpdateBikeRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateBikeRequest) Reset()
- func (x *UpdateBikeRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var ( CustomerType_name = map[int32]string{ 0: "CUSTOMER_TYPE_UNKNOWN", 1: "CUSTOMER_TYPE_INDIVIDUAL", 2: "CUSTOMER_TYPE_BUSINESS", } CustomerType_value = map[string]int32{ "CUSTOMER_TYPE_UNKNOWN": 0, "CUSTOMER_TYPE_INDIVIDUAL": 1, "CUSTOMER_TYPE_BUSINESS": 2, } )
Enum value maps for CustomerType.
var ( ReservationStatus_name = map[int32]string{ 0: "RESERVATION_STATUS_UNKNOWN", 1: "RESERVATION_STATUS_REJECTED", 2: "RESERVATION_STATUS_APPROVED", 3: "RESERVATION_STATUS_CANCELLED", } ReservationStatus_value = map[string]int32{ "RESERVATION_STATUS_UNKNOWN": 0, "RESERVATION_STATUS_REJECTED": 1, "RESERVATION_STATUS_APPROVED": 2, "RESERVATION_STATUS_CANCELLED": 3, } )
Enum value maps for ReservationStatus.
var File_nglogic_bikerental_v1_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBikeRentalServiceHandler ¶
func RegisterBikeRentalServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterBikeRentalServiceHandler registers the http handlers for service BikeRentalService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterBikeRentalServiceHandlerClient ¶
func RegisterBikeRentalServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BikeRentalServiceClient) error
RegisterBikeRentalServiceHandlerClient registers the http handlers for service BikeRentalService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BikeRentalServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BikeRentalServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BikeRentalServiceClient" to call the correct interceptors.
func RegisterBikeRentalServiceHandlerFromEndpoint ¶
func RegisterBikeRentalServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterBikeRentalServiceHandlerFromEndpoint is same as RegisterBikeRentalServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBikeRentalServiceHandlerServer ¶
func RegisterBikeRentalServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BikeRentalServiceServer) error
RegisterBikeRentalServiceHandlerServer registers the http handlers for service BikeRentalService to "mux". UnaryRPC :call BikeRentalServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBikeRentalServiceHandlerFromEndpoint instead.
func RegisterBikeRentalServiceServer ¶
func RegisterBikeRentalServiceServer(s *grpc.Server, srv BikeRentalServiceServer)
Types ¶
type Bike ¶
type Bike struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Data *BikeData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*Bike) Descriptor
deprecated
func (*Bike) ProtoMessage ¶
func (*Bike) ProtoMessage()
func (*Bike) ProtoReflect ¶
func (x *Bike) ProtoReflect() protoreflect.Message
type BikeData ¶
type BikeData struct { ModelName string `protobuf:"bytes,1,opt,name=modelName,proto3" json:"modelName,omitempty"` Weight float32 `protobuf:"fixed32,2,opt,name=weight,proto3" json:"weight,omitempty"` PricePerHour int32 `protobuf:"varint,3,opt,name=pricePerHour,proto3" json:"pricePerHour,omitempty"` // contains filtered or unexported fields }
func (*BikeData) Descriptor
deprecated
func (*BikeData) GetModelName ¶
func (*BikeData) GetPricePerHour ¶
func (*BikeData) ProtoMessage ¶
func (*BikeData) ProtoMessage()
func (*BikeData) ProtoReflect ¶
func (x *BikeData) ProtoReflect() protoreflect.Message
type BikeRentalServiceClient ¶
type BikeRentalServiceClient interface { // List all bikes. ListBikes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ListBikesResponse, error) // Return bike by id. GetBike(ctx context.Context, in *GetBikeRequest, opts ...grpc.CallOption) (*Bike, error) // Create new bike. // // Returns created object with new id. CreateBike(ctx context.Context, in *CreateBikeRequest, opts ...grpc.CallOption) (*Bike, error) // Delete a bike by id. DeleteBike(ctx context.Context, in *DeleteBikeRequest, opts ...grpc.CallOption) (*empty.Empty, error) // Update a bike. UpdateBike(ctx context.Context, in *UpdateBikeRequest, opts ...grpc.CallOption) (*empty.Empty, error) // Check if bike is available. GetBikeAvailability(ctx context.Context, in *GetBikeAvailabilityRequest, opts ...grpc.CallOption) (*GetBikeAvailabilityResponse, error) // List reservations. // // Returns list of reservations for a bike. ListReservations(ctx context.Context, in *ListReservationsRequest, opts ...grpc.CallOption) (*ListReservationsResponse, error) // Create reservation. // // Returns created object with new id. CreateReservation(ctx context.Context, in *CreateReservationRequest, opts ...grpc.CallOption) (*CreateReservationResponse, error) // Cancel reservation. CancelReservation(ctx context.Context, in *CancelReservationRequest, opts ...grpc.CallOption) (*empty.Empty, error) }
BikeRentalServiceClient is the client API for BikeRentalService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewBikeRentalServiceClient ¶
func NewBikeRentalServiceClient(cc grpc.ClientConnInterface) BikeRentalServiceClient
type BikeRentalServiceServer ¶
type BikeRentalServiceServer interface { // List all bikes. ListBikes(context.Context, *empty.Empty) (*ListBikesResponse, error) // Return bike by id. GetBike(context.Context, *GetBikeRequest) (*Bike, error) // Create new bike. // // Returns created object with new id. CreateBike(context.Context, *CreateBikeRequest) (*Bike, error) // Delete a bike by id. DeleteBike(context.Context, *DeleteBikeRequest) (*empty.Empty, error) // Update a bike. UpdateBike(context.Context, *UpdateBikeRequest) (*empty.Empty, error) // Check if bike is available. GetBikeAvailability(context.Context, *GetBikeAvailabilityRequest) (*GetBikeAvailabilityResponse, error) // List reservations. // // Returns list of reservations for a bike. ListReservations(context.Context, *ListReservationsRequest) (*ListReservationsResponse, error) // Create reservation. // // Returns created object with new id. CreateReservation(context.Context, *CreateReservationRequest) (*CreateReservationResponse, error) // Cancel reservation. CancelReservation(context.Context, *CancelReservationRequest) (*empty.Empty, error) }
BikeRentalServiceServer is the server API for BikeRentalService service.
type CancelReservationRequest ¶
type CancelReservationRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` BikeId string `protobuf:"bytes,2,opt,name=bike_id,json=bikeId,proto3" json:"bike_id,omitempty"` // contains filtered or unexported fields }
func (*CancelReservationRequest) Descriptor
deprecated
func (*CancelReservationRequest) Descriptor() ([]byte, []int)
Deprecated: Use CancelReservationRequest.ProtoReflect.Descriptor instead.
func (*CancelReservationRequest) GetBikeId ¶
func (x *CancelReservationRequest) GetBikeId() string
func (*CancelReservationRequest) GetId ¶
func (x *CancelReservationRequest) GetId() string
func (*CancelReservationRequest) ProtoMessage ¶
func (*CancelReservationRequest) ProtoMessage()
func (*CancelReservationRequest) ProtoReflect ¶
func (x *CancelReservationRequest) ProtoReflect() protoreflect.Message
func (*CancelReservationRequest) Reset ¶
func (x *CancelReservationRequest) Reset()
func (*CancelReservationRequest) String ¶
func (x *CancelReservationRequest) String() string
type CreateBikeRequest ¶
type CreateBikeRequest struct { Data *BikeData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*CreateBikeRequest) Descriptor
deprecated
func (*CreateBikeRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateBikeRequest.ProtoReflect.Descriptor instead.
func (*CreateBikeRequest) GetData ¶
func (x *CreateBikeRequest) GetData() *BikeData
func (*CreateBikeRequest) ProtoMessage ¶
func (*CreateBikeRequest) ProtoMessage()
func (*CreateBikeRequest) ProtoReflect ¶
func (x *CreateBikeRequest) ProtoReflect() protoreflect.Message
func (*CreateBikeRequest) Reset ¶
func (x *CreateBikeRequest) Reset()
func (*CreateBikeRequest) String ¶
func (x *CreateBikeRequest) String() string
type CreateReservationRequest ¶
type CreateReservationRequest struct { BikeId string `protobuf:"bytes,1,opt,name=bike_id,json=bikeId,proto3" json:"bike_id,omitempty"` Customer *Customer `protobuf:"bytes,2,opt,name=customer,proto3" json:"customer,omitempty"` Location *Location `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` StartTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` EndTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // contains filtered or unexported fields }
func (*CreateReservationRequest) Descriptor
deprecated
func (*CreateReservationRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateReservationRequest.ProtoReflect.Descriptor instead.
func (*CreateReservationRequest) GetBikeId ¶
func (x *CreateReservationRequest) GetBikeId() string
func (*CreateReservationRequest) GetCustomer ¶
func (x *CreateReservationRequest) GetCustomer() *Customer
func (*CreateReservationRequest) GetEndTime ¶
func (x *CreateReservationRequest) GetEndTime() *timestamp.Timestamp
func (*CreateReservationRequest) GetLocation ¶
func (x *CreateReservationRequest) GetLocation() *Location
func (*CreateReservationRequest) GetStartTime ¶
func (x *CreateReservationRequest) GetStartTime() *timestamp.Timestamp
func (*CreateReservationRequest) ProtoMessage ¶
func (*CreateReservationRequest) ProtoMessage()
func (*CreateReservationRequest) ProtoReflect ¶
func (x *CreateReservationRequest) ProtoReflect() protoreflect.Message
func (*CreateReservationRequest) Reset ¶
func (x *CreateReservationRequest) Reset()
func (*CreateReservationRequest) String ¶
func (x *CreateReservationRequest) String() string
type CreateReservationResponse ¶
type CreateReservationResponse struct { Reservation *Reservation `protobuf:"bytes,1,opt,name=reservation,proto3" json:"reservation,omitempty"` Status ReservationStatus `protobuf:"varint,2,opt,name=status,proto3,enum=nglogic.bikerental.v1.ReservationStatus" json:"status,omitempty"` Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` // contains filtered or unexported fields }
func (*CreateReservationResponse) Descriptor
deprecated
func (*CreateReservationResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateReservationResponse.ProtoReflect.Descriptor instead.
func (*CreateReservationResponse) GetReason ¶
func (x *CreateReservationResponse) GetReason() string
func (*CreateReservationResponse) GetReservation ¶
func (x *CreateReservationResponse) GetReservation() *Reservation
func (*CreateReservationResponse) GetStatus ¶
func (x *CreateReservationResponse) GetStatus() ReservationStatus
func (*CreateReservationResponse) ProtoMessage ¶
func (*CreateReservationResponse) ProtoMessage()
func (*CreateReservationResponse) ProtoReflect ¶
func (x *CreateReservationResponse) ProtoReflect() protoreflect.Message
func (*CreateReservationResponse) Reset ¶
func (x *CreateReservationResponse) Reset()
func (*CreateReservationResponse) String ¶
func (x *CreateReservationResponse) String() string
type Customer ¶
type Customer struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Data *CustomerData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*Customer) Descriptor
deprecated
func (*Customer) GetData ¶
func (x *Customer) GetData() *CustomerData
func (*Customer) ProtoMessage ¶
func (*Customer) ProtoMessage()
func (*Customer) ProtoReflect ¶
func (x *Customer) ProtoReflect() protoreflect.Message
type CustomerData ¶
type CustomerData struct { Type CustomerType `protobuf:"varint,2,opt,name=type,proto3,enum=nglogic.bikerental.v1.CustomerType" json:"type,omitempty"` FirstName string `protobuf:"bytes,3,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` Surname string `protobuf:"bytes,4,opt,name=surname,proto3" json:"surname,omitempty"` Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*CustomerData) Descriptor
deprecated
func (*CustomerData) Descriptor() ([]byte, []int)
Deprecated: Use CustomerData.ProtoReflect.Descriptor instead.
func (*CustomerData) GetEmail ¶
func (x *CustomerData) GetEmail() string
func (*CustomerData) GetFirstName ¶
func (x *CustomerData) GetFirstName() string
func (*CustomerData) GetSurname ¶
func (x *CustomerData) GetSurname() string
func (*CustomerData) GetType ¶
func (x *CustomerData) GetType() CustomerType
func (*CustomerData) ProtoMessage ¶
func (*CustomerData) ProtoMessage()
func (*CustomerData) ProtoReflect ¶
func (x *CustomerData) ProtoReflect() protoreflect.Message
func (*CustomerData) Reset ¶
func (x *CustomerData) Reset()
func (*CustomerData) String ¶
func (x *CustomerData) String() string
type CustomerType ¶
type CustomerType int32
const ( CustomerType_CUSTOMER_TYPE_UNKNOWN CustomerType = 0 CustomerType_CUSTOMER_TYPE_INDIVIDUAL CustomerType = 1 CustomerType_CUSTOMER_TYPE_BUSINESS CustomerType = 2 )
func (CustomerType) Descriptor ¶
func (CustomerType) Descriptor() protoreflect.EnumDescriptor
func (CustomerType) Enum ¶
func (x CustomerType) Enum() *CustomerType
func (CustomerType) EnumDescriptor
deprecated
func (CustomerType) EnumDescriptor() ([]byte, []int)
Deprecated: Use CustomerType.Descriptor instead.
func (CustomerType) Number ¶
func (x CustomerType) Number() protoreflect.EnumNumber
func (CustomerType) String ¶
func (x CustomerType) String() string
func (CustomerType) Type ¶
func (CustomerType) Type() protoreflect.EnumType
type DeleteBikeRequest ¶
type DeleteBikeRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteBikeRequest) Descriptor
deprecated
func (*DeleteBikeRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteBikeRequest.ProtoReflect.Descriptor instead.
func (*DeleteBikeRequest) GetId ¶
func (x *DeleteBikeRequest) GetId() string
func (*DeleteBikeRequest) ProtoMessage ¶
func (*DeleteBikeRequest) ProtoMessage()
func (*DeleteBikeRequest) ProtoReflect ¶
func (x *DeleteBikeRequest) ProtoReflect() protoreflect.Message
func (*DeleteBikeRequest) Reset ¶
func (x *DeleteBikeRequest) Reset()
func (*DeleteBikeRequest) String ¶
func (x *DeleteBikeRequest) String() string
type GetBikeAvailabilityRequest ¶
type GetBikeAvailabilityRequest struct { BikeId string `protobuf:"bytes,1,opt,name=bike_id,json=bikeId,proto3" json:"bike_id,omitempty"` StartTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` EndTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // contains filtered or unexported fields }
func (*GetBikeAvailabilityRequest) Descriptor
deprecated
func (*GetBikeAvailabilityRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetBikeAvailabilityRequest.ProtoReflect.Descriptor instead.
func (*GetBikeAvailabilityRequest) GetBikeId ¶
func (x *GetBikeAvailabilityRequest) GetBikeId() string
func (*GetBikeAvailabilityRequest) GetEndTime ¶
func (x *GetBikeAvailabilityRequest) GetEndTime() *timestamp.Timestamp
func (*GetBikeAvailabilityRequest) GetStartTime ¶
func (x *GetBikeAvailabilityRequest) GetStartTime() *timestamp.Timestamp
func (*GetBikeAvailabilityRequest) ProtoMessage ¶
func (*GetBikeAvailabilityRequest) ProtoMessage()
func (*GetBikeAvailabilityRequest) ProtoReflect ¶
func (x *GetBikeAvailabilityRequest) ProtoReflect() protoreflect.Message
func (*GetBikeAvailabilityRequest) Reset ¶
func (x *GetBikeAvailabilityRequest) Reset()
func (*GetBikeAvailabilityRequest) String ¶
func (x *GetBikeAvailabilityRequest) String() string
type GetBikeAvailabilityResponse ¶
type GetBikeAvailabilityResponse struct { Available bool `protobuf:"varint,1,opt,name=available,proto3" json:"available,omitempty"` // contains filtered or unexported fields }
func (*GetBikeAvailabilityResponse) Descriptor
deprecated
func (*GetBikeAvailabilityResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetBikeAvailabilityResponse.ProtoReflect.Descriptor instead.
func (*GetBikeAvailabilityResponse) GetAvailable ¶
func (x *GetBikeAvailabilityResponse) GetAvailable() bool
func (*GetBikeAvailabilityResponse) ProtoMessage ¶
func (*GetBikeAvailabilityResponse) ProtoMessage()
func (*GetBikeAvailabilityResponse) ProtoReflect ¶
func (x *GetBikeAvailabilityResponse) ProtoReflect() protoreflect.Message
func (*GetBikeAvailabilityResponse) Reset ¶
func (x *GetBikeAvailabilityResponse) Reset()
func (*GetBikeAvailabilityResponse) String ¶
func (x *GetBikeAvailabilityResponse) String() string
type GetBikeRequest ¶
type GetBikeRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetBikeRequest) Descriptor
deprecated
func (*GetBikeRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetBikeRequest.ProtoReflect.Descriptor instead.
func (*GetBikeRequest) GetId ¶
func (x *GetBikeRequest) GetId() string
func (*GetBikeRequest) ProtoMessage ¶
func (*GetBikeRequest) ProtoMessage()
func (*GetBikeRequest) ProtoReflect ¶
func (x *GetBikeRequest) ProtoReflect() protoreflect.Message
func (*GetBikeRequest) Reset ¶
func (x *GetBikeRequest) Reset()
func (*GetBikeRequest) String ¶
func (x *GetBikeRequest) String() string
type ListBikesResponse ¶
type ListBikesResponse struct { Bikes []*Bike `protobuf:"bytes,1,rep,name=bikes,proto3" json:"bikes,omitempty"` // contains filtered or unexported fields }
func (*ListBikesResponse) Descriptor
deprecated
func (*ListBikesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListBikesResponse.ProtoReflect.Descriptor instead.
func (*ListBikesResponse) GetBikes ¶
func (x *ListBikesResponse) GetBikes() []*Bike
func (*ListBikesResponse) ProtoMessage ¶
func (*ListBikesResponse) ProtoMessage()
func (*ListBikesResponse) ProtoReflect ¶
func (x *ListBikesResponse) ProtoReflect() protoreflect.Message
func (*ListBikesResponse) Reset ¶
func (x *ListBikesResponse) Reset()
func (*ListBikesResponse) String ¶
func (x *ListBikesResponse) String() string
type ListReservationsRequest ¶
type ListReservationsRequest struct { BikeId string `protobuf:"bytes,1,opt,name=bike_id,json=bikeId,proto3" json:"bike_id,omitempty"` StartTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` EndTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // contains filtered or unexported fields }
func (*ListReservationsRequest) Descriptor
deprecated
func (*ListReservationsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListReservationsRequest.ProtoReflect.Descriptor instead.
func (*ListReservationsRequest) GetBikeId ¶
func (x *ListReservationsRequest) GetBikeId() string
func (*ListReservationsRequest) GetEndTime ¶
func (x *ListReservationsRequest) GetEndTime() *timestamp.Timestamp
func (*ListReservationsRequest) GetStartTime ¶
func (x *ListReservationsRequest) GetStartTime() *timestamp.Timestamp
func (*ListReservationsRequest) ProtoMessage ¶
func (*ListReservationsRequest) ProtoMessage()
func (*ListReservationsRequest) ProtoReflect ¶
func (x *ListReservationsRequest) ProtoReflect() protoreflect.Message
func (*ListReservationsRequest) Reset ¶
func (x *ListReservationsRequest) Reset()
func (*ListReservationsRequest) String ¶
func (x *ListReservationsRequest) String() string
type ListReservationsResponse ¶
type ListReservationsResponse struct { Reservations []*Reservation `protobuf:"bytes,1,rep,name=reservations,proto3" json:"reservations,omitempty"` // contains filtered or unexported fields }
func (*ListReservationsResponse) Descriptor
deprecated
func (*ListReservationsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListReservationsResponse.ProtoReflect.Descriptor instead.
func (*ListReservationsResponse) GetReservations ¶
func (x *ListReservationsResponse) GetReservations() []*Reservation
func (*ListReservationsResponse) ProtoMessage ¶
func (*ListReservationsResponse) ProtoMessage()
func (*ListReservationsResponse) ProtoReflect ¶
func (x *ListReservationsResponse) ProtoReflect() protoreflect.Message
func (*ListReservationsResponse) Reset ¶
func (x *ListReservationsResponse) Reset()
func (*ListReservationsResponse) String ¶
func (x *ListReservationsResponse) String() string
type Location ¶
type Location struct { Lat float32 `protobuf:"fixed32,1,opt,name=lat,proto3" json:"lat,omitempty"` Long float32 `protobuf:"fixed32,2,opt,name=long,proto3" json:"long,omitempty"` // contains filtered or unexported fields }
func (*Location) Descriptor
deprecated
func (*Location) ProtoMessage ¶
func (*Location) ProtoMessage()
func (*Location) ProtoReflect ¶
func (x *Location) ProtoReflect() protoreflect.Message
type Reservation ¶
type Reservation struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Status ReservationStatus `protobuf:"varint,2,opt,name=status,proto3,enum=nglogic.bikerental.v1.ReservationStatus" json:"status,omitempty"` Customer *Customer `protobuf:"bytes,3,opt,name=customer,proto3" json:"customer,omitempty"` Bike *Bike `protobuf:"bytes,4,opt,name=bike,proto3" json:"bike,omitempty"` StartTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` EndTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` TotalValue int32 `protobuf:"varint,7,opt,name=totalValue,proto3" json:"totalValue,omitempty"` AppliedDiscount int32 `protobuf:"varint,8,opt,name=appliedDiscount,proto3" json:"appliedDiscount,omitempty"` // contains filtered or unexported fields }
func (*Reservation) Descriptor
deprecated
func (*Reservation) Descriptor() ([]byte, []int)
Deprecated: Use Reservation.ProtoReflect.Descriptor instead.
func (*Reservation) GetAppliedDiscount ¶
func (x *Reservation) GetAppliedDiscount() int32
func (*Reservation) GetBike ¶
func (x *Reservation) GetBike() *Bike
func (*Reservation) GetCustomer ¶
func (x *Reservation) GetCustomer() *Customer
func (*Reservation) GetEndTime ¶
func (x *Reservation) GetEndTime() *timestamp.Timestamp
func (*Reservation) GetId ¶
func (x *Reservation) GetId() string
func (*Reservation) GetStartTime ¶
func (x *Reservation) GetStartTime() *timestamp.Timestamp
func (*Reservation) GetStatus ¶
func (x *Reservation) GetStatus() ReservationStatus
func (*Reservation) GetTotalValue ¶
func (x *Reservation) GetTotalValue() int32
func (*Reservation) ProtoMessage ¶
func (*Reservation) ProtoMessage()
func (*Reservation) ProtoReflect ¶
func (x *Reservation) ProtoReflect() protoreflect.Message
func (*Reservation) Reset ¶
func (x *Reservation) Reset()
func (*Reservation) String ¶
func (x *Reservation) String() string
type ReservationStatus ¶
type ReservationStatus int32
const ( ReservationStatus_RESERVATION_STATUS_UNKNOWN ReservationStatus = 0 ReservationStatus_RESERVATION_STATUS_REJECTED ReservationStatus = 1 ReservationStatus_RESERVATION_STATUS_APPROVED ReservationStatus = 2 ReservationStatus_RESERVATION_STATUS_CANCELLED ReservationStatus = 3 )
func (ReservationStatus) Descriptor ¶
func (ReservationStatus) Descriptor() protoreflect.EnumDescriptor
func (ReservationStatus) Enum ¶
func (x ReservationStatus) Enum() *ReservationStatus
func (ReservationStatus) EnumDescriptor
deprecated
func (ReservationStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use ReservationStatus.Descriptor instead.
func (ReservationStatus) Number ¶
func (x ReservationStatus) Number() protoreflect.EnumNumber
func (ReservationStatus) String ¶
func (x ReservationStatus) String() string
func (ReservationStatus) Type ¶
func (ReservationStatus) Type() protoreflect.EnumType
type UnimplementedBikeRentalServiceServer ¶
type UnimplementedBikeRentalServiceServer struct { }
UnimplementedBikeRentalServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedBikeRentalServiceServer) CancelReservation ¶
func (*UnimplementedBikeRentalServiceServer) CancelReservation(context.Context, *CancelReservationRequest) (*empty.Empty, error)
func (*UnimplementedBikeRentalServiceServer) CreateBike ¶
func (*UnimplementedBikeRentalServiceServer) CreateBike(context.Context, *CreateBikeRequest) (*Bike, error)
func (*UnimplementedBikeRentalServiceServer) CreateReservation ¶
func (*UnimplementedBikeRentalServiceServer) CreateReservation(context.Context, *CreateReservationRequest) (*CreateReservationResponse, error)
func (*UnimplementedBikeRentalServiceServer) DeleteBike ¶
func (*UnimplementedBikeRentalServiceServer) DeleteBike(context.Context, *DeleteBikeRequest) (*empty.Empty, error)
func (*UnimplementedBikeRentalServiceServer) GetBike ¶
func (*UnimplementedBikeRentalServiceServer) GetBike(context.Context, *GetBikeRequest) (*Bike, error)
func (*UnimplementedBikeRentalServiceServer) GetBikeAvailability ¶
func (*UnimplementedBikeRentalServiceServer) GetBikeAvailability(context.Context, *GetBikeAvailabilityRequest) (*GetBikeAvailabilityResponse, error)
func (*UnimplementedBikeRentalServiceServer) ListBikes ¶
func (*UnimplementedBikeRentalServiceServer) ListBikes(context.Context, *empty.Empty) (*ListBikesResponse, error)
func (*UnimplementedBikeRentalServiceServer) ListReservations ¶
func (*UnimplementedBikeRentalServiceServer) ListReservations(context.Context, *ListReservationsRequest) (*ListReservationsResponse, error)
func (*UnimplementedBikeRentalServiceServer) UpdateBike ¶
func (*UnimplementedBikeRentalServiceServer) UpdateBike(context.Context, *UpdateBikeRequest) (*empty.Empty, error)
type UpdateBikeRequest ¶
type UpdateBikeRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Data *BikeData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*UpdateBikeRequest) Descriptor
deprecated
func (*UpdateBikeRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateBikeRequest.ProtoReflect.Descriptor instead.
func (*UpdateBikeRequest) GetData ¶
func (x *UpdateBikeRequest) GetData() *BikeData
func (*UpdateBikeRequest) GetId ¶
func (x *UpdateBikeRequest) GetId() string
func (*UpdateBikeRequest) ProtoMessage ¶
func (*UpdateBikeRequest) ProtoMessage()
func (*UpdateBikeRequest) ProtoReflect ¶
func (x *UpdateBikeRequest) ProtoReflect() protoreflect.Message
func (*UpdateBikeRequest) Reset ¶
func (x *UpdateBikeRequest) Reset()
func (*UpdateBikeRequest) String ¶
func (x *UpdateBikeRequest) String() string