feat: update proto file paths and add brand/description fields to products
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.1
|
||||
// protoc v6.32.0
|
||||
// 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.1
|
||||
// - protoc v6.32.0
|
||||
// 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.1
|
||||
// protoc v6.32.0
|
||||
// source: ozon/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.1
|
||||
// - protoc v6.32.0
|
||||
// source: ozon/products.proto
|
||||
|
||||
package products
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v6.31.1
|
||||
// protoc v6.32.0
|
||||
// source: wb/products.proto
|
||||
|
||||
package products
|
||||
@@ -75,6 +75,8 @@ type Product struct {
|
||||
Photos []*Product_Photo `protobuf:"bytes,6,rep,name=photos,proto3" json:"photos,omitempty"`
|
||||
Dimensions *Product_Dimensions `protobuf:"bytes,7,opt,name=dimensions,proto3" json:"dimensions,omitempty"`
|
||||
Title string `protobuf:"bytes,8,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Brand string `protobuf:"bytes,9,opt,name=brand,proto3" json:"brand,omitempty"`
|
||||
Description string `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -165,6 +167,20 @@ func (x *Product) GetTitle() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Product) GetBrand() string {
|
||||
if x != nil {
|
||||
return x.Brand
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Product) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetProductsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"`
|
||||
@@ -463,7 +479,7 @@ const file_wb_products_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x11wb/products.proto\x12\vwb.products\";\n" +
|
||||
"\x12GetProductsRequest\x12%\n" +
|
||||
"\x0emarketplace_id\x18\x01 \x01(\x03R\rmarketplaceId\"\xc9\x05\n" +
|
||||
"\x0emarketplace_id\x18\x01 \x01(\x03R\rmarketplaceId\"\x81\x06\n" +
|
||||
"\aProduct\x12\x12\n" +
|
||||
"\x04nmID\x18\x01 \x01(\x03R\x04nmID\x12\x1c\n" +
|
||||
"\tsubjectID\x18\x02 \x01(\x03R\tsubjectID\x12\x1f\n" +
|
||||
@@ -475,7 +491,10 @@ const file_wb_products_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"dimensions\x18\a \x01(\v2\x1f.wb.products.Product.DimensionsR\n" +
|
||||
"dimensions\x12\x14\n" +
|
||||
"\x05title\x18\b \x01(\tR\x05title\x1af\n" +
|
||||
"\x05title\x18\b \x01(\tR\x05title\x12\x14\n" +
|
||||
"\x05brand\x18\t \x01(\tR\x05brand\x12 \n" +
|
||||
"\vdescription\x18\n" +
|
||||
" \x01(\tR\vdescription\x1af\n" +
|
||||
"\x04Size\x12\x12\n" +
|
||||
"\x04skus\x18\x01 \x03(\tR\x04skus\x12\x16\n" +
|
||||
"\x06chrtID\x18\x02 \x01(\x03R\x06chrtID\x12\x1a\n" +
|
||||
|
||||
@@ -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.1
|
||||
// - protoc v6.32.0
|
||||
// source: wb/products.proto
|
||||
|
||||
package products
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v6.31.1
|
||||
// protoc v6.32.0
|
||||
// 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.1
|
||||
// - protoc v6.32.0
|
||||
// source: yandexmarket/products.proto
|
||||
|
||||
package products
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set -e
|
||||
|
||||
# Переход в репозиторий с proto-файлами
|
||||
cd ./Sipro-Marketplaces-Protos
|
||||
cd ./api/proto/v1
|
||||
|
||||
# Коммит и пуш изменений, если они есть
|
||||
if [[ -n $(git status --porcelain) ]]; then
|
||||
@@ -17,11 +17,6 @@ fi
|
||||
# Возврат в корень проекта
|
||||
cd -
|
||||
|
||||
# Пуллим обновления в /api/proto/v1
|
||||
cd ./api/proto/v1
|
||||
git pull
|
||||
cd -
|
||||
|
||||
# Генерация .pb.go файлов в папки согласно структуре .proto
|
||||
protoc \
|
||||
--go_out=./api/generated/v1 \
|
||||
|
||||
@@ -39,6 +39,8 @@ func (c *ConverterImpl) ToProto(source *client.ContentV2GetCardsListPostOKCardsI
|
||||
}
|
||||
productsProduct.Dimensions = mapping.WbDimensionsToProto((*source).Dimensions)
|
||||
productsProduct.Title = mapping.OptStringToString((*source).Title)
|
||||
productsProduct.Brand = mapping.OptStringToString((*source).Brand)
|
||||
productsProduct.Description = mapping.OptStringToString((*source).Description)
|
||||
pProductsProduct = &productsProduct
|
||||
}
|
||||
return pProductsProduct
|
||||
|
||||
Reference in New Issue
Block a user