Documentation ¶
Overview ¶
Package protos is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterCinemaOrdersServiceV1Handler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCinemaOrdersServiceV1HandlerClient(ctx context.Context, mux *runtime.ServeMux, client CinemaOrdersServiceV1Client) error
- func RegisterCinemaOrdersServiceV1HandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCinemaOrdersServiceV1HandlerServer(ctx context.Context, mux *runtime.ServeMux, server CinemaOrdersServiceV1Server) error
- func RegisterCinemaOrdersServiceV1Server(s grpc.ServiceRegistrar, srv CinemaOrdersServiceV1Server)
- type CancelReservationRequest
- func (*CancelReservationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CancelReservationRequest) GetReserveId() string
- func (*CancelReservationRequest) ProtoMessage()
- func (x *CancelReservationRequest) ProtoReflect() protoreflect.Message
- func (x *CancelReservationRequest) Reset()
- func (x *CancelReservationRequest) String() string
- type CinemaOrdersServiceV1Client
- type CinemaOrdersServiceV1Server
- type GetOccupiedPlacesRequest
- func (*GetOccupiedPlacesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetOccupiedPlacesRequest) GetScreeningId() int64
- func (*GetOccupiedPlacesRequest) ProtoMessage()
- func (x *GetOccupiedPlacesRequest) ProtoReflect() protoreflect.Message
- func (x *GetOccupiedPlacesRequest) Reset()
- func (x *GetOccupiedPlacesRequest) String() string
- type GetOrderRequest
- type GetOrdersRequest
- func (*GetOrdersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetOrdersRequest) GetLimit() uint32
- func (x *GetOrdersRequest) GetPage() uint32
- func (x *GetOrdersRequest) GetSort() *Sort
- func (*GetOrdersRequest) ProtoMessage()
- func (x *GetOrdersRequest) ProtoReflect() protoreflect.Message
- func (x *GetOrdersRequest) Reset()
- func (x *GetOrdersRequest) String() string
- type GetScreeningsOccupiedPlacesCountsRequest
- func (*GetScreeningsOccupiedPlacesCountsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetScreeningsOccupiedPlacesCountsRequest) GetScreeningsIds() string
- func (*GetScreeningsOccupiedPlacesCountsRequest) ProtoMessage()
- func (x *GetScreeningsOccupiedPlacesCountsRequest) ProtoReflect() protoreflect.Message
- func (x *GetScreeningsOccupiedPlacesCountsRequest) Reset()
- func (x *GetScreeningsOccupiedPlacesCountsRequest) String() string
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetOrderDate() *Timestamp
- func (x *Order) GetScreeningId() int64
- func (x *Order) GetTickets() []*Ticket
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- type OrderPreview
- func (*OrderPreview) Descriptor() ([]byte, []int)deprecated
- func (x *OrderPreview) GetOrderDate() *Timestamp
- func (x *OrderPreview) GetOrderId() string
- func (x *OrderPreview) GetScreeningId() int64
- func (x *OrderPreview) GetTotalPrice() *Price
- func (*OrderPreview) ProtoMessage()
- func (x *OrderPreview) ProtoReflect() protoreflect.Message
- func (x *OrderPreview) Reset()
- func (x *OrderPreview) String() string
- type OrdersPreviews
- type Place
- type Places
- type Price
- type ProcessOrderRequest
- func (*ProcessOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessOrderRequest) GetReserveId() string
- func (*ProcessOrderRequest) ProtoMessage()
- func (x *ProcessOrderRequest) ProtoReflect() protoreflect.Message
- func (x *ProcessOrderRequest) Reset()
- func (x *ProcessOrderRequest) String() string
- type ProcessOrderResponse
- func (*ProcessOrderResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessOrderResponse) GetPaymentUrl() string
- func (*ProcessOrderResponse) ProtoMessage()
- func (x *ProcessOrderResponse) ProtoReflect() protoreflect.Message
- func (x *ProcessOrderResponse) Reset()
- func (x *ProcessOrderResponse) String() string
- type RefundOrderRequest
- func (*RefundOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RefundOrderRequest) GetItemsIds() []string
- func (x *RefundOrderRequest) GetOrderId() string
- func (*RefundOrderRequest) ProtoMessage()
- func (x *RefundOrderRequest) ProtoReflect() protoreflect.Message
- func (x *RefundOrderRequest) Reset()
- func (x *RefundOrderRequest) String() string
- type ReservePlacesRequest
- func (*ReservePlacesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReservePlacesRequest) GetPlaces() []*Place
- func (x *ReservePlacesRequest) GetScreeningId() int64
- func (*ReservePlacesRequest) ProtoMessage()
- func (x *ReservePlacesRequest) ProtoReflect() protoreflect.Message
- func (x *ReservePlacesRequest) Reset()
- func (x *ReservePlacesRequest) String() string
- type ReservePlacesResponse
- func (*ReservePlacesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ReservePlacesResponse) GetReserveId() string
- func (x *ReservePlacesResponse) GetTimeToPay() int32
- func (*ReservePlacesResponse) ProtoMessage()
- func (x *ReservePlacesResponse) ProtoReflect() protoreflect.Message
- func (x *ReservePlacesResponse) Reset()
- func (x *ReservePlacesResponse) String() string
- type ScreeningsOccupiedPlacesCount
- func (*ScreeningsOccupiedPlacesCount) Descriptor() ([]byte, []int)deprecated
- func (x *ScreeningsOccupiedPlacesCount) GetScreeningsOccupiedPlacesCount() map[int64]uint32
- func (*ScreeningsOccupiedPlacesCount) ProtoMessage()
- func (x *ScreeningsOccupiedPlacesCount) ProtoReflect() protoreflect.Message
- func (x *ScreeningsOccupiedPlacesCount) Reset()
- func (x *ScreeningsOccupiedPlacesCount) String() string
- type Sort
- type Sort_Ordering
- func (Sort_Ordering) Descriptor() protoreflect.EnumDescriptor
- func (x Sort_Ordering) Enum() *Sort_Ordering
- func (Sort_Ordering) EnumDescriptor() ([]byte, []int)deprecated
- func (x Sort_Ordering) Number() protoreflect.EnumNumber
- func (x Sort_Ordering) String() string
- func (Sort_Ordering) Type() protoreflect.EnumType
- type Status
- type Ticket
- func (*Ticket) Descriptor() ([]byte, []int)deprecated
- func (x *Ticket) GetPlace() *Place
- func (x *Ticket) GetPrice() *Price
- func (x *Ticket) GetStatus() Status
- func (x *Ticket) GetTicketId() string
- func (*Ticket) ProtoMessage()
- func (x *Ticket) ProtoReflect() protoreflect.Message
- func (x *Ticket) Reset()
- func (x *Ticket) String() string
- type Timestamp
- type UnimplementedCinemaOrdersServiceV1Server
- func (UnimplementedCinemaOrdersServiceV1Server) CancelReservation(context.Context, *CancelReservationRequest) (*emptypb.Empty, error)
- func (UnimplementedCinemaOrdersServiceV1Server) GetOccupiedPlaces(context.Context, *GetOccupiedPlacesRequest) (*Places, error)
- func (UnimplementedCinemaOrdersServiceV1Server) GetOrder(context.Context, *GetOrderRequest) (*Order, error)
- func (UnimplementedCinemaOrdersServiceV1Server) GetOrders(context.Context, *GetOrdersRequest) (*OrdersPreviews, error)
- func (UnimplementedCinemaOrdersServiceV1Server) GetScreeningsOccupiedPlacesCounts(context.Context, *GetScreeningsOccupiedPlacesCountsRequest) (*ScreeningsOccupiedPlacesCount, error)
- func (UnimplementedCinemaOrdersServiceV1Server) ProcessOrder(context.Context, *ProcessOrderRequest) (*ProcessOrderResponse, error)
- func (UnimplementedCinemaOrdersServiceV1Server) RefundOrder(context.Context, *RefundOrderRequest) (*emptypb.Empty, error)
- func (UnimplementedCinemaOrdersServiceV1Server) ReservePlaces(context.Context, *ReservePlacesRequest) (*ReservePlacesResponse, error)
- type UnsafeCinemaOrdersServiceV1Server
Constants ¶
This section is empty.
Variables ¶
var ( Status_name = map[int32]string{ 0: "PAYMENT_REQUIRED", 1: "PAID", 2: "REFUND_AWAITING", 3: "CANCELLED", 4: "USED", 5: "REFUNDED", } Status_value = map[string]int32{ "PAYMENT_REQUIRED": 0, "PAID": 1, "REFUND_AWAITING": 2, "CANCELLED": 3, "USED": 4, "REFUNDED": 5, } )
Enum value maps for Status.
var ( Sort_Ordering_name = map[int32]string{ 0: "ASC", 1: "DESC", } Sort_Ordering_value = map[string]int32{ "ASC": 0, "DESC": 1, } )
Enum value maps for Sort_Ordering.
var CinemaOrdersServiceV1_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cinema_orders_service.CinemaOrdersServiceV1", HandlerType: (*CinemaOrdersServiceV1Server)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetOrders", Handler: _CinemaOrdersServiceV1_GetOrders_Handler, }, { MethodName: "GetOrder", Handler: _CinemaOrdersServiceV1_GetOrder_Handler, }, { MethodName: "RefundOrder", Handler: _CinemaOrdersServiceV1_RefundOrder_Handler, }, { MethodName: "GetOccupiedPlaces", Handler: _CinemaOrdersServiceV1_GetOccupiedPlaces_Handler, }, { MethodName: "GetScreeningsOccupiedPlacesCounts", Handler: _CinemaOrdersServiceV1_GetScreeningsOccupiedPlacesCounts_Handler, }, { MethodName: "ReservePlaces", Handler: _CinemaOrdersServiceV1_ReservePlaces_Handler, }, { MethodName: "CancelReservation", Handler: _CinemaOrdersServiceV1_CancelReservation_Handler, }, { MethodName: "ProcessOrder", Handler: _CinemaOrdersServiceV1_ProcessOrder_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cinema_orders_service_v1.proto", }
CinemaOrdersServiceV1_ServiceDesc is the grpc.ServiceDesc for CinemaOrdersServiceV1 service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_cinema_orders_service_v1_messages_proto protoreflect.FileDescriptor
var File_cinema_orders_service_v1_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCinemaOrdersServiceV1Handler ¶
func RegisterCinemaOrdersServiceV1Handler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterCinemaOrdersServiceV1Handler registers the http handlers for service CinemaOrdersServiceV1 to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCinemaOrdersServiceV1HandlerClient ¶
func RegisterCinemaOrdersServiceV1HandlerClient(ctx context.Context, mux *runtime.ServeMux, client CinemaOrdersServiceV1Client) error
RegisterCinemaOrdersServiceV1HandlerClient registers the http handlers for service CinemaOrdersServiceV1 to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CinemaOrdersServiceV1Client". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CinemaOrdersServiceV1Client" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CinemaOrdersServiceV1Client" to call the correct interceptors.
func RegisterCinemaOrdersServiceV1HandlerFromEndpoint ¶
func RegisterCinemaOrdersServiceV1HandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCinemaOrdersServiceV1HandlerFromEndpoint is same as RegisterCinemaOrdersServiceV1Handler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCinemaOrdersServiceV1HandlerServer ¶
func RegisterCinemaOrdersServiceV1HandlerServer(ctx context.Context, mux *runtime.ServeMux, server CinemaOrdersServiceV1Server) error
RegisterCinemaOrdersServiceV1HandlerServer registers the http handlers for service CinemaOrdersServiceV1 to "mux". UnaryRPC :call CinemaOrdersServiceV1Server 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 RegisterCinemaOrdersServiceV1HandlerFromEndpoint instead.
func RegisterCinemaOrdersServiceV1Server ¶
func RegisterCinemaOrdersServiceV1Server(s grpc.ServiceRegistrar, srv CinemaOrdersServiceV1Server)
Types ¶
type CancelReservationRequest ¶
type CancelReservationRequest struct { ReserveId string `protobuf:"bytes,1,opt,name=reserveId,json=reserve_id,proto3" json:"reserveId,omitempty"` // contains filtered or unexported fields }
func (*CancelReservationRequest) Descriptor
deprecated
func (*CancelReservationRequest) Descriptor() ([]byte, []int)
Deprecated: Use CancelReservationRequest.ProtoReflect.Descriptor instead.
func (*CancelReservationRequest) GetReserveId ¶
func (x *CancelReservationRequest) GetReserveId() 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 CinemaOrdersServiceV1Client ¶
type CinemaOrdersServiceV1Client interface { GetOrders(ctx context.Context, in *GetOrdersRequest, opts ...grpc.CallOption) (*OrdersPreviews, error) GetOrder(ctx context.Context, in *GetOrderRequest, opts ...grpc.CallOption) (*Order, error) // Refund rules: // greater than or equal to 10 days remaining before screening = 100% // less than equal 5 days remaining before screening = 50% // equal 3 days remaining before screening = 30% // if less than 3 days remaining before screening, the order is non-refundable RefundOrder(ctx context.Context, in *RefundOrderRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) GetOccupiedPlaces(ctx context.Context, in *GetOccupiedPlacesRequest, opts ...grpc.CallOption) (*Places, error) GetScreeningsOccupiedPlacesCounts(ctx context.Context, in *GetScreeningsOccupiedPlacesCountsRequest, opts ...grpc.CallOption) (*ScreeningsOccupiedPlacesCount, error) ReservePlaces(ctx context.Context, in *ReservePlacesRequest, opts ...grpc.CallOption) (*ReservePlacesResponse, error) CancelReservation(ctx context.Context, in *CancelReservationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) ProcessOrder(ctx context.Context, in *ProcessOrderRequest, opts ...grpc.CallOption) (*ProcessOrderResponse, error) }
CinemaOrdersServiceV1Client is the client API for CinemaOrdersServiceV1 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.
func NewCinemaOrdersServiceV1Client ¶
func NewCinemaOrdersServiceV1Client(cc grpc.ClientConnInterface) CinemaOrdersServiceV1Client
type CinemaOrdersServiceV1Server ¶
type CinemaOrdersServiceV1Server interface { GetOrders(context.Context, *GetOrdersRequest) (*OrdersPreviews, error) GetOrder(context.Context, *GetOrderRequest) (*Order, error) // Refund rules: // greater than or equal to 10 days remaining before screening = 100% // less than equal 5 days remaining before screening = 50% // equal 3 days remaining before screening = 30% // if less than 3 days remaining before screening, the order is non-refundable RefundOrder(context.Context, *RefundOrderRequest) (*emptypb.Empty, error) GetOccupiedPlaces(context.Context, *GetOccupiedPlacesRequest) (*Places, error) GetScreeningsOccupiedPlacesCounts(context.Context, *GetScreeningsOccupiedPlacesCountsRequest) (*ScreeningsOccupiedPlacesCount, error) ReservePlaces(context.Context, *ReservePlacesRequest) (*ReservePlacesResponse, error) CancelReservation(context.Context, *CancelReservationRequest) (*emptypb.Empty, error) ProcessOrder(context.Context, *ProcessOrderRequest) (*ProcessOrderResponse, error) // contains filtered or unexported methods }
CinemaOrdersServiceV1Server is the server API for CinemaOrdersServiceV1 service. All implementations must embed UnimplementedCinemaOrdersServiceV1Server for forward compatibility
type GetOccupiedPlacesRequest ¶
type GetOccupiedPlacesRequest struct { ScreeningId int64 `protobuf:"varint,1,opt,name=screeningId,json=screening_id,proto3" json:"screeningId,omitempty"` // contains filtered or unexported fields }
func (*GetOccupiedPlacesRequest) Descriptor
deprecated
func (*GetOccupiedPlacesRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetOccupiedPlacesRequest.ProtoReflect.Descriptor instead.
func (*GetOccupiedPlacesRequest) GetScreeningId ¶
func (x *GetOccupiedPlacesRequest) GetScreeningId() int64
func (*GetOccupiedPlacesRequest) ProtoMessage ¶
func (*GetOccupiedPlacesRequest) ProtoMessage()
func (*GetOccupiedPlacesRequest) ProtoReflect ¶
func (x *GetOccupiedPlacesRequest) ProtoReflect() protoreflect.Message
func (*GetOccupiedPlacesRequest) Reset ¶
func (x *GetOccupiedPlacesRequest) Reset()
func (*GetOccupiedPlacesRequest) String ¶
func (x *GetOccupiedPlacesRequest) String() string
type GetOrderRequest ¶
type GetOrderRequest struct { OrderId string `protobuf:"bytes,1,opt,name=orderId,json=order_id,proto3" json:"orderId,omitempty"` // contains filtered or unexported fields }
func (*GetOrderRequest) Descriptor
deprecated
func (*GetOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderRequest.ProtoReflect.Descriptor instead.
func (*GetOrderRequest) GetOrderId ¶
func (x *GetOrderRequest) GetOrderId() string
func (*GetOrderRequest) ProtoMessage ¶
func (*GetOrderRequest) ProtoMessage()
func (*GetOrderRequest) ProtoReflect ¶
func (x *GetOrderRequest) ProtoReflect() protoreflect.Message
func (*GetOrderRequest) Reset ¶
func (x *GetOrderRequest) Reset()
func (*GetOrderRequest) String ¶
func (x *GetOrderRequest) String() string
type GetOrdersRequest ¶
type GetOrdersRequest struct { Page uint32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // See fields names in OrderPreview, only no nested field name, // if not specified, sorting will be used with order DESC and sort_by_field=order_date Sort *Sort `protobuf:"bytes,3,opt,name=sort,proto3,oneof" json:"sort,omitempty"` // contains filtered or unexported fields }
func (*GetOrdersRequest) Descriptor
deprecated
func (*GetOrdersRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetOrdersRequest.ProtoReflect.Descriptor instead.
func (*GetOrdersRequest) GetLimit ¶
func (x *GetOrdersRequest) GetLimit() uint32
func (*GetOrdersRequest) GetPage ¶
func (x *GetOrdersRequest) GetPage() uint32
func (*GetOrdersRequest) GetSort ¶
func (x *GetOrdersRequest) GetSort() *Sort
func (*GetOrdersRequest) ProtoMessage ¶
func (*GetOrdersRequest) ProtoMessage()
func (*GetOrdersRequest) ProtoReflect ¶
func (x *GetOrdersRequest) ProtoReflect() protoreflect.Message
func (*GetOrdersRequest) Reset ¶
func (x *GetOrdersRequest) Reset()
func (*GetOrdersRequest) String ¶
func (x *GetOrdersRequest) String() string
type GetScreeningsOccupiedPlacesCountsRequest ¶
type GetScreeningsOccupiedPlacesCountsRequest struct { // for multiple values use ',' separator ScreeningsIds string `protobuf:"bytes,1,opt,name=screeningsIds,json=screenings_ids,proto3" json:"screeningsIds,omitempty"` // contains filtered or unexported fields }
func (*GetScreeningsOccupiedPlacesCountsRequest) Descriptor
deprecated
func (*GetScreeningsOccupiedPlacesCountsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetScreeningsOccupiedPlacesCountsRequest.ProtoReflect.Descriptor instead.
func (*GetScreeningsOccupiedPlacesCountsRequest) GetScreeningsIds ¶
func (x *GetScreeningsOccupiedPlacesCountsRequest) GetScreeningsIds() string
func (*GetScreeningsOccupiedPlacesCountsRequest) ProtoMessage ¶
func (*GetScreeningsOccupiedPlacesCountsRequest) ProtoMessage()
func (*GetScreeningsOccupiedPlacesCountsRequest) ProtoReflect ¶
func (x *GetScreeningsOccupiedPlacesCountsRequest) ProtoReflect() protoreflect.Message
func (*GetScreeningsOccupiedPlacesCountsRequest) Reset ¶
func (x *GetScreeningsOccupiedPlacesCountsRequest) Reset()
func (*GetScreeningsOccupiedPlacesCountsRequest) String ¶
func (x *GetScreeningsOccupiedPlacesCountsRequest) String() string
type Order ¶
type Order struct { Tickets []*Ticket `protobuf:"bytes,1,rep,name=tickets,proto3" json:"tickets,omitempty"` OrderDate *Timestamp `protobuf:"bytes,2,opt,name=orderDate,json=order_date,proto3" json:"orderDate,omitempty"` ScreeningId int64 `protobuf:"varint,3,opt,name=screeningId,json=screening_id,proto3" json:"screeningId,omitempty"` // contains filtered or unexported fields }
func (*Order) Descriptor
deprecated
func (*Order) GetOrderDate ¶
func (*Order) GetScreeningId ¶
func (*Order) GetTickets ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
type OrderPreview ¶
type OrderPreview struct { OrderId string `protobuf:"bytes,1,opt,name=orderId,json=order_id,proto3" json:"orderId,omitempty"` OrderDate *Timestamp `protobuf:"bytes,2,opt,name=orderDate,json=order_date,proto3" json:"orderDate,omitempty"` TotalPrice *Price `protobuf:"bytes,3,opt,name=totalPrice,json=total_price,proto3" json:"totalPrice,omitempty"` ScreeningId int64 `protobuf:"varint,4,opt,name=screeningId,json=screening_id,proto3" json:"screeningId,omitempty"` // contains filtered or unexported fields }
func (*OrderPreview) Descriptor
deprecated
func (*OrderPreview) Descriptor() ([]byte, []int)
Deprecated: Use OrderPreview.ProtoReflect.Descriptor instead.
func (*OrderPreview) GetOrderDate ¶
func (x *OrderPreview) GetOrderDate() *Timestamp
func (*OrderPreview) GetOrderId ¶
func (x *OrderPreview) GetOrderId() string
func (*OrderPreview) GetScreeningId ¶
func (x *OrderPreview) GetScreeningId() int64
func (*OrderPreview) GetTotalPrice ¶
func (x *OrderPreview) GetTotalPrice() *Price
func (*OrderPreview) ProtoMessage ¶
func (*OrderPreview) ProtoMessage()
func (*OrderPreview) ProtoReflect ¶
func (x *OrderPreview) ProtoReflect() protoreflect.Message
func (*OrderPreview) Reset ¶
func (x *OrderPreview) Reset()
func (*OrderPreview) String ¶
func (x *OrderPreview) String() string
type OrdersPreviews ¶
type OrdersPreviews struct { Orders []*OrderPreview `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` // contains filtered or unexported fields }
func (*OrdersPreviews) Descriptor
deprecated
func (*OrdersPreviews) Descriptor() ([]byte, []int)
Deprecated: Use OrdersPreviews.ProtoReflect.Descriptor instead.
func (*OrdersPreviews) GetOrders ¶
func (x *OrdersPreviews) GetOrders() []*OrderPreview
func (*OrdersPreviews) ProtoMessage ¶
func (*OrdersPreviews) ProtoMessage()
func (*OrdersPreviews) ProtoReflect ¶
func (x *OrdersPreviews) ProtoReflect() protoreflect.Message
func (*OrdersPreviews) Reset ¶
func (x *OrdersPreviews) Reset()
func (*OrdersPreviews) String ¶
func (x *OrdersPreviews) String() string
type Place ¶
type Place struct { Row int32 `protobuf:"varint,1,opt,name=row,proto3" json:"row,omitempty"` Seat int32 `protobuf:"varint,2,opt,name=seat,proto3" json:"seat,omitempty"` // contains filtered or unexported fields }
func (*Place) Descriptor
deprecated
func (*Place) ProtoMessage ¶
func (*Place) ProtoMessage()
func (*Place) ProtoReflect ¶
func (x *Place) ProtoReflect() protoreflect.Message
type Places ¶
type Places struct { Places []*Place `protobuf:"bytes,1,rep,name=places,proto3" json:"places,omitempty"` // contains filtered or unexported fields }
func (*Places) Descriptor
deprecated
func (*Places) ProtoMessage ¶
func (*Places) ProtoMessage()
func (*Places) ProtoReflect ¶
func (x *Places) ProtoReflect() protoreflect.Message
type Price ¶
type Price struct { // The price value in minimum currency units, for example 10010, is 100$ and 10 penny Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Price) Descriptor
deprecated
func (*Price) ProtoMessage ¶
func (*Price) ProtoMessage()
func (*Price) ProtoReflect ¶
func (x *Price) ProtoReflect() protoreflect.Message
type ProcessOrderRequest ¶
type ProcessOrderRequest struct { ReserveId string `protobuf:"bytes,1,opt,name=reserveId,json=reserve_id,proto3" json:"reserveId,omitempty"` // contains filtered or unexported fields }
func (*ProcessOrderRequest) Descriptor
deprecated
func (*ProcessOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProcessOrderRequest.ProtoReflect.Descriptor instead.
func (*ProcessOrderRequest) GetReserveId ¶
func (x *ProcessOrderRequest) GetReserveId() string
func (*ProcessOrderRequest) ProtoMessage ¶
func (*ProcessOrderRequest) ProtoMessage()
func (*ProcessOrderRequest) ProtoReflect ¶
func (x *ProcessOrderRequest) ProtoReflect() protoreflect.Message
func (*ProcessOrderRequest) Reset ¶
func (x *ProcessOrderRequest) Reset()
func (*ProcessOrderRequest) String ¶
func (x *ProcessOrderRequest) String() string
type ProcessOrderResponse ¶
type ProcessOrderResponse struct { PaymentUrl string `protobuf:"bytes,1,opt,name=paymentUrl,json=payment_url,proto3" json:"paymentUrl,omitempty"` // contains filtered or unexported fields }
func (*ProcessOrderResponse) Descriptor
deprecated
func (*ProcessOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProcessOrderResponse.ProtoReflect.Descriptor instead.
func (*ProcessOrderResponse) GetPaymentUrl ¶
func (x *ProcessOrderResponse) GetPaymentUrl() string
func (*ProcessOrderResponse) ProtoMessage ¶
func (*ProcessOrderResponse) ProtoMessage()
func (*ProcessOrderResponse) ProtoReflect ¶
func (x *ProcessOrderResponse) ProtoReflect() protoreflect.Message
func (*ProcessOrderResponse) Reset ¶
func (x *ProcessOrderResponse) Reset()
func (*ProcessOrderResponse) String ¶
func (x *ProcessOrderResponse) String() string
type RefundOrderRequest ¶
type RefundOrderRequest struct { OrderId string `protobuf:"bytes,1,opt,name=orderId,json=order_id,proto3" json:"orderId,omitempty"` // For a full refund, leave this field blank. ItemsIds []string `protobuf:"bytes,2,rep,name=itemsIds,json=items_ids,proto3" json:"itemsIds,omitempty"` // contains filtered or unexported fields }
func (*RefundOrderRequest) Descriptor
deprecated
func (*RefundOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use RefundOrderRequest.ProtoReflect.Descriptor instead.
func (*RefundOrderRequest) GetItemsIds ¶
func (x *RefundOrderRequest) GetItemsIds() []string
func (*RefundOrderRequest) GetOrderId ¶
func (x *RefundOrderRequest) GetOrderId() string
func (*RefundOrderRequest) ProtoMessage ¶
func (*RefundOrderRequest) ProtoMessage()
func (*RefundOrderRequest) ProtoReflect ¶
func (x *RefundOrderRequest) ProtoReflect() protoreflect.Message
func (*RefundOrderRequest) Reset ¶
func (x *RefundOrderRequest) Reset()
func (*RefundOrderRequest) String ¶
func (x *RefundOrderRequest) String() string
type ReservePlacesRequest ¶
type ReservePlacesRequest struct { ScreeningId int64 `protobuf:"varint,1,opt,name=screeningId,json=screening_id,proto3" json:"screeningId,omitempty"` // The number of places must bigger than 0 and less than or equal to 5. Places []*Place `protobuf:"bytes,2,rep,name=places,proto3" json:"places,omitempty"` // contains filtered or unexported fields }
func (*ReservePlacesRequest) Descriptor
deprecated
func (*ReservePlacesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReservePlacesRequest.ProtoReflect.Descriptor instead.
func (*ReservePlacesRequest) GetPlaces ¶
func (x *ReservePlacesRequest) GetPlaces() []*Place
func (*ReservePlacesRequest) GetScreeningId ¶
func (x *ReservePlacesRequest) GetScreeningId() int64
func (*ReservePlacesRequest) ProtoMessage ¶
func (*ReservePlacesRequest) ProtoMessage()
func (*ReservePlacesRequest) ProtoReflect ¶
func (x *ReservePlacesRequest) ProtoReflect() protoreflect.Message
func (*ReservePlacesRequest) Reset ¶
func (x *ReservePlacesRequest) Reset()
func (*ReservePlacesRequest) String ¶
func (x *ReservePlacesRequest) String() string
type ReservePlacesResponse ¶
type ReservePlacesResponse struct { ReserveId string `protobuf:"bytes,1,opt,name=reserveId,json=reserve_id,proto3" json:"reserveId,omitempty"` // The payment time of the order is in minutes, after this time the reserve is canceled. TimeToPay int32 `protobuf:"varint,2,opt,name=timeToPay,json=time_to_pay,proto3" json:"timeToPay,omitempty"` // contains filtered or unexported fields }
func (*ReservePlacesResponse) Descriptor
deprecated
func (*ReservePlacesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReservePlacesResponse.ProtoReflect.Descriptor instead.
func (*ReservePlacesResponse) GetReserveId ¶
func (x *ReservePlacesResponse) GetReserveId() string
func (*ReservePlacesResponse) GetTimeToPay ¶
func (x *ReservePlacesResponse) GetTimeToPay() int32
func (*ReservePlacesResponse) ProtoMessage ¶
func (*ReservePlacesResponse) ProtoMessage()
func (*ReservePlacesResponse) ProtoReflect ¶
func (x *ReservePlacesResponse) ProtoReflect() protoreflect.Message
func (*ReservePlacesResponse) Reset ¶
func (x *ReservePlacesResponse) Reset()
func (*ReservePlacesResponse) String ¶
func (x *ReservePlacesResponse) String() string
type ScreeningsOccupiedPlacesCount ¶
type ScreeningsOccupiedPlacesCount struct { ScreeningsOccupiedPlacesCount map[int64]uint32 `` /* 239-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ScreeningsOccupiedPlacesCount) Descriptor
deprecated
func (*ScreeningsOccupiedPlacesCount) Descriptor() ([]byte, []int)
Deprecated: Use ScreeningsOccupiedPlacesCount.ProtoReflect.Descriptor instead.
func (*ScreeningsOccupiedPlacesCount) GetScreeningsOccupiedPlacesCount ¶
func (x *ScreeningsOccupiedPlacesCount) GetScreeningsOccupiedPlacesCount() map[int64]uint32
func (*ScreeningsOccupiedPlacesCount) ProtoMessage ¶
func (*ScreeningsOccupiedPlacesCount) ProtoMessage()
func (*ScreeningsOccupiedPlacesCount) ProtoReflect ¶
func (x *ScreeningsOccupiedPlacesCount) ProtoReflect() protoreflect.Message
func (*ScreeningsOccupiedPlacesCount) Reset ¶
func (x *ScreeningsOccupiedPlacesCount) Reset()
func (*ScreeningsOccupiedPlacesCount) String ¶
func (x *ScreeningsOccupiedPlacesCount) String() string
type Sort ¶
type Sort struct { Ordering Sort_Ordering `protobuf:"varint,1,opt,name=ordering,proto3,enum=cinema_orders_service.Sort_Ordering" json:"ordering,omitempty"` FieldName string `protobuf:"bytes,2,opt,name=fieldName,json=field_name,proto3" json:"fieldName,omitempty"` // contains filtered or unexported fields }
func (*Sort) Descriptor
deprecated
func (*Sort) GetFieldName ¶
func (*Sort) GetOrdering ¶
func (x *Sort) GetOrdering() Sort_Ordering
func (*Sort) ProtoMessage ¶
func (*Sort) ProtoMessage()
func (*Sort) ProtoReflect ¶
func (x *Sort) ProtoReflect() protoreflect.Message
type Sort_Ordering ¶
type Sort_Ordering int32
const ( Sort_ASC Sort_Ordering = 0 Sort_DESC Sort_Ordering = 1 )
func (Sort_Ordering) Descriptor ¶
func (Sort_Ordering) Descriptor() protoreflect.EnumDescriptor
func (Sort_Ordering) Enum ¶
func (x Sort_Ordering) Enum() *Sort_Ordering
func (Sort_Ordering) EnumDescriptor
deprecated
func (Sort_Ordering) EnumDescriptor() ([]byte, []int)
Deprecated: Use Sort_Ordering.Descriptor instead.
func (Sort_Ordering) Number ¶
func (x Sort_Ordering) Number() protoreflect.EnumNumber
func (Sort_Ordering) String ¶
func (x Sort_Ordering) String() string
func (Sort_Ordering) Type ¶
func (Sort_Ordering) Type() protoreflect.EnumType
type Status ¶
type Status int32
Status of the order item like ticket
const ( // Awaiting payment, the next status after payment is PAID // or CANCELLED if the order was not paid within the specified period. Status_PAYMENT_REQUIRED Status = 0 // The order is paid, after use, the status USED. // AFTER the buyer has requested a refund, the status switches to REFUND_AWAITING if the refund is approved // or remains PAID if the refund request is rejected. Status_PAID Status = 1 // The order is awaiting a refund, after a successful refund, the order is awarded the REFUNDED status. Status_REFUND_AWAITING Status = 2 // The order has been cancelled. Status_CANCELLED Status = 3 // The order was fully completed, i.e. all the tickets was used and all the service was implemented. // After the buyer has requested a refund, the status switches to REFUND_AWAITING if the refund is approved // or remains USED if the refund request is rejected. Status_USED Status = 4 // The funds for the order have been refunded. Status_REFUNDED Status = 5 )
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type Ticket ¶
type Ticket struct { TicketId string `protobuf:"bytes,1,opt,name=ticketId,json=ticket_id,proto3" json:"ticketId,omitempty"` Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=cinema_orders_service.Status" json:"status,omitempty"` Price *Price `protobuf:"bytes,3,opt,name=price,proto3" json:"price,omitempty"` Place *Place `protobuf:"bytes,4,opt,name=place,proto3" json:"place,omitempty"` // contains filtered or unexported fields }
func (*Ticket) Descriptor
deprecated
func (*Ticket) GetTicketId ¶
func (*Ticket) ProtoMessage ¶
func (*Ticket) ProtoMessage()
func (*Ticket) ProtoReflect ¶
func (x *Ticket) ProtoReflect() protoreflect.Message
type Timestamp ¶
type Timestamp struct { // Time in format RFC3339, time must be in UTC // example: 2023-11-10T23:00:00Z FormattedTimestamp string `protobuf:"bytes,1,opt,name=formattedTimestamp,json=formatted_timestamp,proto3" json:"formattedTimestamp,omitempty"` // contains filtered or unexported fields }
func (*Timestamp) Descriptor
deprecated
func (*Timestamp) GetFormattedTimestamp ¶
func (*Timestamp) ProtoMessage ¶
func (*Timestamp) ProtoMessage()
func (*Timestamp) ProtoReflect ¶
func (x *Timestamp) ProtoReflect() protoreflect.Message
type UnimplementedCinemaOrdersServiceV1Server ¶
type UnimplementedCinemaOrdersServiceV1Server struct { }
UnimplementedCinemaOrdersServiceV1Server must be embedded to have forward compatible implementations.
func (UnimplementedCinemaOrdersServiceV1Server) CancelReservation ¶
func (UnimplementedCinemaOrdersServiceV1Server) CancelReservation(context.Context, *CancelReservationRequest) (*emptypb.Empty, error)
func (UnimplementedCinemaOrdersServiceV1Server) GetOccupiedPlaces ¶
func (UnimplementedCinemaOrdersServiceV1Server) GetOccupiedPlaces(context.Context, *GetOccupiedPlacesRequest) (*Places, error)
func (UnimplementedCinemaOrdersServiceV1Server) GetOrder ¶
func (UnimplementedCinemaOrdersServiceV1Server) GetOrder(context.Context, *GetOrderRequest) (*Order, error)
func (UnimplementedCinemaOrdersServiceV1Server) GetOrders ¶
func (UnimplementedCinemaOrdersServiceV1Server) GetOrders(context.Context, *GetOrdersRequest) (*OrdersPreviews, error)
func (UnimplementedCinemaOrdersServiceV1Server) GetScreeningsOccupiedPlacesCounts ¶
func (UnimplementedCinemaOrdersServiceV1Server) GetScreeningsOccupiedPlacesCounts(context.Context, *GetScreeningsOccupiedPlacesCountsRequest) (*ScreeningsOccupiedPlacesCount, error)
func (UnimplementedCinemaOrdersServiceV1Server) ProcessOrder ¶
func (UnimplementedCinemaOrdersServiceV1Server) ProcessOrder(context.Context, *ProcessOrderRequest) (*ProcessOrderResponse, error)
func (UnimplementedCinemaOrdersServiceV1Server) RefundOrder ¶
func (UnimplementedCinemaOrdersServiceV1Server) RefundOrder(context.Context, *RefundOrderRequest) (*emptypb.Empty, error)
func (UnimplementedCinemaOrdersServiceV1Server) ReservePlaces ¶
func (UnimplementedCinemaOrdersServiceV1Server) ReservePlaces(context.Context, *ReservePlacesRequest) (*ReservePlacesResponse, error)
type UnsafeCinemaOrdersServiceV1Server ¶
type UnsafeCinemaOrdersServiceV1Server interface {
// contains filtered or unexported methods
}
UnsafeCinemaOrdersServiceV1Server may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CinemaOrdersServiceV1Server will result in compilation errors.