Documentation ¶
Index ¶
- Variables
- func NewPurchaseEndpoints() []*api.Endpoint
- func RegisterPurchaseHandler(s server.Server, hdlr PurchaseHandler, opts ...server.HandlerOption) error
- type AddItemRequest
- func (*AddItemRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddItemRequest) GetCartid() string
- func (x *AddItemRequest) GetCount() int64
- func (x *AddItemRequest) GetItemid() string
- func (*AddItemRequest) ProtoMessage()
- func (x *AddItemRequest) ProtoReflect() protoreflect.Message
- func (x *AddItemRequest) Reset()
- func (x *AddItemRequest) String() string
- type AddItemResponse
- type Cart
- type CartItem
- type CheckoutRequest
- type CheckoutResponse
- func (*CheckoutResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CheckoutResponse) GetOrderTicket() *OrderTicket
- func (*CheckoutResponse) ProtoMessage()
- func (x *CheckoutResponse) ProtoReflect() protoreflect.Message
- func (x *CheckoutResponse) Reset()
- func (x *CheckoutResponse) String() string
- type CloseCartRequest
- type CloseCartResponse
- type CreateCartRequest
- type CreateCartResponse
- type GetCartContentsRequest
- func (*GetCartContentsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetCartContentsRequest) GetCartid() string
- func (*GetCartContentsRequest) ProtoMessage()
- func (x *GetCartContentsRequest) ProtoReflect() protoreflect.Message
- func (x *GetCartContentsRequest) Reset()
- func (x *GetCartContentsRequest) String() string
- type GetCartContentsResponse
- func (*GetCartContentsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetCartContentsResponse) GetCartItems() []*CartItem
- func (x *GetCartContentsResponse) GetCartid() string
- func (*GetCartContentsResponse) ProtoMessage()
- func (x *GetCartContentsResponse) ProtoReflect() protoreflect.Message
- func (x *GetCartContentsResponse) Reset()
- func (x *GetCartContentsResponse) String() string
- type GetCartRequest
- type GetCartResponse
- type GetOrderTicketRequest
- func (*GetOrderTicketRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetOrderTicketRequest) GetOrderid() string
- func (*GetOrderTicketRequest) ProtoMessage()
- func (x *GetOrderTicketRequest) ProtoReflect() protoreflect.Message
- func (x *GetOrderTicketRequest) Reset()
- func (x *GetOrderTicketRequest) String() string
- type GetOrderTicketResponse
- func (*GetOrderTicketResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetOrderTicketResponse) GetOrderTicket() *OrderTicket
- func (*GetOrderTicketResponse) ProtoMessage()
- func (x *GetOrderTicketResponse) ProtoReflect() protoreflect.Message
- func (x *GetOrderTicketResponse) Reset()
- func (x *GetOrderTicketResponse) String() string
- type OrderTicket
- func (*OrderTicket) Descriptor() ([]byte, []int)deprecated
- func (x *OrderTicket) GetCartItems() []*CartItem
- func (x *OrderTicket) GetOrderid() string
- func (x *OrderTicket) GetStatus() string
- func (*OrderTicket) ProtoMessage()
- func (x *OrderTicket) ProtoReflect() protoreflect.Message
- func (x *OrderTicket) Reset()
- func (x *OrderTicket) String() string
- type PurchaseHandler
- type PurchaseService
Constants ¶
This section is empty.
Variables ¶
var File_proto_purchase_purchase_proto protoreflect.FileDescriptor
Functions ¶
func NewPurchaseEndpoints ¶
func RegisterPurchaseHandler ¶
func RegisterPurchaseHandler(s server.Server, hdlr PurchaseHandler, opts ...server.HandlerOption) error
Types ¶
type AddItemRequest ¶
type AddItemRequest struct { Cartid string `protobuf:"bytes,1,opt,name=cartid,proto3" json:"cartid,omitempty"` Itemid string `protobuf:"bytes,2,opt,name=itemid,proto3" json:"itemid,omitempty"` Count int64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*AddItemRequest) Descriptor
deprecated
func (*AddItemRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddItemRequest.ProtoReflect.Descriptor instead.
func (*AddItemRequest) GetCartid ¶
func (x *AddItemRequest) GetCartid() string
func (*AddItemRequest) GetCount ¶
func (x *AddItemRequest) GetCount() int64
func (*AddItemRequest) GetItemid ¶
func (x *AddItemRequest) GetItemid() string
func (*AddItemRequest) ProtoMessage ¶
func (*AddItemRequest) ProtoMessage()
func (*AddItemRequest) ProtoReflect ¶
func (x *AddItemRequest) ProtoReflect() protoreflect.Message
func (*AddItemRequest) Reset ¶
func (x *AddItemRequest) Reset()
func (*AddItemRequest) String ¶
func (x *AddItemRequest) String() string
type AddItemResponse ¶
type AddItemResponse struct { CartItems []*CartItem `protobuf:"bytes,1,rep,name=cart_items,json=cartItems,proto3" json:"cart_items,omitempty"` // contains filtered or unexported fields }
func (*AddItemResponse) Descriptor
deprecated
func (*AddItemResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddItemResponse.ProtoReflect.Descriptor instead.
func (*AddItemResponse) GetCartItems ¶
func (x *AddItemResponse) GetCartItems() []*CartItem
func (*AddItemResponse) ProtoMessage ¶
func (*AddItemResponse) ProtoMessage()
func (*AddItemResponse) ProtoReflect ¶
func (x *AddItemResponse) ProtoReflect() protoreflect.Message
func (*AddItemResponse) Reset ¶
func (x *AddItemResponse) Reset()
func (*AddItemResponse) String ¶
func (x *AddItemResponse) String() string
type Cart ¶
type Cart struct { Cartid string `protobuf:"bytes,1,opt,name=cartid,proto3" json:"cartid,omitempty"` Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*Cart) Descriptor
deprecated
func (*Cart) ProtoMessage ¶
func (*Cart) ProtoMessage()
func (*Cart) ProtoReflect ¶
func (x *Cart) ProtoReflect() protoreflect.Message
type CartItem ¶
type CartItem struct { Itemid string `protobuf:"bytes,1,opt,name=itemid,proto3" json:"itemid,omitempty"` Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*CartItem) Descriptor
deprecated
func (*CartItem) ProtoMessage ¶
func (*CartItem) ProtoMessage()
func (*CartItem) ProtoReflect ¶
func (x *CartItem) ProtoReflect() protoreflect.Message
type CheckoutRequest ¶
type CheckoutRequest struct { Cartid string `protobuf:"bytes,1,opt,name=cartid,proto3" json:"cartid,omitempty"` // contains filtered or unexported fields }
func (*CheckoutRequest) Descriptor
deprecated
func (*CheckoutRequest) Descriptor() ([]byte, []int)
Deprecated: Use CheckoutRequest.ProtoReflect.Descriptor instead.
func (*CheckoutRequest) GetCartid ¶
func (x *CheckoutRequest) GetCartid() string
func (*CheckoutRequest) ProtoMessage ¶
func (*CheckoutRequest) ProtoMessage()
func (*CheckoutRequest) ProtoReflect ¶
func (x *CheckoutRequest) ProtoReflect() protoreflect.Message
func (*CheckoutRequest) Reset ¶
func (x *CheckoutRequest) Reset()
func (*CheckoutRequest) String ¶
func (x *CheckoutRequest) String() string
type CheckoutResponse ¶
type CheckoutResponse struct { OrderTicket *OrderTicket `protobuf:"bytes,1,opt,name=order_ticket,json=orderTicket,proto3" json:"order_ticket,omitempty"` // contains filtered or unexported fields }
func (*CheckoutResponse) Descriptor
deprecated
func (*CheckoutResponse) Descriptor() ([]byte, []int)
Deprecated: Use CheckoutResponse.ProtoReflect.Descriptor instead.
func (*CheckoutResponse) GetOrderTicket ¶
func (x *CheckoutResponse) GetOrderTicket() *OrderTicket
func (*CheckoutResponse) ProtoMessage ¶
func (*CheckoutResponse) ProtoMessage()
func (*CheckoutResponse) ProtoReflect ¶
func (x *CheckoutResponse) ProtoReflect() protoreflect.Message
func (*CheckoutResponse) Reset ¶
func (x *CheckoutResponse) Reset()
func (*CheckoutResponse) String ¶
func (x *CheckoutResponse) String() string
type CloseCartRequest ¶
type CloseCartRequest struct { Cartid string `protobuf:"bytes,1,opt,name=cartid,proto3" json:"cartid,omitempty"` // contains filtered or unexported fields }
func (*CloseCartRequest) Descriptor
deprecated
func (*CloseCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use CloseCartRequest.ProtoReflect.Descriptor instead.
func (*CloseCartRequest) GetCartid ¶
func (x *CloseCartRequest) GetCartid() string
func (*CloseCartRequest) ProtoMessage ¶
func (*CloseCartRequest) ProtoMessage()
func (*CloseCartRequest) ProtoReflect ¶
func (x *CloseCartRequest) ProtoReflect() protoreflect.Message
func (*CloseCartRequest) Reset ¶
func (x *CloseCartRequest) Reset()
func (*CloseCartRequest) String ¶
func (x *CloseCartRequest) String() string
type CloseCartResponse ¶
type CloseCartResponse struct { Cart *Cart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"` // contains filtered or unexported fields }
func (*CloseCartResponse) Descriptor
deprecated
func (*CloseCartResponse) Descriptor() ([]byte, []int)
Deprecated: Use CloseCartResponse.ProtoReflect.Descriptor instead.
func (*CloseCartResponse) GetCart ¶
func (x *CloseCartResponse) GetCart() *Cart
func (*CloseCartResponse) ProtoMessage ¶
func (*CloseCartResponse) ProtoMessage()
func (*CloseCartResponse) ProtoReflect ¶
func (x *CloseCartResponse) ProtoReflect() protoreflect.Message
func (*CloseCartResponse) Reset ¶
func (x *CloseCartResponse) Reset()
func (*CloseCartResponse) String ¶
func (x *CloseCartResponse) String() string
type CreateCartRequest ¶
type CreateCartRequest struct { Cartid string `protobuf:"bytes,1,opt,name=cartid,proto3" json:"cartid,omitempty"` // contains filtered or unexported fields }
func (*CreateCartRequest) Descriptor
deprecated
func (*CreateCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateCartRequest.ProtoReflect.Descriptor instead.
func (*CreateCartRequest) GetCartid ¶
func (x *CreateCartRequest) GetCartid() string
func (*CreateCartRequest) ProtoMessage ¶
func (*CreateCartRequest) ProtoMessage()
func (*CreateCartRequest) ProtoReflect ¶
func (x *CreateCartRequest) ProtoReflect() protoreflect.Message
func (*CreateCartRequest) Reset ¶
func (x *CreateCartRequest) Reset()
func (*CreateCartRequest) String ¶
func (x *CreateCartRequest) String() string
type CreateCartResponse ¶
type CreateCartResponse struct { Cart *Cart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"` // contains filtered or unexported fields }
func (*CreateCartResponse) Descriptor
deprecated
func (*CreateCartResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateCartResponse.ProtoReflect.Descriptor instead.
func (*CreateCartResponse) GetCart ¶
func (x *CreateCartResponse) GetCart() *Cart
func (*CreateCartResponse) ProtoMessage ¶
func (*CreateCartResponse) ProtoMessage()
func (*CreateCartResponse) ProtoReflect ¶
func (x *CreateCartResponse) ProtoReflect() protoreflect.Message
func (*CreateCartResponse) Reset ¶
func (x *CreateCartResponse) Reset()
func (*CreateCartResponse) String ¶
func (x *CreateCartResponse) String() string
type GetCartContentsRequest ¶
type GetCartContentsRequest struct { Cartid string `protobuf:"bytes,1,opt,name=cartid,proto3" json:"cartid,omitempty"` // contains filtered or unexported fields }
func (*GetCartContentsRequest) Descriptor
deprecated
func (*GetCartContentsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetCartContentsRequest.ProtoReflect.Descriptor instead.
func (*GetCartContentsRequest) GetCartid ¶
func (x *GetCartContentsRequest) GetCartid() string
func (*GetCartContentsRequest) ProtoMessage ¶
func (*GetCartContentsRequest) ProtoMessage()
func (*GetCartContentsRequest) ProtoReflect ¶
func (x *GetCartContentsRequest) ProtoReflect() protoreflect.Message
func (*GetCartContentsRequest) Reset ¶
func (x *GetCartContentsRequest) Reset()
func (*GetCartContentsRequest) String ¶
func (x *GetCartContentsRequest) String() string
type GetCartContentsResponse ¶
type GetCartContentsResponse struct { Cartid string `protobuf:"bytes,1,opt,name=cartid,proto3" json:"cartid,omitempty"` CartItems []*CartItem `protobuf:"bytes,2,rep,name=cart_items,json=cartItems,proto3" json:"cart_items,omitempty"` // contains filtered or unexported fields }
func (*GetCartContentsResponse) Descriptor
deprecated
func (*GetCartContentsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetCartContentsResponse.ProtoReflect.Descriptor instead.
func (*GetCartContentsResponse) GetCartItems ¶
func (x *GetCartContentsResponse) GetCartItems() []*CartItem
func (*GetCartContentsResponse) GetCartid ¶
func (x *GetCartContentsResponse) GetCartid() string
func (*GetCartContentsResponse) ProtoMessage ¶
func (*GetCartContentsResponse) ProtoMessage()
func (*GetCartContentsResponse) ProtoReflect ¶
func (x *GetCartContentsResponse) ProtoReflect() protoreflect.Message
func (*GetCartContentsResponse) Reset ¶
func (x *GetCartContentsResponse) Reset()
func (*GetCartContentsResponse) String ¶
func (x *GetCartContentsResponse) String() string
type GetCartRequest ¶
type GetCartRequest struct { Cartid string `protobuf:"bytes,1,opt,name=cartid,proto3" json:"cartid,omitempty"` // contains filtered or unexported fields }
func (*GetCartRequest) Descriptor
deprecated
func (*GetCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetCartRequest.ProtoReflect.Descriptor instead.
func (*GetCartRequest) GetCartid ¶
func (x *GetCartRequest) GetCartid() string
func (*GetCartRequest) ProtoMessage ¶
func (*GetCartRequest) ProtoMessage()
func (*GetCartRequest) ProtoReflect ¶
func (x *GetCartRequest) ProtoReflect() protoreflect.Message
func (*GetCartRequest) Reset ¶
func (x *GetCartRequest) Reset()
func (*GetCartRequest) String ¶
func (x *GetCartRequest) String() string
type GetCartResponse ¶
type GetCartResponse struct { Cart *Cart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"` // contains filtered or unexported fields }
func (*GetCartResponse) Descriptor
deprecated
func (*GetCartResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetCartResponse.ProtoReflect.Descriptor instead.
func (*GetCartResponse) GetCart ¶
func (x *GetCartResponse) GetCart() *Cart
func (*GetCartResponse) ProtoMessage ¶
func (*GetCartResponse) ProtoMessage()
func (*GetCartResponse) ProtoReflect ¶
func (x *GetCartResponse) ProtoReflect() protoreflect.Message
func (*GetCartResponse) Reset ¶
func (x *GetCartResponse) Reset()
func (*GetCartResponse) String ¶
func (x *GetCartResponse) String() string
type GetOrderTicketRequest ¶
type GetOrderTicketRequest struct { Orderid string `protobuf:"bytes,1,opt,name=orderid,proto3" json:"orderid,omitempty"` // contains filtered or unexported fields }
func (*GetOrderTicketRequest) Descriptor
deprecated
func (*GetOrderTicketRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderTicketRequest.ProtoReflect.Descriptor instead.
func (*GetOrderTicketRequest) GetOrderid ¶
func (x *GetOrderTicketRequest) GetOrderid() string
func (*GetOrderTicketRequest) ProtoMessage ¶
func (*GetOrderTicketRequest) ProtoMessage()
func (*GetOrderTicketRequest) ProtoReflect ¶
func (x *GetOrderTicketRequest) ProtoReflect() protoreflect.Message
func (*GetOrderTicketRequest) Reset ¶
func (x *GetOrderTicketRequest) Reset()
func (*GetOrderTicketRequest) String ¶
func (x *GetOrderTicketRequest) String() string
type GetOrderTicketResponse ¶
type GetOrderTicketResponse struct { OrderTicket *OrderTicket `protobuf:"bytes,1,opt,name=order_ticket,json=orderTicket,proto3" json:"order_ticket,omitempty"` // contains filtered or unexported fields }
func (*GetOrderTicketResponse) Descriptor
deprecated
func (*GetOrderTicketResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderTicketResponse.ProtoReflect.Descriptor instead.
func (*GetOrderTicketResponse) GetOrderTicket ¶
func (x *GetOrderTicketResponse) GetOrderTicket() *OrderTicket
func (*GetOrderTicketResponse) ProtoMessage ¶
func (*GetOrderTicketResponse) ProtoMessage()
func (*GetOrderTicketResponse) ProtoReflect ¶
func (x *GetOrderTicketResponse) ProtoReflect() protoreflect.Message
func (*GetOrderTicketResponse) Reset ¶
func (x *GetOrderTicketResponse) Reset()
func (*GetOrderTicketResponse) String ¶
func (x *GetOrderTicketResponse) String() string
type OrderTicket ¶
type OrderTicket struct { Orderid string `protobuf:"bytes,1,opt,name=orderid,proto3" json:"orderid,omitempty"` Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` CartItems []*CartItem `protobuf:"bytes,4,rep,name=cart_items,json=cartItems,proto3" json:"cart_items,omitempty"` // contains filtered or unexported fields }
func (*OrderTicket) Descriptor
deprecated
func (*OrderTicket) Descriptor() ([]byte, []int)
Deprecated: Use OrderTicket.ProtoReflect.Descriptor instead.
func (*OrderTicket) GetCartItems ¶
func (x *OrderTicket) GetCartItems() []*CartItem
func (*OrderTicket) GetOrderid ¶
func (x *OrderTicket) GetOrderid() string
func (*OrderTicket) GetStatus ¶
func (x *OrderTicket) GetStatus() string
func (*OrderTicket) ProtoMessage ¶
func (*OrderTicket) ProtoMessage()
func (*OrderTicket) ProtoReflect ¶
func (x *OrderTicket) ProtoReflect() protoreflect.Message
func (*OrderTicket) Reset ¶
func (x *OrderTicket) Reset()
func (*OrderTicket) String ¶
func (x *OrderTicket) String() string
type PurchaseHandler ¶
type PurchaseHandler interface { CreateCart(context.Context, *CreateCartRequest, *CreateCartResponse) error GetCart(context.Context, *GetCartRequest, *GetCartResponse) error AddItem(context.Context, *AddItemRequest, *AddItemResponse) error GetCartContents(context.Context, *GetCartContentsRequest, *GetCartContentsResponse) error CloseCart(context.Context, *CloseCartRequest, *CloseCartResponse) error Checkout(context.Context, *CheckoutRequest, *CheckoutResponse) error GetOrderTicket(context.Context, *GetOrderTicketRequest, *GetOrderTicketResponse) error }
type PurchaseService ¶
type PurchaseService interface { CreateCart(ctx context.Context, in *CreateCartRequest, opts ...client.CallOption) (*CreateCartResponse, error) GetCart(ctx context.Context, in *GetCartRequest, opts ...client.CallOption) (*GetCartResponse, error) AddItem(ctx context.Context, in *AddItemRequest, opts ...client.CallOption) (*AddItemResponse, error) GetCartContents(ctx context.Context, in *GetCartContentsRequest, opts ...client.CallOption) (*GetCartContentsResponse, error) CloseCart(ctx context.Context, in *CloseCartRequest, opts ...client.CallOption) (*CloseCartResponse, error) Checkout(ctx context.Context, in *CheckoutRequest, opts ...client.CallOption) (*CheckoutResponse, error) GetOrderTicket(ctx context.Context, in *GetOrderTicketRequest, opts ...client.CallOption) (*GetOrderTicketResponse, error) }
func NewPurchaseService ¶
func NewPurchaseService(name string, c client.Client) PurchaseService