bikerentalv1

package
v0.0.0-...-a53416d Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package bikerentalv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

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

Deprecated: Use Bike.ProtoReflect.Descriptor instead.

func (*Bike) GetData

func (x *Bike) GetData() *BikeData

func (*Bike) GetId

func (x *Bike) GetId() string

func (*Bike) ProtoMessage

func (*Bike) ProtoMessage()

func (*Bike) ProtoReflect

func (x *Bike) ProtoReflect() protoreflect.Message

func (*Bike) Reset

func (x *Bike) Reset()

func (*Bike) String

func (x *Bike) String() string

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

Deprecated: Use BikeData.ProtoReflect.Descriptor instead.

func (*BikeData) GetModelName

func (x *BikeData) GetModelName() string

func (*BikeData) GetPricePerHour

func (x *BikeData) GetPricePerHour() int32

func (*BikeData) GetWeight

func (x *BikeData) GetWeight() float32

func (*BikeData) ProtoMessage

func (*BikeData) ProtoMessage()

func (*BikeData) ProtoReflect

func (x *BikeData) ProtoReflect() protoreflect.Message

func (*BikeData) Reset

func (x *BikeData) Reset()

func (*BikeData) String

func (x *BikeData) String() string

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.

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 (*CreateReservationResponse) ProtoMessage

func (*CreateReservationResponse) ProtoMessage()

func (*CreateReservationResponse) ProtoReflect

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

Deprecated: Use Customer.ProtoReflect.Descriptor instead.

func (*Customer) GetData

func (x *Customer) GetData() *CustomerData

func (*Customer) GetId

func (x *Customer) GetId() string

func (*Customer) ProtoMessage

func (*Customer) ProtoMessage()

func (*Customer) ProtoReflect

func (x *Customer) ProtoReflect() protoreflect.Message

func (*Customer) Reset

func (x *Customer) Reset()

func (*Customer) String

func (x *Customer) String() string

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) Enum

func (x CustomerType) Enum() *CustomerType

func (CustomerType) EnumDescriptor deprecated

func (CustomerType) EnumDescriptor() ([]byte, []int)

Deprecated: Use CustomerType.Descriptor instead.

func (CustomerType) Number

func (CustomerType) String

func (x CustomerType) String() string

func (CustomerType) Type

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 (*GetBikeAvailabilityRequest) GetStartTime

func (x *GetBikeAvailabilityRequest) GetStartTime() *timestamp.Timestamp

func (*GetBikeAvailabilityRequest) ProtoMessage

func (*GetBikeAvailabilityRequest) ProtoMessage()

func (*GetBikeAvailabilityRequest) ProtoReflect

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

Deprecated: Use Location.ProtoReflect.Descriptor instead.

func (*Location) GetLat

func (x *Location) GetLat() float32

func (*Location) GetLong

func (x *Location) GetLong() float32

func (*Location) ProtoMessage

func (*Location) ProtoMessage()

func (*Location) ProtoReflect

func (x *Location) ProtoReflect() protoreflect.Message

func (*Location) Reset

func (x *Location) Reset()

func (*Location) String

func (x *Location) String() string

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) Enum

func (ReservationStatus) EnumDescriptor deprecated

func (ReservationStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use ReservationStatus.Descriptor instead.

func (ReservationStatus) Number

func (ReservationStatus) String

func (x ReservationStatus) String() string

func (ReservationStatus) Type

type UnimplementedBikeRentalServiceServer

type UnimplementedBikeRentalServiceServer struct {
}

UnimplementedBikeRentalServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedBikeRentalServiceServer) CancelReservation

func (*UnimplementedBikeRentalServiceServer) CreateBike

func (*UnimplementedBikeRentalServiceServer) CreateReservation

func (*UnimplementedBikeRentalServiceServer) DeleteBike

func (*UnimplementedBikeRentalServiceServer) GetBike

func (*UnimplementedBikeRentalServiceServer) GetBikeAvailability

func (*UnimplementedBikeRentalServiceServer) ListBikes

func (*UnimplementedBikeRentalServiceServer) ListReservations

func (*UnimplementedBikeRentalServiceServer) UpdateBike

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

Jump to

Keyboard shortcuts

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