Add Wildberries product fetching and rate limiting functionality
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v6.31.0
|
||||
// protoc v6.31.1
|
||||
// source: marketplace/marketplace.proto
|
||||
|
||||
package marketplace
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v6.31.0
|
||||
// - protoc v6.31.1
|
||||
// source: marketplace/marketplace.proto
|
||||
|
||||
package marketplace
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v6.31.0
|
||||
// protoc v6.31.1
|
||||
// source: ozon/products.proto
|
||||
|
||||
package products
|
||||
@@ -110,6 +110,94 @@ func (x *GetListOfProductsResponse) GetProducts() []*Product {
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetProductPriceRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
MarketplaceId int64 `protobuf:"varint,1,opt,name=marketplace_id,json=marketplaceId,proto3" json:"marketplace_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetProductPriceRequest) Reset() {
|
||||
*x = GetProductPriceRequest{}
|
||||
mi := &file_ozon_products_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetProductPriceRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetProductPriceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetProductPriceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ozon_products_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetProductPriceRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetProductPriceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ozon_products_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetProductPriceRequest) GetMarketplaceId() int64 {
|
||||
if x != nil {
|
||||
return x.MarketplaceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetProductPriceResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
ProductPrices []*ProductPrice `protobuf:"bytes,1,rep,name=product_prices,json=productPrices,proto3" json:"product_prices,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetProductPriceResponse) Reset() {
|
||||
*x = GetProductPriceResponse{}
|
||||
mi := &file_ozon_products_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetProductPriceResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetProductPriceResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetProductPriceResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ozon_products_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetProductPriceResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetProductPriceResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ozon_products_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *GetProductPriceResponse) GetProductPrices() []*ProductPrice {
|
||||
if x != nil {
|
||||
return x.ProductPrices
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Product struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
@@ -123,7 +211,7 @@ type Product struct {
|
||||
|
||||
func (x *Product) Reset() {
|
||||
*x = Product{}
|
||||
mi := &file_ozon_products_proto_msgTypes[2]
|
||||
mi := &file_ozon_products_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -135,7 +223,7 @@ func (x *Product) String() string {
|
||||
func (*Product) ProtoMessage() {}
|
||||
|
||||
func (x *Product) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ozon_products_proto_msgTypes[2]
|
||||
mi := &file_ozon_products_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -148,7 +236,7 @@ func (x *Product) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Product.ProtoReflect.Descriptor instead.
|
||||
func (*Product) Descriptor() ([]byte, []int) {
|
||||
return file_ozon_products_proto_rawDescGZIP(), []int{2}
|
||||
return file_ozon_products_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *Product) GetId() int64 {
|
||||
@@ -186,6 +274,74 @@ func (x *Product) GetStatuses() *Product_Status {
|
||||
return nil
|
||||
}
|
||||
|
||||
type ProductPrice struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Acquiring uint32 `protobuf:"varint,1,opt,name=acquiring,proto3" json:"acquiring,omitempty"`
|
||||
Commissions *ProductPrice_Commissions `protobuf:"bytes,2,opt,name=commissions,proto3" json:"commissions,omitempty"`
|
||||
OfferId string `protobuf:"bytes,4,opt,name=offer_id,json=offerId,proto3" json:"offer_id,omitempty"`
|
||||
ProductId uint32 `protobuf:"varint,7,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ProductPrice) Reset() {
|
||||
*x = ProductPrice{}
|
||||
mi := &file_ozon_products_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ProductPrice) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ProductPrice) ProtoMessage() {}
|
||||
|
||||
func (x *ProductPrice) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ozon_products_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ProductPrice.ProtoReflect.Descriptor instead.
|
||||
func (*ProductPrice) Descriptor() ([]byte, []int) {
|
||||
return file_ozon_products_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ProductPrice) GetAcquiring() uint32 {
|
||||
if x != nil {
|
||||
return x.Acquiring
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ProductPrice) GetCommissions() *ProductPrice_Commissions {
|
||||
if x != nil {
|
||||
return x.Commissions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ProductPrice) GetOfferId() string {
|
||||
if x != nil {
|
||||
return x.OfferId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ProductPrice) GetProductId() uint32 {
|
||||
if x != nil {
|
||||
return x.ProductId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Product_Status struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
StatusName string `protobuf:"bytes,1,opt,name=status_name,json=statusName,proto3" json:"status_name,omitempty"`
|
||||
@@ -195,7 +351,7 @@ type Product_Status struct {
|
||||
|
||||
func (x *Product_Status) Reset() {
|
||||
*x = Product_Status{}
|
||||
mi := &file_ozon_products_proto_msgTypes[3]
|
||||
mi := &file_ozon_products_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -207,7 +363,7 @@ func (x *Product_Status) String() string {
|
||||
func (*Product_Status) ProtoMessage() {}
|
||||
|
||||
func (x *Product_Status) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ozon_products_proto_msgTypes[3]
|
||||
mi := &file_ozon_products_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -220,7 +376,7 @@ func (x *Product_Status) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Product_Status.ProtoReflect.Descriptor instead.
|
||||
func (*Product_Status) Descriptor() ([]byte, []int) {
|
||||
return file_ozon_products_proto_rawDescGZIP(), []int{2, 0}
|
||||
return file_ozon_products_proto_rawDescGZIP(), []int{4, 0}
|
||||
}
|
||||
|
||||
func (x *Product_Status) GetStatusName() string {
|
||||
@@ -240,7 +396,7 @@ type Product_Stocks struct {
|
||||
|
||||
func (x *Product_Stocks) Reset() {
|
||||
*x = Product_Stocks{}
|
||||
mi := &file_ozon_products_proto_msgTypes[4]
|
||||
mi := &file_ozon_products_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -252,7 +408,7 @@ func (x *Product_Stocks) String() string {
|
||||
func (*Product_Stocks) ProtoMessage() {}
|
||||
|
||||
func (x *Product_Stocks) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ozon_products_proto_msgTypes[4]
|
||||
mi := &file_ozon_products_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -265,7 +421,7 @@ func (x *Product_Stocks) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Product_Stocks.ProtoReflect.Descriptor instead.
|
||||
func (*Product_Stocks) Descriptor() ([]byte, []int) {
|
||||
return file_ozon_products_proto_rawDescGZIP(), []int{2, 1}
|
||||
return file_ozon_products_proto_rawDescGZIP(), []int{4, 1}
|
||||
}
|
||||
|
||||
func (x *Product_Stocks) GetStocks() []*Product_Stock {
|
||||
@@ -294,7 +450,7 @@ type Product_Stock struct {
|
||||
|
||||
func (x *Product_Stock) Reset() {
|
||||
*x = Product_Stock{}
|
||||
mi := &file_ozon_products_proto_msgTypes[5]
|
||||
mi := &file_ozon_products_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -306,7 +462,7 @@ func (x *Product_Stock) String() string {
|
||||
func (*Product_Stock) ProtoMessage() {}
|
||||
|
||||
func (x *Product_Stock) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ozon_products_proto_msgTypes[5]
|
||||
mi := &file_ozon_products_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -319,7 +475,7 @@ func (x *Product_Stock) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Product_Stock.ProtoReflect.Descriptor instead.
|
||||
func (*Product_Stock) Descriptor() ([]byte, []int) {
|
||||
return file_ozon_products_proto_rawDescGZIP(), []int{2, 2}
|
||||
return file_ozon_products_proto_rawDescGZIP(), []int{4, 2}
|
||||
}
|
||||
|
||||
func (x *Product_Stock) GetPresent() int64 {
|
||||
@@ -350,6 +506,138 @@ func (x *Product_Stock) GetSource() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type ProductPrice_Commissions struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
FboDelivToCustomerAmount float64 `protobuf:"fixed64,1,opt,name=fbo_deliv_to_customer_amount,json=fboDelivToCustomerAmount,proto3" json:"fbo_deliv_to_customer_amount,omitempty"`
|
||||
FboDirectFlowTransMaxAmount float64 `protobuf:"fixed64,2,opt,name=fbo_direct_flow_trans_max_amount,json=fboDirectFlowTransMaxAmount,proto3" json:"fbo_direct_flow_trans_max_amount,omitempty"`
|
||||
FboDirectFlowTransMinAmount float64 `protobuf:"fixed64,3,opt,name=fbo_direct_flow_trans_min_amount,json=fboDirectFlowTransMinAmount,proto3" json:"fbo_direct_flow_trans_min_amount,omitempty"`
|
||||
FboReturnFlowAmount float64 `protobuf:"fixed64,4,opt,name=fbo_return_flow_amount,json=fboReturnFlowAmount,proto3" json:"fbo_return_flow_amount,omitempty"`
|
||||
FbsDelivToCustomerAmount float64 `protobuf:"fixed64,5,opt,name=fbs_deliv_to_customer_amount,json=fbsDelivToCustomerAmount,proto3" json:"fbs_deliv_to_customer_amount,omitempty"`
|
||||
FbsDirectFlowTransMaxAmount float64 `protobuf:"fixed64,6,opt,name=fbs_direct_flow_trans_max_amount,json=fbsDirectFlowTransMaxAmount,proto3" json:"fbs_direct_flow_trans_max_amount,omitempty"`
|
||||
FbsDirectFlowTransMinAmount float64 `protobuf:"fixed64,7,opt,name=fbs_direct_flow_trans_min_amount,json=fbsDirectFlowTransMinAmount,proto3" json:"fbs_direct_flow_trans_min_amount,omitempty"`
|
||||
FbsFirstMileMaxAmount float64 `protobuf:"fixed64,8,opt,name=fbs_first_mile_max_amount,json=fbsFirstMileMaxAmount,proto3" json:"fbs_first_mile_max_amount,omitempty"`
|
||||
FbsFirstMileMinAmount float64 `protobuf:"fixed64,9,opt,name=fbs_first_mile_min_amount,json=fbsFirstMileMinAmount,proto3" json:"fbs_first_mile_min_amount,omitempty"`
|
||||
FbsReturnFlowAmount float64 `protobuf:"fixed64,10,opt,name=fbs_return_flow_amount,json=fbsReturnFlowAmount,proto3" json:"fbs_return_flow_amount,omitempty"`
|
||||
SalesPercentFbo float64 `protobuf:"fixed64,11,opt,name=sales_percent_fbo,json=salesPercentFbo,proto3" json:"sales_percent_fbo,omitempty"`
|
||||
SalesPercentFbs float64 `protobuf:"fixed64,12,opt,name=sales_percent_fbs,json=salesPercentFbs,proto3" json:"sales_percent_fbs,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ProductPrice_Commissions) Reset() {
|
||||
*x = ProductPrice_Commissions{}
|
||||
mi := &file_ozon_products_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ProductPrice_Commissions) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ProductPrice_Commissions) ProtoMessage() {}
|
||||
|
||||
func (x *ProductPrice_Commissions) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ozon_products_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ProductPrice_Commissions.ProtoReflect.Descriptor instead.
|
||||
func (*ProductPrice_Commissions) Descriptor() ([]byte, []int) {
|
||||
return file_ozon_products_proto_rawDescGZIP(), []int{5, 0}
|
||||
}
|
||||
|
||||
func (x *ProductPrice_Commissions) GetFboDelivToCustomerAmount() float64 {
|
||||
if x != nil {
|
||||
return x.FboDelivToCustomerAmount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ProductPrice_Commissions) GetFboDirectFlowTransMaxAmount() float64 {
|
||||
if x != nil {
|
||||
return x.FboDirectFlowTransMaxAmount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ProductPrice_Commissions) GetFboDirectFlowTransMinAmount() float64 {
|
||||
if x != nil {
|
||||
return x.FboDirectFlowTransMinAmount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ProductPrice_Commissions) GetFboReturnFlowAmount() float64 {
|
||||
if x != nil {
|
||||
return x.FboReturnFlowAmount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ProductPrice_Commissions) GetFbsDelivToCustomerAmount() float64 {
|
||||
if x != nil {
|
||||
return x.FbsDelivToCustomerAmount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ProductPrice_Commissions) GetFbsDirectFlowTransMaxAmount() float64 {
|
||||
if x != nil {
|
||||
return x.FbsDirectFlowTransMaxAmount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ProductPrice_Commissions) GetFbsDirectFlowTransMinAmount() float64 {
|
||||
if x != nil {
|
||||
return x.FbsDirectFlowTransMinAmount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ProductPrice_Commissions) GetFbsFirstMileMaxAmount() float64 {
|
||||
if x != nil {
|
||||
return x.FbsFirstMileMaxAmount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ProductPrice_Commissions) GetFbsFirstMileMinAmount() float64 {
|
||||
if x != nil {
|
||||
return x.FbsFirstMileMinAmount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ProductPrice_Commissions) GetFbsReturnFlowAmount() float64 {
|
||||
if x != nil {
|
||||
return x.FbsReturnFlowAmount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ProductPrice_Commissions) GetSalesPercentFbo() float64 {
|
||||
if x != nil {
|
||||
return x.SalesPercentFbo
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ProductPrice_Commissions) GetSalesPercentFbs() float64 {
|
||||
if x != nil {
|
||||
return x.SalesPercentFbs
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_ozon_products_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_ozon_products_proto_rawDesc = "" +
|
||||
@@ -358,7 +646,11 @@ const file_ozon_products_proto_rawDesc = "" +
|
||||
"\x18GetListOfProductsRequest\x12%\n" +
|
||||
"\x0emarketplace_id\x18\x01 \x01(\x03R\rmarketplaceId\"O\n" +
|
||||
"\x19GetListOfProductsResponse\x122\n" +
|
||||
"\bproducts\x18\x01 \x03(\v2\x16.ozon.products.ProductR\bproducts\"\xb3\x03\n" +
|
||||
"\bproducts\x18\x01 \x03(\v2\x16.ozon.products.ProductR\bproducts\"?\n" +
|
||||
"\x16GetProductPriceRequest\x12%\n" +
|
||||
"\x0emarketplace_id\x18\x01 \x01(\x03R\rmarketplaceId\"]\n" +
|
||||
"\x17GetProductPriceResponse\x12B\n" +
|
||||
"\x0eproduct_prices\x18\x01 \x03(\v2\x1b.ozon.products.ProductPriceR\rproductPrices\"\xb3\x03\n" +
|
||||
"\aProduct\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x19\n" +
|
||||
"\boffer_id\x18\x02 \x01(\tR\aofferId\x125\n" +
|
||||
@@ -375,9 +667,30 @@ const file_ozon_products_proto_rawDesc = "" +
|
||||
"\apresent\x18\x01 \x01(\x03R\apresent\x12\x1a\n" +
|
||||
"\breserved\x18\x02 \x01(\x03R\breserved\x12\x10\n" +
|
||||
"\x03SKU\x18\x03 \x01(\x03R\x03SKU\x12\x16\n" +
|
||||
"\x06source\x18\x04 \x01(\tR\x06source2{\n" +
|
||||
"\x06source\x18\x04 \x01(\tR\x06source\"\x93\a\n" +
|
||||
"\fProductPrice\x12\x1c\n" +
|
||||
"\tacquiring\x18\x01 \x01(\rR\tacquiring\x12I\n" +
|
||||
"\vcommissions\x18\x02 \x01(\v2'.ozon.products.ProductPrice.CommissionsR\vcommissions\x12\x19\n" +
|
||||
"\boffer_id\x18\x04 \x01(\tR\aofferId\x12\x1d\n" +
|
||||
"\n" +
|
||||
"product_id\x18\a \x01(\rR\tproductId\x1a\xdf\x05\n" +
|
||||
"\vCommissions\x12>\n" +
|
||||
"\x1cfbo_deliv_to_customer_amount\x18\x01 \x01(\x01R\x18fboDelivToCustomerAmount\x12E\n" +
|
||||
" fbo_direct_flow_trans_max_amount\x18\x02 \x01(\x01R\x1bfboDirectFlowTransMaxAmount\x12E\n" +
|
||||
" fbo_direct_flow_trans_min_amount\x18\x03 \x01(\x01R\x1bfboDirectFlowTransMinAmount\x123\n" +
|
||||
"\x16fbo_return_flow_amount\x18\x04 \x01(\x01R\x13fboReturnFlowAmount\x12>\n" +
|
||||
"\x1cfbs_deliv_to_customer_amount\x18\x05 \x01(\x01R\x18fbsDelivToCustomerAmount\x12E\n" +
|
||||
" fbs_direct_flow_trans_max_amount\x18\x06 \x01(\x01R\x1bfbsDirectFlowTransMaxAmount\x12E\n" +
|
||||
" fbs_direct_flow_trans_min_amount\x18\a \x01(\x01R\x1bfbsDirectFlowTransMinAmount\x128\n" +
|
||||
"\x19fbs_first_mile_max_amount\x18\b \x01(\x01R\x15fbsFirstMileMaxAmount\x128\n" +
|
||||
"\x19fbs_first_mile_min_amount\x18\t \x01(\x01R\x15fbsFirstMileMinAmount\x123\n" +
|
||||
"\x16fbs_return_flow_amount\x18\n" +
|
||||
" \x01(\x01R\x13fbsReturnFlowAmount\x12*\n" +
|
||||
"\x11sales_percent_fbo\x18\v \x01(\x01R\x0fsalesPercentFbo\x12*\n" +
|
||||
"\x11sales_percent_fbs\x18\f \x01(\x01R\x0fsalesPercentFbs2\xdf\x01\n" +
|
||||
"\x0fProductsService\x12h\n" +
|
||||
"\x11GetListOfProducts\x12'.ozon.products.GetListOfProductsRequest\x1a(.ozon.products.GetListOfProductsResponse0\x01B\x11Z\x0f./ozon/productsb\x06proto3"
|
||||
"\x11GetListOfProducts\x12'.ozon.products.GetListOfProductsRequest\x1a(.ozon.products.GetListOfProductsResponse0\x01\x12b\n" +
|
||||
"\x0fGetProductPrice\x12%.ozon.products.GetProductPriceRequest\x1a&.ozon.products.GetProductPriceResponse0\x01B\x11Z\x0f./ozon/productsb\x06proto3"
|
||||
|
||||
var (
|
||||
file_ozon_products_proto_rawDescOnce sync.Once
|
||||
@@ -391,27 +704,35 @@ func file_ozon_products_proto_rawDescGZIP() []byte {
|
||||
return file_ozon_products_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_ozon_products_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_ozon_products_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||
var file_ozon_products_proto_goTypes = []any{
|
||||
(*GetListOfProductsRequest)(nil), // 0: ozon.products.GetListOfProductsRequest
|
||||
(*GetListOfProductsResponse)(nil), // 1: ozon.products.GetListOfProductsResponse
|
||||
(*Product)(nil), // 2: ozon.products.Product
|
||||
(*Product_Status)(nil), // 3: ozon.products.Product.Status
|
||||
(*Product_Stocks)(nil), // 4: ozon.products.Product.Stocks
|
||||
(*Product_Stock)(nil), // 5: ozon.products.Product.Stock
|
||||
(*GetProductPriceRequest)(nil), // 2: ozon.products.GetProductPriceRequest
|
||||
(*GetProductPriceResponse)(nil), // 3: ozon.products.GetProductPriceResponse
|
||||
(*Product)(nil), // 4: ozon.products.Product
|
||||
(*ProductPrice)(nil), // 5: ozon.products.ProductPrice
|
||||
(*Product_Status)(nil), // 6: ozon.products.Product.Status
|
||||
(*Product_Stocks)(nil), // 7: ozon.products.Product.Stocks
|
||||
(*Product_Stock)(nil), // 8: ozon.products.Product.Stock
|
||||
(*ProductPrice_Commissions)(nil), // 9: ozon.products.ProductPrice.Commissions
|
||||
}
|
||||
var file_ozon_products_proto_depIdxs = []int32{
|
||||
2, // 0: ozon.products.GetListOfProductsResponse.products:type_name -> ozon.products.Product
|
||||
4, // 1: ozon.products.Product.stocks:type_name -> ozon.products.Product.Stocks
|
||||
3, // 2: ozon.products.Product.statuses:type_name -> ozon.products.Product.Status
|
||||
5, // 3: ozon.products.Product.Stocks.stocks:type_name -> ozon.products.Product.Stock
|
||||
0, // 4: ozon.products.ProductsService.GetListOfProducts:input_type -> ozon.products.GetListOfProductsRequest
|
||||
1, // 5: ozon.products.ProductsService.GetListOfProducts:output_type -> ozon.products.GetListOfProductsResponse
|
||||
5, // [5:6] is the sub-list for method output_type
|
||||
4, // [4:5] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
4, // 0: ozon.products.GetListOfProductsResponse.products:type_name -> ozon.products.Product
|
||||
5, // 1: ozon.products.GetProductPriceResponse.product_prices:type_name -> ozon.products.ProductPrice
|
||||
7, // 2: ozon.products.Product.stocks:type_name -> ozon.products.Product.Stocks
|
||||
6, // 3: ozon.products.Product.statuses:type_name -> ozon.products.Product.Status
|
||||
9, // 4: ozon.products.ProductPrice.commissions:type_name -> ozon.products.ProductPrice.Commissions
|
||||
8, // 5: ozon.products.Product.Stocks.stocks:type_name -> ozon.products.Product.Stock
|
||||
0, // 6: ozon.products.ProductsService.GetListOfProducts:input_type -> ozon.products.GetListOfProductsRequest
|
||||
2, // 7: ozon.products.ProductsService.GetProductPrice:input_type -> ozon.products.GetProductPriceRequest
|
||||
1, // 8: ozon.products.ProductsService.GetListOfProducts:output_type -> ozon.products.GetListOfProductsResponse
|
||||
3, // 9: ozon.products.ProductsService.GetProductPrice:output_type -> ozon.products.GetProductPriceResponse
|
||||
8, // [8:10] is the sub-list for method output_type
|
||||
6, // [6:8] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_ozon_products_proto_init() }
|
||||
@@ -425,7 +746,7 @@ func file_ozon_products_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ozon_products_proto_rawDesc), len(file_ozon_products_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumMessages: 10,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v6.31.0
|
||||
// - protoc v6.31.1
|
||||
// source: ozon/products.proto
|
||||
|
||||
package products
|
||||
@@ -20,6 +20,7 @@ const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
ProductsService_GetListOfProducts_FullMethodName = "/ozon.products.ProductsService/GetListOfProducts"
|
||||
ProductsService_GetProductPrice_FullMethodName = "/ozon.products.ProductsService/GetProductPrice"
|
||||
)
|
||||
|
||||
// ProductsServiceClient is the client API for ProductsService service.
|
||||
@@ -28,6 +29,7 @@ const (
|
||||
type ProductsServiceClient interface {
|
||||
// Retrieves a list of products based on the provided request.
|
||||
GetListOfProducts(ctx context.Context, in *GetListOfProductsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetListOfProductsResponse], error)
|
||||
GetProductPrice(ctx context.Context, in *GetProductPriceRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetProductPriceResponse], error)
|
||||
}
|
||||
|
||||
type productsServiceClient struct {
|
||||
@@ -57,12 +59,32 @@ func (c *productsServiceClient) GetListOfProducts(ctx context.Context, in *GetLi
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ProductsService_GetListOfProductsClient = grpc.ServerStreamingClient[GetListOfProductsResponse]
|
||||
|
||||
func (c *productsServiceClient) GetProductPrice(ctx context.Context, in *GetProductPriceRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetProductPriceResponse], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &ProductsService_ServiceDesc.Streams[1], ProductsService_GetProductPrice_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &grpc.GenericClientStream[GetProductPriceRequest, GetProductPriceResponse]{ClientStream: stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ProductsService_GetProductPriceClient = grpc.ServerStreamingClient[GetProductPriceResponse]
|
||||
|
||||
// ProductsServiceServer is the server API for ProductsService service.
|
||||
// All implementations must embed UnimplementedProductsServiceServer
|
||||
// for forward compatibility.
|
||||
type ProductsServiceServer interface {
|
||||
// Retrieves a list of products based on the provided request.
|
||||
GetListOfProducts(*GetListOfProductsRequest, grpc.ServerStreamingServer[GetListOfProductsResponse]) error
|
||||
GetProductPrice(*GetProductPriceRequest, grpc.ServerStreamingServer[GetProductPriceResponse]) error
|
||||
mustEmbedUnimplementedProductsServiceServer()
|
||||
}
|
||||
|
||||
@@ -76,6 +98,9 @@ type UnimplementedProductsServiceServer struct{}
|
||||
func (UnimplementedProductsServiceServer) GetListOfProducts(*GetListOfProductsRequest, grpc.ServerStreamingServer[GetListOfProductsResponse]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method GetListOfProducts not implemented")
|
||||
}
|
||||
func (UnimplementedProductsServiceServer) GetProductPrice(*GetProductPriceRequest, grpc.ServerStreamingServer[GetProductPriceResponse]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method GetProductPrice not implemented")
|
||||
}
|
||||
func (UnimplementedProductsServiceServer) mustEmbedUnimplementedProductsServiceServer() {}
|
||||
func (UnimplementedProductsServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
@@ -108,6 +133,17 @@ func _ProductsService_GetListOfProducts_Handler(srv interface{}, stream grpc.Ser
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ProductsService_GetListOfProductsServer = grpc.ServerStreamingServer[GetListOfProductsResponse]
|
||||
|
||||
func _ProductsService_GetProductPrice_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(GetProductPriceRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(ProductsServiceServer).GetProductPrice(m, &grpc.GenericServerStream[GetProductPriceRequest, GetProductPriceResponse]{ServerStream: stream})
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ProductsService_GetProductPriceServer = grpc.ServerStreamingServer[GetProductPriceResponse]
|
||||
|
||||
// ProductsService_ServiceDesc is the grpc.ServiceDesc for ProductsService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -121,6 +157,11 @@ var ProductsService_ServiceDesc = grpc.ServiceDesc{
|
||||
Handler: _ProductsService_GetListOfProducts_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "GetProductPrice",
|
||||
Handler: _ProductsService_GetProductPrice_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "ozon/products.proto",
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v6.31.0
|
||||
// protoc v6.31.1
|
||||
// source: wb/products.proto
|
||||
|
||||
package products
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
@@ -20,20 +21,255 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type GetProductsRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
MarketplaceId int64 `protobuf:"varint,1,opt,name=marketplace_id,json=marketplaceId,proto3" json:"marketplace_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetProductsRequest) Reset() {
|
||||
*x = GetProductsRequest{}
|
||||
mi := &file_wb_products_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetProductsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetProductsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetProductsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wb_products_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetProductsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetProductsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_wb_products_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *GetProductsRequest) GetMarketplaceId() int64 {
|
||||
if x != nil {
|
||||
return x.MarketplaceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Product struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
NmID int64 `protobuf:"varint,1,opt,name=nmID,proto3" json:"nmID,omitempty"`
|
||||
SubjectID int64 `protobuf:"varint,2,opt,name=subjectID,proto3" json:"subjectID,omitempty"`
|
||||
VendorCode string `protobuf:"bytes,3,opt,name=vendor_code,json=vendorCode,proto3" json:"vendor_code,omitempty"`
|
||||
Sizes []*Product_Size `protobuf:"bytes,4,rep,name=sizes,proto3" json:"sizes,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Product) Reset() {
|
||||
*x = Product{}
|
||||
mi := &file_wb_products_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Product) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Product) ProtoMessage() {}
|
||||
|
||||
func (x *Product) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wb_products_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Product.ProtoReflect.Descriptor instead.
|
||||
func (*Product) Descriptor() ([]byte, []int) {
|
||||
return file_wb_products_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Product) GetNmID() int64 {
|
||||
if x != nil {
|
||||
return x.NmID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Product) GetSubjectID() int64 {
|
||||
if x != nil {
|
||||
return x.SubjectID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Product) GetVendorCode() string {
|
||||
if x != nil {
|
||||
return x.VendorCode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Product) GetSizes() []*Product_Size {
|
||||
if x != nil {
|
||||
return x.Sizes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetProductsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetProductsResponse) Reset() {
|
||||
*x = GetProductsResponse{}
|
||||
mi := &file_wb_products_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetProductsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetProductsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetProductsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wb_products_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetProductsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetProductsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_wb_products_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetProductsResponse) GetProducts() []*Product {
|
||||
if x != nil {
|
||||
return x.Products
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Product_Size struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Skus []string `protobuf:"bytes,1,rep,name=skus,proto3" json:"skus,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Product_Size) Reset() {
|
||||
*x = Product_Size{}
|
||||
mi := &file_wb_products_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Product_Size) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Product_Size) ProtoMessage() {}
|
||||
|
||||
func (x *Product_Size) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wb_products_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Product_Size.ProtoReflect.Descriptor instead.
|
||||
func (*Product_Size) Descriptor() ([]byte, []int) {
|
||||
return file_wb_products_proto_rawDescGZIP(), []int{1, 0}
|
||||
}
|
||||
|
||||
func (x *Product_Size) GetSkus() []string {
|
||||
if x != nil {
|
||||
return x.Skus
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_wb_products_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_wb_products_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x11wb/products.proto\x12\vwb.products2\x11\n" +
|
||||
"\x0fProductsServiceB\x0fZ\r./wb/productsb\x06proto3"
|
||||
"\x11wb/products.proto\x12\vwb.products\";\n" +
|
||||
"\x12GetProductsRequest\x12%\n" +
|
||||
"\x0emarketplace_id\x18\x01 \x01(\x03R\rmarketplaceId\"\xa9\x01\n" +
|
||||
"\aProduct\x12\x12\n" +
|
||||
"\x04nmID\x18\x01 \x01(\x03R\x04nmID\x12\x1c\n" +
|
||||
"\tsubjectID\x18\x02 \x01(\x03R\tsubjectID\x12\x1f\n" +
|
||||
"\vvendor_code\x18\x03 \x01(\tR\n" +
|
||||
"vendorCode\x12/\n" +
|
||||
"\x05sizes\x18\x04 \x03(\v2\x19.wb.products.Product.SizeR\x05sizes\x1a\x1a\n" +
|
||||
"\x04Size\x12\x12\n" +
|
||||
"\x04skus\x18\x01 \x03(\tR\x04skus\"G\n" +
|
||||
"\x13GetProductsResponse\x120\n" +
|
||||
"\bproducts\x18\x01 \x03(\v2\x14.wb.products.ProductR\bproducts2e\n" +
|
||||
"\x0fProductsService\x12R\n" +
|
||||
"\vGetProducts\x12\x1f.wb.products.GetProductsRequest\x1a .wb.products.GetProductsResponse0\x01B\x0fZ\r./wb/productsb\x06proto3"
|
||||
|
||||
var file_wb_products_proto_goTypes = []any{}
|
||||
var (
|
||||
file_wb_products_proto_rawDescOnce sync.Once
|
||||
file_wb_products_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_wb_products_proto_rawDescGZIP() []byte {
|
||||
file_wb_products_proto_rawDescOnce.Do(func() {
|
||||
file_wb_products_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_wb_products_proto_rawDesc), len(file_wb_products_proto_rawDesc)))
|
||||
})
|
||||
return file_wb_products_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_wb_products_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_wb_products_proto_goTypes = []any{
|
||||
(*GetProductsRequest)(nil), // 0: wb.products.GetProductsRequest
|
||||
(*Product)(nil), // 1: wb.products.Product
|
||||
(*GetProductsResponse)(nil), // 2: wb.products.GetProductsResponse
|
||||
(*Product_Size)(nil), // 3: wb.products.Product.Size
|
||||
}
|
||||
var file_wb_products_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
3, // 0: wb.products.Product.sizes:type_name -> wb.products.Product.Size
|
||||
1, // 1: wb.products.GetProductsResponse.products:type_name -> wb.products.Product
|
||||
0, // 2: wb.products.ProductsService.GetProducts:input_type -> wb.products.GetProductsRequest
|
||||
2, // 3: wb.products.ProductsService.GetProducts:output_type -> wb.products.GetProductsResponse
|
||||
3, // [3:4] is the sub-list for method output_type
|
||||
2, // [2:3] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_wb_products_proto_init() }
|
||||
@@ -47,12 +283,13 @@ func file_wb_products_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_wb_products_proto_rawDesc), len(file_wb_products_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_wb_products_proto_goTypes,
|
||||
DependencyIndexes: file_wb_products_proto_depIdxs,
|
||||
MessageInfos: file_wb_products_proto_msgTypes,
|
||||
}.Build()
|
||||
File_wb_products_proto = out.File
|
||||
file_wb_products_proto_goTypes = nil
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v6.31.0
|
||||
// - protoc v6.31.1
|
||||
// source: wb/products.proto
|
||||
|
||||
package products
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
@@ -15,10 +18,15 @@ import (
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
ProductsService_GetProducts_FullMethodName = "/wb.products.ProductsService/GetProducts"
|
||||
)
|
||||
|
||||
// ProductsServiceClient is the client API for ProductsService 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.
|
||||
type ProductsServiceClient interface {
|
||||
GetProducts(ctx context.Context, in *GetProductsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetProductsResponse], error)
|
||||
}
|
||||
|
||||
type productsServiceClient struct {
|
||||
@@ -29,10 +37,30 @@ func NewProductsServiceClient(cc grpc.ClientConnInterface) ProductsServiceClient
|
||||
return &productsServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *productsServiceClient) GetProducts(ctx context.Context, in *GetProductsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetProductsResponse], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &ProductsService_ServiceDesc.Streams[0], ProductsService_GetProducts_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &grpc.GenericClientStream[GetProductsRequest, GetProductsResponse]{ClientStream: stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ProductsService_GetProductsClient = grpc.ServerStreamingClient[GetProductsResponse]
|
||||
|
||||
// ProductsServiceServer is the server API for ProductsService service.
|
||||
// All implementations must embed UnimplementedProductsServiceServer
|
||||
// for forward compatibility.
|
||||
type ProductsServiceServer interface {
|
||||
GetProducts(*GetProductsRequest, grpc.ServerStreamingServer[GetProductsResponse]) error
|
||||
mustEmbedUnimplementedProductsServiceServer()
|
||||
}
|
||||
|
||||
@@ -43,6 +71,9 @@ type ProductsServiceServer interface {
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedProductsServiceServer struct{}
|
||||
|
||||
func (UnimplementedProductsServiceServer) GetProducts(*GetProductsRequest, grpc.ServerStreamingServer[GetProductsResponse]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method GetProducts not implemented")
|
||||
}
|
||||
func (UnimplementedProductsServiceServer) mustEmbedUnimplementedProductsServiceServer() {}
|
||||
func (UnimplementedProductsServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
@@ -64,6 +95,17 @@ func RegisterProductsServiceServer(s grpc.ServiceRegistrar, srv ProductsServiceS
|
||||
s.RegisterService(&ProductsService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _ProductsService_GetProducts_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(GetProductsRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(ProductsServiceServer).GetProducts(m, &grpc.GenericServerStream[GetProductsRequest, GetProductsResponse]{ServerStream: stream})
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ProductsService_GetProductsServer = grpc.ServerStreamingServer[GetProductsResponse]
|
||||
|
||||
// ProductsService_ServiceDesc is the grpc.ServiceDesc for ProductsService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -71,6 +113,12 @@ var ProductsService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "wb.products.ProductsService",
|
||||
HandlerType: (*ProductsServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "wb/products.proto",
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "GetProducts",
|
||||
Handler: _ProductsService_GetProducts_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "wb/products.proto",
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v6.31.0
|
||||
// protoc v6.31.1
|
||||
// source: yandexmarket/products.proto
|
||||
|
||||
package products
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v6.31.0
|
||||
// - protoc v6.31.1
|
||||
// source: yandexmarket/products.proto
|
||||
|
||||
package products
|
||||
|
||||
Submodule api/proto/v1 updated: c6df89a7a3...2c4ca98d2d
Reference in New Issue
Block a user