Documentation ¶
Index ¶
- Variables
- func NewCartEndpoints() []*api.Endpoint
- func RegisterCartHandler(s server.Server, hdlr CartHandler, opts ...server.HandlerOption) error
- type CartAll
- type CartFindAll
- type CartHandler
- type CartID
- type CartInfo
- func (*CartInfo) Descriptor() ([]byte, []int)deprecated
- func (x *CartInfo) GetId() int64
- func (x *CartInfo) GetNum() int64
- func (x *CartInfo) GetProductId() int64
- func (x *CartInfo) GetSize() int64
- func (x *CartInfo) GetUserId() int64
- 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_cart_proto protoreflect.FileDescriptor
Functions ¶
func NewCartEndpoints ¶
func RegisterCartHandler ¶
func RegisterCartHandler(s server.Server, hdlr CartHandler, opts ...server.HandlerOption) error
Types ¶
type CartAll ¶
type CartAll struct { CartInfo []*CartInfo `protobuf:"bytes,1,rep,name=cart_info,json=cartInfo,proto3" json:"cart_info,omitempty"` // contains filtered or unexported fields }
func (*CartAll) Descriptor
deprecated
func (*CartAll) GetCartInfo ¶
func (*CartAll) ProtoMessage ¶
func (*CartAll) ProtoMessage()
func (*CartAll) ProtoReflect ¶
func (x *CartAll) ProtoReflect() protoreflect.Message
type CartFindAll ¶
type CartFindAll struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*CartFindAll) Descriptor
deprecated
func (*CartFindAll) Descriptor() ([]byte, []int)
Deprecated: Use CartFindAll.ProtoReflect.Descriptor instead.
func (*CartFindAll) GetUserId ¶
func (x *CartFindAll) GetUserId() int64
func (*CartFindAll) ProtoMessage ¶
func (*CartFindAll) ProtoMessage()
func (*CartFindAll) ProtoReflect ¶
func (x *CartFindAll) ProtoReflect() protoreflect.Message
func (*CartFindAll) Reset ¶
func (x *CartFindAll) Reset()
func (*CartFindAll) String ¶
func (x *CartFindAll) String() string
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, *CartFindAll, *CartAll) error }
type CartID ¶
type CartID struct { Id int64 `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 int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` ProductId int64 `protobuf:"varint,3,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` Num int64 `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 *CartFindAll, opts ...client.CallOption) (*CartAll, error) }
func NewCartService ¶
func NewCartService(name string, c client.Client) CartService
type Clean ¶
type Clean struct { UserId int64 `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 int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` ChangeNum int64 `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 int64 `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() int64
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.