Documentation
¶
Index ¶
- Variables
- type CreateProductReq
- func (*CreateProductReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateProductReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *CreateProductReq) FastWrite(buf []byte) (offset int)
- func (x *CreateProductReq) GetProduct() *Product
- func (*CreateProductReq) ProtoMessage()
- func (x *CreateProductReq) ProtoReflect() protoreflect.Message
- func (x *CreateProductReq) Reset()
- func (x *CreateProductReq) Size() (n int)
- func (x *CreateProductReq) String() string
- type CreateProductResp
- func (*CreateProductResp) Descriptor() ([]byte, []int)deprecated
- func (x *CreateProductResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *CreateProductResp) FastWrite(buf []byte) (offset int)
- func (x *CreateProductResp) GetProductId() int64
- func (*CreateProductResp) ProtoMessage()
- func (x *CreateProductResp) ProtoReflect() protoreflect.Message
- func (x *CreateProductResp) Reset()
- func (x *CreateProductResp) Size() (n int)
- func (x *CreateProductResp) String() string
- type DeleteProductReq
- func (*DeleteProductReq) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteProductReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *DeleteProductReq) FastWrite(buf []byte) (offset int)
- func (x *DeleteProductReq) GetId() int64
- func (*DeleteProductReq) ProtoMessage()
- func (x *DeleteProductReq) ProtoReflect() protoreflect.Message
- func (x *DeleteProductReq) Reset()
- func (x *DeleteProductReq) Size() (n int)
- func (x *DeleteProductReq) String() string
- type DeleteProductResp
- func (*DeleteProductResp) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteProductResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *DeleteProductResp) FastWrite(buf []byte) (offset int)
- func (x *DeleteProductResp) GetMessage() string
- func (x *DeleteProductResp) GetSuccess() bool
- func (*DeleteProductResp) ProtoMessage()
- func (x *DeleteProductResp) ProtoReflect() protoreflect.Message
- func (x *DeleteProductResp) Reset()
- func (x *DeleteProductResp) Size() (n int)
- func (x *DeleteProductResp) String() string
- type GetProductReq
- func (*GetProductReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetProductReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *GetProductReq) FastWrite(buf []byte) (offset int)
- func (x *GetProductReq) GetId() int64
- func (*GetProductReq) ProtoMessage()
- func (x *GetProductReq) ProtoReflect() protoreflect.Message
- func (x *GetProductReq) Reset()
- func (x *GetProductReq) Size() (n int)
- func (x *GetProductReq) String() string
- type GetProductResp
- func (*GetProductResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetProductResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *GetProductResp) FastWrite(buf []byte) (offset int)
- func (x *GetProductResp) GetProduct() *Product
- func (*GetProductResp) ProtoMessage()
- func (x *GetProductResp) ProtoReflect() protoreflect.Message
- func (x *GetProductResp) Reset()
- func (x *GetProductResp) Size() (n int)
- func (x *GetProductResp) String() string
- type GetProductsBatchReq
- func (*GetProductsBatchReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetProductsBatchReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *GetProductsBatchReq) FastWrite(buf []byte) (offset int)
- func (x *GetProductsBatchReq) GetIds() []int64
- func (*GetProductsBatchReq) ProtoMessage()
- func (x *GetProductsBatchReq) ProtoReflect() protoreflect.Message
- func (x *GetProductsBatchReq) Reset()
- func (x *GetProductsBatchReq) Size() (n int)
- func (x *GetProductsBatchReq) String() string
- type GetProductsBatchResp
- func (*GetProductsBatchResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetProductsBatchResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *GetProductsBatchResp) FastWrite(buf []byte) (offset int)
- func (x *GetProductsBatchResp) GetProducts() []*Product
- func (*GetProductsBatchResp) ProtoMessage()
- func (x *GetProductsBatchResp) ProtoReflect() protoreflect.Message
- func (x *GetProductsBatchResp) Reset()
- func (x *GetProductsBatchResp) Size() (n int)
- func (x *GetProductsBatchResp) String() string
- type ListProductsReq
- func (*ListProductsReq) Descriptor() ([]byte, []int)deprecated
- func (x *ListProductsReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *ListProductsReq) FastWrite(buf []byte) (offset int)
- func (x *ListProductsReq) GetCategoryName() string
- func (x *ListProductsReq) GetPage() int32
- func (x *ListProductsReq) GetPageSize() int64
- func (*ListProductsReq) ProtoMessage()
- func (x *ListProductsReq) ProtoReflect() protoreflect.Message
- func (x *ListProductsReq) Reset()
- func (x *ListProductsReq) Size() (n int)
- func (x *ListProductsReq) String() string
- type ListProductsResp
- func (*ListProductsResp) Descriptor() ([]byte, []int)deprecated
- func (x *ListProductsResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *ListProductsResp) FastWrite(buf []byte) (offset int)
- func (x *ListProductsResp) GetProducts() []*Product
- func (*ListProductsResp) ProtoMessage()
- func (x *ListProductsResp) ProtoReflect() protoreflect.Message
- func (x *ListProductsResp) Reset()
- func (x *ListProductsResp) Size() (n int)
- func (x *ListProductsResp) String() string
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *Product) FastWrite(buf []byte) (offset int)
- func (x *Product) GetCategories() []string
- func (x *Product) GetDescription() string
- func (x *Product) GetId() int64
- func (x *Product) GetImages() string
- func (x *Product) GetName() string
- func (x *Product) GetOriginalPrice() int64
- func (x *Product) GetPrice() int64
- func (x *Product) GetStatus() uint32
- func (x *Product) GetStock() int64
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) Size() (n int)
- func (x *Product) String() string
- type ProductCatalogService
- type SearchProductsReq
- func (*SearchProductsReq) Descriptor() ([]byte, []int)deprecated
- func (x *SearchProductsReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *SearchProductsReq) FastWrite(buf []byte) (offset int)
- func (x *SearchProductsReq) GetName() string
- func (*SearchProductsReq) ProtoMessage()
- func (x *SearchProductsReq) ProtoReflect() protoreflect.Message
- func (x *SearchProductsReq) Reset()
- func (x *SearchProductsReq) Size() (n int)
- func (x *SearchProductsReq) String() string
- type SearchProductsResp
- func (*SearchProductsResp) Descriptor() ([]byte, []int)deprecated
- func (x *SearchProductsResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *SearchProductsResp) FastWrite(buf []byte) (offset int)
- func (x *SearchProductsResp) GetResults() []*Product
- func (*SearchProductsResp) ProtoMessage()
- func (x *SearchProductsResp) ProtoReflect() protoreflect.Message
- func (x *SearchProductsResp) Reset()
- func (x *SearchProductsResp) Size() (n int)
- func (x *SearchProductsResp) String() string
- type UpdateProductReq
- func (*UpdateProductReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateProductReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *UpdateProductReq) FastWrite(buf []byte) (offset int)
- func (x *UpdateProductReq) GetProduct() *Product
- func (*UpdateProductReq) ProtoMessage()
- func (x *UpdateProductReq) ProtoReflect() protoreflect.Message
- func (x *UpdateProductReq) Reset()
- func (x *UpdateProductReq) Size() (n int)
- func (x *UpdateProductReq) String() string
- type UpdateProductResp
- func (*UpdateProductResp) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateProductResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *UpdateProductResp) FastWrite(buf []byte) (offset int)
- func (x *UpdateProductResp) GetMessage() string
- func (x *UpdateProductResp) GetSuccess() bool
- func (*UpdateProductResp) ProtoMessage()
- func (x *UpdateProductResp) ProtoReflect() protoreflect.Message
- func (x *UpdateProductResp) Reset()
- func (x *UpdateProductResp) Size() (n int)
- func (x *UpdateProductResp) String() string
Constants ¶
This section is empty.
Variables ¶
var File_product_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CreateProductReq ¶
type CreateProductReq struct { Product *Product `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"` // 要创建的商品信息(ID字段应留空) // contains filtered or unexported fields }
创建商品的请求消息。
func (*CreateProductReq) Descriptor
deprecated
func (*CreateProductReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateProductReq.ProtoReflect.Descriptor instead.
func (*CreateProductReq) FastWrite ¶
func (x *CreateProductReq) FastWrite(buf []byte) (offset int)
func (*CreateProductReq) GetProduct ¶
func (x *CreateProductReq) GetProduct() *Product
func (*CreateProductReq) ProtoMessage ¶
func (*CreateProductReq) ProtoMessage()
func (*CreateProductReq) ProtoReflect ¶
func (x *CreateProductReq) ProtoReflect() protoreflect.Message
func (*CreateProductReq) Reset ¶
func (x *CreateProductReq) Reset()
func (*CreateProductReq) Size ¶
func (x *CreateProductReq) Size() (n int)
func (*CreateProductReq) String ¶
func (x *CreateProductReq) String() string
type CreateProductResp ¶
type CreateProductResp struct { ProductId int64 `protobuf:"varint,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` // 创建的商品信息(包含生成的ID) // contains filtered or unexported fields }
创建商品的响应消息。
func (*CreateProductResp) Descriptor
deprecated
func (*CreateProductResp) Descriptor() ([]byte, []int)
Deprecated: Use CreateProductResp.ProtoReflect.Descriptor instead.
func (*CreateProductResp) FastWrite ¶
func (x *CreateProductResp) FastWrite(buf []byte) (offset int)
func (*CreateProductResp) GetProductId ¶
func (x *CreateProductResp) GetProductId() int64
func (*CreateProductResp) ProtoMessage ¶
func (*CreateProductResp) ProtoMessage()
func (*CreateProductResp) ProtoReflect ¶
func (x *CreateProductResp) ProtoReflect() protoreflect.Message
func (*CreateProductResp) Reset ¶
func (x *CreateProductResp) Reset()
func (*CreateProductResp) Size ¶
func (x *CreateProductResp) Size() (n int)
func (*CreateProductResp) String ¶
func (x *CreateProductResp) String() string
type DeleteProductReq ¶
type DeleteProductReq struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 要删除的商品ID // contains filtered or unexported fields }
删除商品的请求消息。
func (*DeleteProductReq) Descriptor
deprecated
func (*DeleteProductReq) Descriptor() ([]byte, []int)
Deprecated: Use DeleteProductReq.ProtoReflect.Descriptor instead.
func (*DeleteProductReq) FastWrite ¶
func (x *DeleteProductReq) FastWrite(buf []byte) (offset int)
func (*DeleteProductReq) GetId ¶
func (x *DeleteProductReq) GetId() int64
func (*DeleteProductReq) ProtoMessage ¶
func (*DeleteProductReq) ProtoMessage()
func (*DeleteProductReq) ProtoReflect ¶
func (x *DeleteProductReq) ProtoReflect() protoreflect.Message
func (*DeleteProductReq) Reset ¶
func (x *DeleteProductReq) Reset()
func (*DeleteProductReq) Size ¶
func (x *DeleteProductReq) Size() (n int)
func (*DeleteProductReq) String ¶
func (x *DeleteProductReq) String() string
type DeleteProductResp ¶
type DeleteProductResp struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // 是否删除成功 Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 操作结果消息 // contains filtered or unexported fields }
删除商品的响应消息。
func (*DeleteProductResp) Descriptor
deprecated
func (*DeleteProductResp) Descriptor() ([]byte, []int)
Deprecated: Use DeleteProductResp.ProtoReflect.Descriptor instead.
func (*DeleteProductResp) FastWrite ¶
func (x *DeleteProductResp) FastWrite(buf []byte) (offset int)
func (*DeleteProductResp) GetMessage ¶
func (x *DeleteProductResp) GetMessage() string
func (*DeleteProductResp) GetSuccess ¶
func (x *DeleteProductResp) GetSuccess() bool
func (*DeleteProductResp) ProtoMessage ¶
func (*DeleteProductResp) ProtoMessage()
func (*DeleteProductResp) ProtoReflect ¶
func (x *DeleteProductResp) ProtoReflect() protoreflect.Message
func (*DeleteProductResp) Reset ¶
func (x *DeleteProductResp) Reset()
func (*DeleteProductResp) Size ¶
func (x *DeleteProductResp) Size() (n int)
func (*DeleteProductResp) String ¶
func (x *DeleteProductResp) String() string
type GetProductReq ¶
type GetProductReq struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 商品 ID // contains filtered or unexported fields }
获取指定商品详细信息的请求消息
func (*GetProductReq) Descriptor
deprecated
func (*GetProductReq) Descriptor() ([]byte, []int)
Deprecated: Use GetProductReq.ProtoReflect.Descriptor instead.
func (*GetProductReq) FastWrite ¶
func (x *GetProductReq) FastWrite(buf []byte) (offset int)
func (*GetProductReq) GetId ¶
func (x *GetProductReq) GetId() int64
func (*GetProductReq) ProtoMessage ¶
func (*GetProductReq) ProtoMessage()
func (*GetProductReq) ProtoReflect ¶
func (x *GetProductReq) ProtoReflect() protoreflect.Message
func (*GetProductReq) Reset ¶
func (x *GetProductReq) Reset()
func (*GetProductReq) Size ¶
func (x *GetProductReq) Size() (n int)
func (*GetProductReq) String ¶
func (x *GetProductReq) String() string
type GetProductResp ¶
type GetProductResp struct { Product *Product `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"` // 商品详细信息。 // contains filtered or unexported fields }
获取指定商品详细信息的响应消息
func (*GetProductResp) Descriptor
deprecated
func (*GetProductResp) Descriptor() ([]byte, []int)
Deprecated: Use GetProductResp.ProtoReflect.Descriptor instead.
func (*GetProductResp) FastWrite ¶
func (x *GetProductResp) FastWrite(buf []byte) (offset int)
func (*GetProductResp) GetProduct ¶
func (x *GetProductResp) GetProduct() *Product
func (*GetProductResp) ProtoMessage ¶
func (*GetProductResp) ProtoMessage()
func (*GetProductResp) ProtoReflect ¶
func (x *GetProductResp) ProtoReflect() protoreflect.Message
func (*GetProductResp) Reset ¶
func (x *GetProductResp) Reset()
func (*GetProductResp) Size ¶
func (x *GetProductResp) Size() (n int)
func (*GetProductResp) String ¶
func (x *GetProductResp) String() string
type GetProductsBatchReq ¶
type GetProductsBatchReq struct { Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` // 要查询的商品ID列表。 // contains filtered or unexported fields }
查询多个商品信息的请求消息。
func (*GetProductsBatchReq) Descriptor
deprecated
func (*GetProductsBatchReq) Descriptor() ([]byte, []int)
Deprecated: Use GetProductsBatchReq.ProtoReflect.Descriptor instead.
func (*GetProductsBatchReq) FastWrite ¶
func (x *GetProductsBatchReq) FastWrite(buf []byte) (offset int)
func (*GetProductsBatchReq) GetIds ¶
func (x *GetProductsBatchReq) GetIds() []int64
func (*GetProductsBatchReq) ProtoMessage ¶
func (*GetProductsBatchReq) ProtoMessage()
func (*GetProductsBatchReq) ProtoReflect ¶
func (x *GetProductsBatchReq) ProtoReflect() protoreflect.Message
func (*GetProductsBatchReq) Reset ¶
func (x *GetProductsBatchReq) Reset()
func (*GetProductsBatchReq) Size ¶
func (x *GetProductsBatchReq) Size() (n int)
func (*GetProductsBatchReq) String ¶
func (x *GetProductsBatchReq) String() string
type GetProductsBatchResp ¶
type GetProductsBatchResp struct { Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"` // 查询到的商品信息列表(按请求中的ID顺序返回)。 // contains filtered or unexported fields }
查询多个商品信息的响应消息。
func (*GetProductsBatchResp) Descriptor
deprecated
func (*GetProductsBatchResp) Descriptor() ([]byte, []int)
Deprecated: Use GetProductsBatchResp.ProtoReflect.Descriptor instead.
func (*GetProductsBatchResp) FastWrite ¶
func (x *GetProductsBatchResp) FastWrite(buf []byte) (offset int)
func (*GetProductsBatchResp) GetProducts ¶
func (x *GetProductsBatchResp) GetProducts() []*Product
func (*GetProductsBatchResp) ProtoMessage ¶
func (*GetProductsBatchResp) ProtoMessage()
func (*GetProductsBatchResp) ProtoReflect ¶
func (x *GetProductsBatchResp) ProtoReflect() protoreflect.Message
func (*GetProductsBatchResp) Reset ¶
func (x *GetProductsBatchResp) Reset()
func (*GetProductsBatchResp) Size ¶
func (x *GetProductsBatchResp) Size() (n int)
func (*GetProductsBatchResp) String ¶
func (x *GetProductsBatchResp) String() string
type ListProductsReq ¶
type ListProductsReq struct { Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` // 当前页码 PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 每页商品数量 CategoryName string `protobuf:"bytes,3,opt,name=category_name,json=categoryName,proto3" json:"category_name,omitempty"` // 商品类别名称 // contains filtered or unexported fields }
列出商品的请求消息
func (*ListProductsReq) Descriptor
deprecated
func (*ListProductsReq) Descriptor() ([]byte, []int)
Deprecated: Use ListProductsReq.ProtoReflect.Descriptor instead.
func (*ListProductsReq) FastWrite ¶
func (x *ListProductsReq) FastWrite(buf []byte) (offset int)
func (*ListProductsReq) GetCategoryName ¶
func (x *ListProductsReq) GetCategoryName() string
func (*ListProductsReq) GetPage ¶
func (x *ListProductsReq) GetPage() int32
func (*ListProductsReq) GetPageSize ¶
func (x *ListProductsReq) GetPageSize() int64
func (*ListProductsReq) ProtoMessage ¶
func (*ListProductsReq) ProtoMessage()
func (*ListProductsReq) ProtoReflect ¶
func (x *ListProductsReq) ProtoReflect() protoreflect.Message
func (*ListProductsReq) Reset ¶
func (x *ListProductsReq) Reset()
func (*ListProductsReq) Size ¶
func (x *ListProductsReq) Size() (n int)
func (*ListProductsReq) String ¶
func (x *ListProductsReq) String() string
type ListProductsResp ¶
type ListProductsResp struct { Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"` // 商品列表 // contains filtered or unexported fields }
列出商品的响应消息。
func (*ListProductsResp) Descriptor
deprecated
func (*ListProductsResp) Descriptor() ([]byte, []int)
Deprecated: Use ListProductsResp.ProtoReflect.Descriptor instead.
func (*ListProductsResp) FastWrite ¶
func (x *ListProductsResp) FastWrite(buf []byte) (offset int)
func (*ListProductsResp) GetProducts ¶
func (x *ListProductsResp) GetProducts() []*Product
func (*ListProductsResp) ProtoMessage ¶
func (*ListProductsResp) ProtoMessage()
func (*ListProductsResp) ProtoReflect ¶
func (x *ListProductsResp) ProtoReflect() protoreflect.Message
func (*ListProductsResp) Reset ¶
func (x *ListProductsResp) Reset()
func (*ListProductsResp) Size ¶
func (x *ListProductsResp) Size() (n int)
func (*ListProductsResp) String ¶
func (x *ListProductsResp) String() string
type Product ¶
type Product struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 商品 ID Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 商品名称 Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // 商品描述 Price int64 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` // 商品价格 OriginalPrice int64 `protobuf:"varint,5,opt,name=original_price,json=originalPrice,proto3" json:"original_price,omitempty"` //商品原始价格 Stock int64 `protobuf:"varint,6,opt,name=stock,proto3" json:"stock,omitempty"` //商品库存 Images string `protobuf:"bytes,7,opt,name=images,proto3" json:"images,omitempty"` //商品图片 Status uint32 `protobuf:"varint,8,opt,name=status,proto3" json:"status,omitempty"` //商品状态 Categories []string `protobuf:"bytes,9,rep,name=Categories,proto3" json:"Categories,omitempty"` // 商品所属类别 // contains filtered or unexported fields }
表示一个商品的信息。
func (*Product) Descriptor
deprecated
func (*Product) GetCategories ¶
func (*Product) GetDescription ¶
func (*Product) GetOriginalPrice ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
type ProductCatalogService ¶
type ProductCatalogService interface { ListProducts(ctx context.Context, req *ListProductsReq) (res *ListProductsResp, err error) SearchProducts(ctx context.Context, req *SearchProductsReq) (res *SearchProductsResp, err error) CreateProduct(ctx context.Context, req *CreateProductReq) (res *CreateProductResp, err error) UpdateProduct(ctx context.Context, req *UpdateProductReq) (res *UpdateProductResp, err error) DeleteProduct(ctx context.Context, req *DeleteProductReq) (res *DeleteProductResp, err error) GetProduct(ctx context.Context, req *GetProductReq) (res *GetProductResp, err error) GetProductsBatch(ctx context.Context, req *GetProductsBatchReq) (res *GetProductsBatchResp, err error) }
type SearchProductsReq ¶
type SearchProductsReq struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // 搜索关键字。 // contains filtered or unexported fields }
根据商品名搜索商品的请求消息。
func (*SearchProductsReq) Descriptor
deprecated
func (*SearchProductsReq) Descriptor() ([]byte, []int)
Deprecated: Use SearchProductsReq.ProtoReflect.Descriptor instead.
func (*SearchProductsReq) FastWrite ¶
func (x *SearchProductsReq) FastWrite(buf []byte) (offset int)
func (*SearchProductsReq) GetName ¶
func (x *SearchProductsReq) GetName() string
func (*SearchProductsReq) ProtoMessage ¶
func (*SearchProductsReq) ProtoMessage()
func (*SearchProductsReq) ProtoReflect ¶
func (x *SearchProductsReq) ProtoReflect() protoreflect.Message
func (*SearchProductsReq) Reset ¶
func (x *SearchProductsReq) Reset()
func (*SearchProductsReq) Size ¶
func (x *SearchProductsReq) Size() (n int)
func (*SearchProductsReq) String ¶
func (x *SearchProductsReq) String() string
type SearchProductsResp ¶
type SearchProductsResp struct { Results []*Product `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // 搜索结果列表。 // contains filtered or unexported fields }
搜索商品的响应消息。
func (*SearchProductsResp) Descriptor
deprecated
func (*SearchProductsResp) Descriptor() ([]byte, []int)
Deprecated: Use SearchProductsResp.ProtoReflect.Descriptor instead.
func (*SearchProductsResp) FastWrite ¶
func (x *SearchProductsResp) FastWrite(buf []byte) (offset int)
func (*SearchProductsResp) GetResults ¶
func (x *SearchProductsResp) GetResults() []*Product
func (*SearchProductsResp) ProtoMessage ¶
func (*SearchProductsResp) ProtoMessage()
func (*SearchProductsResp) ProtoReflect ¶
func (x *SearchProductsResp) ProtoReflect() protoreflect.Message
func (*SearchProductsResp) Reset ¶
func (x *SearchProductsResp) Reset()
func (*SearchProductsResp) Size ¶
func (x *SearchProductsResp) Size() (n int)
func (*SearchProductsResp) String ¶
func (x *SearchProductsResp) String() string
type UpdateProductReq ¶
type UpdateProductReq struct { Product *Product `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"` // 要修改的商品信息(必须包含ID以标识要修改的商品) // contains filtered or unexported fields }
修改商品信息的请求消息。
func (*UpdateProductReq) Descriptor
deprecated
func (*UpdateProductReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateProductReq.ProtoReflect.Descriptor instead.
func (*UpdateProductReq) FastWrite ¶
func (x *UpdateProductReq) FastWrite(buf []byte) (offset int)
func (*UpdateProductReq) GetProduct ¶
func (x *UpdateProductReq) GetProduct() *Product
func (*UpdateProductReq) ProtoMessage ¶
func (*UpdateProductReq) ProtoMessage()
func (*UpdateProductReq) ProtoReflect ¶
func (x *UpdateProductReq) ProtoReflect() protoreflect.Message
func (*UpdateProductReq) Reset ¶
func (x *UpdateProductReq) Reset()
func (*UpdateProductReq) Size ¶
func (x *UpdateProductReq) Size() (n int)
func (*UpdateProductReq) String ¶
func (x *UpdateProductReq) String() string
type UpdateProductResp ¶
type UpdateProductResp struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // 是否修改成功 Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 操作结果消息 // contains filtered or unexported fields }
修改商品信息的响应消息。
func (*UpdateProductResp) Descriptor
deprecated
func (*UpdateProductResp) Descriptor() ([]byte, []int)
Deprecated: Use UpdateProductResp.ProtoReflect.Descriptor instead.
func (*UpdateProductResp) FastWrite ¶
func (x *UpdateProductResp) FastWrite(buf []byte) (offset int)
func (*UpdateProductResp) GetMessage ¶
func (x *UpdateProductResp) GetMessage() string
func (*UpdateProductResp) GetSuccess ¶
func (x *UpdateProductResp) GetSuccess() bool
func (*UpdateProductResp) ProtoMessage ¶
func (*UpdateProductResp) ProtoMessage()
func (*UpdateProductResp) ProtoReflect ¶
func (x *UpdateProductResp) ProtoReflect() protoreflect.Message
func (*UpdateProductResp) Reset ¶
func (x *UpdateProductResp) Reset()
func (*UpdateProductResp) Size ¶
func (x *UpdateProductResp) Size() (n int)
func (*UpdateProductResp) String ¶
func (x *UpdateProductResp) String() string