Documentation ¶
Index ¶
- Variables
- func NewCartEndpoints() []*api.Endpoint
- func RegisterCartHandler(s server.Server, hdlr CartHandler, opts ...server.HandlerOption) error
- type AllRequest
- type CartAll
- type CartHandler
- type CartId
- type CartInfo
- func (*CartInfo) Descriptor() ([]byte, []int)deprecated
- func (x *CartInfo) GetId() uint64
- func (x *CartInfo) GetNum() uint64
- func (x *CartInfo) GetProductId() uint64
- func (x *CartInfo) GetSizeId() uint64
- func (x *CartInfo) GetUserId() uint64
- func (*CartInfo) ProtoMessage()
- func (x *CartInfo) ProtoReflect() protoreflect.Message
- func (x *CartInfo) Reset()
- func (x *CartInfo) String() string
- type CartService
- type Clean
- type Item
- type Response
- type ResponseAdd
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_cart_proto protoreflect.FileDescriptor
Functions ¶
func NewCartEndpoints ¶
func RegisterCartHandler ¶
func RegisterCartHandler(s server.Server, hdlr CartHandler, opts ...server.HandlerOption) error
Types ¶
type AllRequest ¶
type AllRequest struct { UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*AllRequest) Descriptor
deprecated
func (*AllRequest) Descriptor() ([]byte, []int)
Deprecated: Use AllRequest.ProtoReflect.Descriptor instead.
func (*AllRequest) GetUserId ¶
func (x *AllRequest) GetUserId() uint64
func (*AllRequest) ProtoMessage ¶
func (*AllRequest) ProtoMessage()
func (*AllRequest) ProtoReflect ¶
func (x *AllRequest) ProtoReflect() protoreflect.Message
func (*AllRequest) Reset ¶
func (x *AllRequest) Reset()
func (*AllRequest) String ¶
func (x *AllRequest) String() string
type CartAll ¶
type CartAll struct { AllCartInfos []*CartInfo `protobuf:"bytes,1,rep,name=all_cart_infos,json=allCartInfos,proto3" json:"all_cart_infos,omitempty"` // contains filtered or unexported fields }
func (*CartAll) Descriptor
deprecated
func (*CartAll) GetAllCartInfos ¶
func (*CartAll) ProtoMessage ¶
func (*CartAll) ProtoMessage()
func (*CartAll) ProtoReflect ¶
func (x *CartAll) ProtoReflect() protoreflect.Message
type CartHandler ¶
type CartHandler interface { AddCart(context.Context, *CartInfo, *ResponseAdd) error CleanCart(context.Context, *Clean, *Response) error Incr(context.Context, *Item, *Response) error Decr(context.Context, *Item, *Response) error DeleteItemById(context.Context, *CartId, *Response) error GetAll(context.Context, *AllRequest, *CartAll) error }
type CartId ¶
type CartId struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CartId) Descriptor
deprecated
func (*CartId) ProtoMessage ¶
func (*CartId) ProtoMessage()
func (*CartId) ProtoReflect ¶
func (x *CartId) ProtoReflect() protoreflect.Message
type CartInfo ¶
type CartInfo struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` UserId uint64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` ProductId uint64 `protobuf:"varint,3,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` SizeId uint64 `protobuf:"varint,4,opt,name=size_id,json=sizeId,proto3" json:"size_id,omitempty"` Num uint64 `protobuf:"varint,5,opt,name=num,proto3" json:"num,omitempty"` // contains filtered or unexported fields }
func (*CartInfo) Descriptor
deprecated
func (*CartInfo) GetProductId ¶
func (*CartInfo) ProtoMessage ¶
func (*CartInfo) ProtoMessage()
func (*CartInfo) ProtoReflect ¶
func (x *CartInfo) ProtoReflect() protoreflect.Message
type CartService ¶
type CartService interface { AddCart(ctx context.Context, in *CartInfo, opts ...client.CallOption) (*ResponseAdd, error) CleanCart(ctx context.Context, in *Clean, opts ...client.CallOption) (*Response, error) Incr(ctx context.Context, in *Item, opts ...client.CallOption) (*Response, error) Decr(ctx context.Context, in *Item, opts ...client.CallOption) (*Response, error) DeleteItemById(ctx context.Context, in *CartId, opts ...client.CallOption) (*Response, error) GetAll(ctx context.Context, in *AllRequest, opts ...client.CallOption) (*CartAll, error) }
func NewCartService ¶
func NewCartService(name string, c client.Client) CartService
type Clean ¶
type Clean struct { UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*Clean) Descriptor
deprecated
func (*Clean) ProtoMessage ¶
func (*Clean) ProtoMessage()
func (*Clean) ProtoReflect ¶
func (x *Clean) ProtoReflect() protoreflect.Message
type Item ¶
type Item struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` ChangeNum uint64 `protobuf:"varint,2,opt,name=change_num,json=changeNum,proto3" json:"change_num,omitempty"` // contains filtered or unexported fields }
func (*Item) Descriptor
deprecated
func (*Item) GetChangeNum ¶
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
func (*Item) ProtoReflect ¶
func (x *Item) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type ResponseAdd ¶
type ResponseAdd struct { CartId uint64 `protobuf:"varint,1,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*ResponseAdd) Descriptor
deprecated
func (*ResponseAdd) Descriptor() ([]byte, []int)
Deprecated: Use ResponseAdd.ProtoReflect.Descriptor instead.
func (*ResponseAdd) GetCartId ¶
func (x *ResponseAdd) GetCartId() uint64
func (*ResponseAdd) GetMsg ¶
func (x *ResponseAdd) GetMsg() string
func (*ResponseAdd) ProtoMessage ¶
func (*ResponseAdd) ProtoMessage()
func (*ResponseAdd) ProtoReflect ¶
func (x *ResponseAdd) ProtoReflect() protoreflect.Message
func (*ResponseAdd) Reset ¶
func (x *ResponseAdd) Reset()
func (*ResponseAdd) String ¶
func (x *ResponseAdd) String() string
Click to show internal directories.
Click to hide internal directories.