reservationpb

package
v0.0.0-...-bfb259f Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReservationService_ListReservations_FullMethodName  = "/reservationpb.ReservationService/ListReservations"
	ReservationService_CreateReservation_FullMethodName = "/reservationpb.ReservationService/CreateReservation"
)

Variables

View Source
var (
	ReservationStatus_name = map[int32]string{
		0: "RESERVED",
		1: "CHECKED_IN",
		2: "CHECKED_OUT",
		3: "CANCELLED",
	}
	ReservationStatus_value = map[string]int32{
		"RESERVED":    0,
		"CHECKED_IN":  1,
		"CHECKED_OUT": 2,
		"CANCELLED":   3,
	}
)

Enum value maps for ReservationStatus.

View Source
var File_reservationpb_reservation_proto protoreflect.FileDescriptor
View Source
var ReservationService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "reservationpb.ReservationService",
	HandlerType: (*ReservationServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListReservations",
			Handler:    _ReservationService_ListReservations_Handler,
		},
		{
			MethodName: "CreateReservation",
			Handler:    _ReservationService_CreateReservation_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "reservationpb/reservation.proto",
}

ReservationService_ServiceDesc is the grpc.ServiceDesc for ReservationService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterReservationServiceServer

func RegisterReservationServiceServer(s grpc.ServiceRegistrar, srv ReservationServiceServer)

Types

type CreateReservationRequest

type CreateReservationRequest struct {
	RoomId    string                 `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
	StartDate *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"`
	EndDate   *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateReservationRequest) Descriptor deprecated

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

Deprecated: Use CreateReservationRequest.ProtoReflect.Descriptor instead.

func (*CreateReservationRequest) GetEndDate

func (*CreateReservationRequest) GetRoomId

func (x *CreateReservationRequest) GetRoomId() string

func (*CreateReservationRequest) GetStartDate

func (x *CreateReservationRequest) GetStartDate() *timestamppb.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"`
	// contains filtered or unexported fields
}

func (*CreateReservationResponse) Descriptor deprecated

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

Deprecated: Use CreateReservationResponse.ProtoReflect.Descriptor instead.

func (*CreateReservationResponse) GetReservation

func (x *CreateReservationResponse) GetReservation() *Reservation

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 ListReservationRequest

type ListReservationRequest struct {
	Offset    int64                  `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
	Limit     int64                  `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	StartDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"`
	EndDate   *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"`
	RoomId    string                 `protobuf:"bytes,5,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ListReservationRequest) Descriptor deprecated

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

Deprecated: Use ListReservationRequest.ProtoReflect.Descriptor instead.

func (*ListReservationRequest) GetEndDate

func (x *ListReservationRequest) GetEndDate() *timestamppb.Timestamp

func (*ListReservationRequest) GetLimit

func (x *ListReservationRequest) GetLimit() int64

func (*ListReservationRequest) GetOffset

func (x *ListReservationRequest) GetOffset() int64

func (*ListReservationRequest) GetRoomId

func (x *ListReservationRequest) GetRoomId() string

func (*ListReservationRequest) GetStartDate

func (x *ListReservationRequest) GetStartDate() *timestamppb.Timestamp

func (*ListReservationRequest) ProtoMessage

func (*ListReservationRequest) ProtoMessage()

func (*ListReservationRequest) ProtoReflect

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

func (*ListReservationRequest) Reset

func (x *ListReservationRequest) Reset()

func (*ListReservationRequest) String

func (x *ListReservationRequest) String() string

type ListReservationResponse

type ListReservationResponse struct {
	Reservations []*Reservation `protobuf:"bytes,1,rep,name=reservations,proto3" json:"reservations,omitempty"`
	Total        int64          `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

func (*ListReservationResponse) Descriptor deprecated

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

Deprecated: Use ListReservationResponse.ProtoReflect.Descriptor instead.

func (*ListReservationResponse) GetReservations

func (x *ListReservationResponse) GetReservations() []*Reservation

func (*ListReservationResponse) GetTotal

func (x *ListReservationResponse) GetTotal() int64

func (*ListReservationResponse) ProtoMessage

func (*ListReservationResponse) ProtoMessage()

func (*ListReservationResponse) ProtoReflect

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

func (*ListReservationResponse) Reset

func (x *ListReservationResponse) Reset()

func (*ListReservationResponse) String

func (x *ListReservationResponse) String() string

type Reservation

type Reservation struct {
	Id        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	RoomId    string                 `protobuf:"bytes,2,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
	Status    ReservationStatus      `protobuf:"varint,3,opt,name=status,proto3,enum=reservationpb.ReservationStatus" json:"status,omitempty"`
	StartDate *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"`
	EndDate   *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Reservation) Descriptor deprecated

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

Deprecated: Use Reservation.ProtoReflect.Descriptor instead.

func (*Reservation) GetCreatedAt

func (x *Reservation) GetCreatedAt() *timestamppb.Timestamp

func (*Reservation) GetEndDate

func (x *Reservation) GetEndDate() *timestamppb.Timestamp

func (*Reservation) GetId

func (x *Reservation) GetId() string

func (*Reservation) GetRoomId

func (x *Reservation) GetRoomId() string

func (*Reservation) GetStartDate

func (x *Reservation) GetStartDate() *timestamppb.Timestamp

func (*Reservation) GetStatus

func (x *Reservation) GetStatus() ReservationStatus

func (*Reservation) GetUpdatedAt

func (x *Reservation) GetUpdatedAt() *timestamppb.Timestamp

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 ReservationServiceClient

type ReservationServiceClient interface {
	ListReservations(ctx context.Context, in *ListReservationRequest, opts ...grpc.CallOption) (*ListReservationResponse, error)
	CreateReservation(ctx context.Context, in *CreateReservationRequest, opts ...grpc.CallOption) (*CreateReservationResponse, error)
}

ReservationServiceClient is the client API for ReservationService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ReservationServiceServer

type ReservationServiceServer interface {
	ListReservations(context.Context, *ListReservationRequest) (*ListReservationResponse, error)
	CreateReservation(context.Context, *CreateReservationRequest) (*CreateReservationResponse, error)
	// contains filtered or unexported methods
}

ReservationServiceServer is the server API for ReservationService service. All implementations must embed UnimplementedReservationServiceServer for forward compatibility

type ReservationStatus

type ReservationStatus int32
const (
	ReservationStatus_RESERVED    ReservationStatus = 0
	ReservationStatus_CHECKED_IN  ReservationStatus = 1
	ReservationStatus_CHECKED_OUT ReservationStatus = 2
	ReservationStatus_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 UnimplementedReservationServiceServer

type UnimplementedReservationServiceServer struct {
}

UnimplementedReservationServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedReservationServiceServer) CreateReservation

func (UnimplementedReservationServiceServer) ListReservations

type UnsafeReservationServiceServer

type UnsafeReservationServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeReservationServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ReservationServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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