refactor: localize protobuf definitions

This commit is contained in:
2026-08-09 20:14:57 +08:00
parent 9f6f318bbb
commit 5ea45a76fe
429 changed files with 54058 additions and 61623 deletions

View File

@@ -7,7 +7,6 @@
package mall
import (
protobuf "bsm/full/protobuf"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -231,7 +230,7 @@ var File_module_ec_mall_proto_ads_proto protoreflect.FileDescriptor
const file_module_ec_mall_proto_ads_proto_rawDesc = "" +
"\n" +
"\x1emodule/ec/mall/proto/ads.proto\x12\x04mall\x1a\x15protobuf/blocks.proto\"P\n" +
"\x1emodule/ec/mall/proto/ads.proto\x12\x04mall\x1a module/ec/mall/proto/const.proto\"P\n" +
"\fByPosRequest\x12\x18\n" +
"\apos_key\x18\x01 \x03(\tR\apos_key\x12&\n" +
"\x0estore_identity\x18\x02 \x01(\tR\x0estore_identity\"G\n" +
@@ -270,12 +269,12 @@ func file_module_ec_mall_proto_ads_proto_rawDescGZIP() []byte {
var file_module_ec_mall_proto_ads_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_module_ec_mall_proto_ads_proto_goTypes = []any{
(*ByPosRequest)(nil), // 0: mall.ByPosRequest
(*AdsListReply)(nil), // 1: mall.AdsListReply
(*AdsItem)(nil), // 2: mall.AdsItem
(*protobuf.MallFetchRequest)(nil), // 3: blocks.MallFetchRequest
(*protobuf.IdentRequest)(nil), // 4: blocks.IdentRequest
(*protobuf.IdentityStatusReply)(nil), // 5: blocks.IdentityStatusReply
(*ByPosRequest)(nil), // 0: mall.ByPosRequest
(*AdsListReply)(nil), // 1: mall.AdsListReply
(*AdsItem)(nil), // 2: mall.AdsItem
(*MallFetchRequest)(nil), // 3: blocks.MallFetchRequest
(*IdentRequest)(nil), // 4: blocks.IdentRequest
(*IdentityStatusReply)(nil), // 5: blocks.IdentityStatusReply
}
var file_module_ec_mall_proto_ads_proto_depIdxs = []int32{
2, // 0: mall.AdsListReply.data:type_name -> mall.AdsItem
@@ -301,6 +300,7 @@ func file_module_ec_mall_proto_ads_proto_init() {
if File_module_ec_mall_proto_ads_proto != nil {
return
}
file_module_ec_mall_proto_const_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@@ -9,7 +9,6 @@ It translates gRPC into RESTful JSON APIs.
package mall
import (
"bsm/full/protobuf"
"context"
"errors"
"io"
@@ -65,7 +64,7 @@ func local_request_Ads_ByPos_0(ctx context.Context, marshaler runtime.Marshaler,
func request_Ads_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client AdsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -80,7 +79,7 @@ func request_Ads_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, clien
func local_request_Ads_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server AdsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -146,7 +145,7 @@ func local_request_Ads_Modify_0(ctx context.Context, marshaler runtime.Marshaler
func request_Ads_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client AdsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -161,7 +160,7 @@ func request_Ads_Delete_0(ctx context.Context, marshaler runtime.Marshaler, clie
func local_request_Ads_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server AdsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {

View File

@@ -7,7 +7,6 @@
package mall
import (
protobuf "bsm/full/protobuf"
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -36,13 +35,13 @@ type AdsClient interface {
// 通过广告位获取广告信息
ByPos(ctx context.Context, in *ByPosRequest, opts ...grpc.CallOption) (*AdsListReply, error)
// 广告列表
Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*AdsListReply, error)
Fetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*AdsListReply, error)
// 新建广告
Create(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
Create(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 修改广告
Modify(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
Modify(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 删除广告
Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
}
type adsClient struct {
@@ -63,7 +62,7 @@ func (c *adsClient) ByPos(ctx context.Context, in *ByPosRequest, opts ...grpc.Ca
return out, nil
}
func (c *adsClient) Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*AdsListReply, error) {
func (c *adsClient) Fetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*AdsListReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AdsListReply)
err := c.cc.Invoke(ctx, Ads_Fetch_FullMethodName, in, out, cOpts...)
@@ -73,9 +72,9 @@ func (c *adsClient) Fetch(ctx context.Context, in *protobuf.MallFetchRequest, op
return out, nil
}
func (c *adsClient) Create(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *adsClient) Create(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Ads_Create_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -83,9 +82,9 @@ func (c *adsClient) Create(ctx context.Context, in *AdsItem, opts ...grpc.CallOp
return out, nil
}
func (c *adsClient) Modify(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *adsClient) Modify(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Ads_Modify_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -93,9 +92,9 @@ func (c *adsClient) Modify(ctx context.Context, in *AdsItem, opts ...grpc.CallOp
return out, nil
}
func (c *adsClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *adsClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Ads_Delete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -112,13 +111,13 @@ type AdsServer interface {
// 通过广告位获取广告信息
ByPos(context.Context, *ByPosRequest) (*AdsListReply, error)
// 广告列表
Fetch(context.Context, *protobuf.MallFetchRequest) (*AdsListReply, error)
Fetch(context.Context, *MallFetchRequest) (*AdsListReply, error)
// 新建广告
Create(context.Context, *AdsItem) (*protobuf.IdentityStatusReply, error)
Create(context.Context, *AdsItem) (*IdentityStatusReply, error)
// 修改广告
Modify(context.Context, *AdsItem) (*protobuf.IdentityStatusReply, error)
Modify(context.Context, *AdsItem) (*IdentityStatusReply, error)
// 删除广告
Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error)
Delete(context.Context, *IdentRequest) (*IdentityStatusReply, error)
}
// UnimplementedAdsServer should be embedded to have
@@ -131,16 +130,16 @@ type UnimplementedAdsServer struct{}
func (UnimplementedAdsServer) ByPos(context.Context, *ByPosRequest) (*AdsListReply, error) {
return nil, status.Error(codes.Unimplemented, "method ByPos not implemented")
}
func (UnimplementedAdsServer) Fetch(context.Context, *protobuf.MallFetchRequest) (*AdsListReply, error) {
func (UnimplementedAdsServer) Fetch(context.Context, *MallFetchRequest) (*AdsListReply, error) {
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
}
func (UnimplementedAdsServer) Create(context.Context, *AdsItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedAdsServer) Create(context.Context, *AdsItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedAdsServer) Modify(context.Context, *AdsItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedAdsServer) Modify(context.Context, *AdsItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Modify not implemented")
}
func (UnimplementedAdsServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedAdsServer) Delete(context.Context, *IdentRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedAdsServer) testEmbeddedByValue() {}
@@ -182,7 +181,7 @@ func _Ads_ByPos_Handler(srv interface{}, ctx context.Context, dec func(interface
}
func _Ads_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.MallFetchRequest)
in := new(MallFetchRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -194,7 +193,7 @@ func _Ads_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface
FullMethod: Ads_Fetch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AdsServer).Fetch(ctx, req.(*protobuf.MallFetchRequest))
return srv.(AdsServer).Fetch(ctx, req.(*MallFetchRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -236,7 +235,7 @@ func _Ads_Modify_Handler(srv interface{}, ctx context.Context, dec func(interfac
}
func _Ads_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -248,7 +247,7 @@ func _Ads_Delete_Handler(srv interface{}, ctx context.Context, dec func(interfac
FullMethod: Ads_Delete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AdsServer).Delete(ctx, req.(*protobuf.IdentRequest))
return srv.(AdsServer).Delete(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}

View File

@@ -1,11 +0,0 @@
package mall
import blocks "bsm/full/protobuf"
type Empty = blocks.Empty
type FetchRequest = blocks.MallFetchRequest
type IdentRequest = blocks.IdentRequest
type StoreSerialRequest = blocks.StoreSerialRequest
type StatusReply = blocks.IdentityStatusReply
type VersionRequest = blocks.VersionRequest
type SearchRequest = blocks.SearchRequest

View File

@@ -7,7 +7,6 @@
package mall
import (
protobuf "bsm/full/protobuf"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -286,7 +285,7 @@ var File_module_ec_mall_proto_category_proto protoreflect.FileDescriptor
const file_module_ec_mall_proto_category_proto_rawDesc = "" +
"\n" +
"#module/ec/mall/proto/category.proto\x12\x04mall\x1a\x15protobuf/blocks.proto\"\x80\x01\n" +
"#module/ec/mall/proto/category.proto\x12\x04mall\x1a module/ec/mall/proto/const.proto\"\x80\x01\n" +
"\x14CategoryFetchRequest\x12\x14\n" +
"\x05types\x18\x01 \x01(\tR\x05types\x12\x1a\n" +
"\bkeywords\x18\x02 \x01(\tR\bkeywords\x12\x0e\n" +
@@ -334,11 +333,11 @@ func file_module_ec_mall_proto_category_proto_rawDescGZIP() []byte {
var file_module_ec_mall_proto_category_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_module_ec_mall_proto_category_proto_goTypes = []any{
(*CategoryFetchRequest)(nil), // 0: mall.CategoryFetchRequest
(*CategoryReply)(nil), // 1: mall.CategoryReply
(*CategoryItem)(nil), // 2: mall.CategoryItem
(*protobuf.IdentRequest)(nil), // 3: blocks.IdentRequest
(*protobuf.IdentityStatusReply)(nil), // 4: blocks.IdentityStatusReply
(*CategoryFetchRequest)(nil), // 0: mall.CategoryFetchRequest
(*CategoryReply)(nil), // 1: mall.CategoryReply
(*CategoryItem)(nil), // 2: mall.CategoryItem
(*IdentRequest)(nil), // 3: blocks.IdentRequest
(*IdentityStatusReply)(nil), // 4: blocks.IdentityStatusReply
}
var file_module_ec_mall_proto_category_proto_depIdxs = []int32{
2, // 0: mall.CategoryReply.data:type_name -> mall.CategoryItem
@@ -363,6 +362,7 @@ func file_module_ec_mall_proto_category_proto_init() {
if File_module_ec_mall_proto_category_proto != nil {
return
}
file_module_ec_mall_proto_const_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@@ -9,7 +9,6 @@ It translates gRPC into RESTful JSON APIs.
package mall
import (
"bsm/full/protobuf"
"context"
"errors"
"io"
@@ -92,7 +91,7 @@ func local_request_Category_Create_0(ctx context.Context, marshaler runtime.Mars
func request_Category_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client CategoryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -107,7 +106,7 @@ func request_Category_Delete_0(ctx context.Context, marshaler runtime.Marshaler,
func local_request_Category_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server CategoryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {

View File

@@ -7,7 +7,6 @@
package mall
import (
protobuf "bsm/full/protobuf"
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -35,11 +34,11 @@ type CategoryClient interface {
// 获取分类数据
Fetch(ctx context.Context, in *CategoryFetchRequest, opts ...grpc.CallOption) (*CategoryReply, error)
// 添加分类
Create(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
Create(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 删除分类
Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 修改分类
Modify(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
Modify(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
}
type categoryClient struct {
@@ -60,9 +59,9 @@ func (c *categoryClient) Fetch(ctx context.Context, in *CategoryFetchRequest, op
return out, nil
}
func (c *categoryClient) Create(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *categoryClient) Create(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Category_Create_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -70,9 +69,9 @@ func (c *categoryClient) Create(ctx context.Context, in *CategoryItem, opts ...g
return out, nil
}
func (c *categoryClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *categoryClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Category_Delete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -80,9 +79,9 @@ func (c *categoryClient) Delete(ctx context.Context, in *protobuf.IdentRequest,
return out, nil
}
func (c *categoryClient) Modify(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *categoryClient) Modify(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Category_Modify_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -99,11 +98,11 @@ type CategoryServer interface {
// 获取分类数据
Fetch(context.Context, *CategoryFetchRequest) (*CategoryReply, error)
// 添加分类
Create(context.Context, *CategoryItem) (*protobuf.IdentityStatusReply, error)
Create(context.Context, *CategoryItem) (*IdentityStatusReply, error)
// 删除分类
Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error)
Delete(context.Context, *IdentRequest) (*IdentityStatusReply, error)
// 修改分类
Modify(context.Context, *CategoryItem) (*protobuf.IdentityStatusReply, error)
Modify(context.Context, *CategoryItem) (*IdentityStatusReply, error)
}
// UnimplementedCategoryServer should be embedded to have
@@ -116,13 +115,13 @@ type UnimplementedCategoryServer struct{}
func (UnimplementedCategoryServer) Fetch(context.Context, *CategoryFetchRequest) (*CategoryReply, error) {
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
}
func (UnimplementedCategoryServer) Create(context.Context, *CategoryItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedCategoryServer) Create(context.Context, *CategoryItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedCategoryServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedCategoryServer) Delete(context.Context, *IdentRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedCategoryServer) Modify(context.Context, *CategoryItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedCategoryServer) Modify(context.Context, *CategoryItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Modify not implemented")
}
func (UnimplementedCategoryServer) testEmbeddedByValue() {}
@@ -182,7 +181,7 @@ func _Category_Create_Handler(srv interface{}, ctx context.Context, dec func(int
}
func _Category_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -194,7 +193,7 @@ func _Category_Delete_Handler(srv interface{}, ctx context.Context, dec func(int
FullMethod: Category_Delete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CategoryServer).Delete(ctx, req.(*protobuf.IdentRequest))
return srv.(CategoryServer).Delete(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,6 @@
package mall
import (
protobuf "bsm/full/protobuf"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -498,7 +497,7 @@ var File_module_ec_mall_proto_freight_proto protoreflect.FileDescriptor
const file_module_ec_mall_proto_freight_proto_rawDesc = "" +
"\n" +
"\"module/ec/mall/proto/freight.proto\x12\x04mall\x1a\x15protobuf/blocks.proto\"\xa2\x01\n" +
"\"module/ec/mall/proto/freight.proto\x12\x04mall\x1a module/ec/mall/proto/const.proto\"\xa2\x01\n" +
"\x0eDenyRegionItem\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
"\bidentity\x18\x02 \x01(\tR\bidentity\x12$\n" +
@@ -568,15 +567,15 @@ func file_module_ec_mall_proto_freight_proto_rawDescGZIP() []byte {
var file_module_ec_mall_proto_freight_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_module_ec_mall_proto_freight_proto_goTypes = []any{
(*DenyRegionItem)(nil), // 0: mall.DenyRegionItem
(*FreightItem)(nil), // 1: mall.FreightItem
(*RegionItem)(nil), // 2: mall.RegionItem
(*FreightAttrItem)(nil), // 3: mall.FreightAttrItem
(*FreightReply)(nil), // 4: mall.FreightReply
(*DenyRegionReply)(nil), // 5: mall.DenyRegionReply
(*protobuf.MallFetchRequest)(nil), // 6: blocks.MallFetchRequest
(*protobuf.IdentRequest)(nil), // 7: blocks.IdentRequest
(*protobuf.IdentityStatusReply)(nil), // 8: blocks.IdentityStatusReply
(*DenyRegionItem)(nil), // 0: mall.DenyRegionItem
(*FreightItem)(nil), // 1: mall.FreightItem
(*RegionItem)(nil), // 2: mall.RegionItem
(*FreightAttrItem)(nil), // 3: mall.FreightAttrItem
(*FreightReply)(nil), // 4: mall.FreightReply
(*DenyRegionReply)(nil), // 5: mall.DenyRegionReply
(*MallFetchRequest)(nil), // 6: blocks.MallFetchRequest
(*IdentRequest)(nil), // 7: blocks.IdentRequest
(*IdentityStatusReply)(nil), // 8: blocks.IdentityStatusReply
}
var file_module_ec_mall_proto_freight_proto_depIdxs = []int32{
2, // 0: mall.DenyRegionItem.region:type_name -> mall.RegionItem
@@ -615,6 +614,7 @@ func file_module_ec_mall_proto_freight_proto_init() {
if File_module_ec_mall_proto_freight_proto != nil {
return
}
file_module_ec_mall_proto_const_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@@ -9,7 +9,6 @@ It translates gRPC into RESTful JSON APIs.
package mall
import (
"bsm/full/protobuf"
"context"
"errors"
"io"
@@ -38,7 +37,7 @@ var (
func request_Freight_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client FreightClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -53,7 +52,7 @@ func request_Freight_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, c
func local_request_Freight_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server FreightServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -92,7 +91,7 @@ func local_request_Freight_Modify_0(ctx context.Context, marshaler runtime.Marsh
func request_Freight_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client FreightClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -107,7 +106,7 @@ func request_Freight_Delete_0(ctx context.Context, marshaler runtime.Marshaler,
func local_request_Freight_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server FreightServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -146,7 +145,7 @@ func local_request_Freight_Create_0(ctx context.Context, marshaler runtime.Marsh
func request_Freight_Detail_0(ctx context.Context, marshaler runtime.Marshaler, client FreightClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -161,7 +160,7 @@ func request_Freight_Detail_0(ctx context.Context, marshaler runtime.Marshaler,
func local_request_Freight_Detail_0(ctx context.Context, marshaler runtime.Marshaler, server FreightServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -173,7 +172,7 @@ func local_request_Freight_Detail_0(ctx context.Context, marshaler runtime.Marsh
func request_Freight_DenyRegionFetch_0(ctx context.Context, marshaler runtime.Marshaler, client FreightClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -188,7 +187,7 @@ func request_Freight_DenyRegionFetch_0(ctx context.Context, marshaler runtime.Ma
func local_request_Freight_DenyRegionFetch_0(ctx context.Context, marshaler runtime.Marshaler, server FreightServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -227,7 +226,7 @@ func local_request_Freight_DenyRegionCreate_0(ctx context.Context, marshaler run
func request_Freight_DenyRegionDelete_0(ctx context.Context, marshaler runtime.Marshaler, client FreightClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -242,7 +241,7 @@ func request_Freight_DenyRegionDelete_0(ctx context.Context, marshaler runtime.M
func local_request_Freight_DenyRegionDelete_0(ctx context.Context, marshaler runtime.Marshaler, server FreightServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {

View File

@@ -7,7 +7,6 @@
package mall
import (
protobuf "bsm/full/protobuf"
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -38,23 +37,23 @@ const (
// 运费设置相关
type FreightClient interface {
// 运费模板列表
Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*FreightReply, error)
Fetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*FreightReply, error)
// 运费模板修改
Modify(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
Modify(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 运费模板删除
Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 运费模板创建
Create(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
Create(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 运费模板详情
Detail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*FreightItem, error)
Detail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*FreightItem, error)
// 限制区域列表
DenyRegionFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*DenyRegionReply, error)
DenyRegionFetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*DenyRegionReply, error)
// 新建限制区域
DenyRegionCreate(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
DenyRegionCreate(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 移除限制区域
DenyRegionDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
DenyRegionDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 编辑限制区域
DenyRegionModify(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
DenyRegionModify(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
}
type freightClient struct {
@@ -65,7 +64,7 @@ func NewFreightClient(cc grpc.ClientConnInterface) FreightClient {
return &freightClient{cc}
}
func (c *freightClient) Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*FreightReply, error) {
func (c *freightClient) Fetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*FreightReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(FreightReply)
err := c.cc.Invoke(ctx, Freight_Fetch_FullMethodName, in, out, cOpts...)
@@ -75,9 +74,9 @@ func (c *freightClient) Fetch(ctx context.Context, in *protobuf.MallFetchRequest
return out, nil
}
func (c *freightClient) Modify(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *freightClient) Modify(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Freight_Modify_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -85,9 +84,9 @@ func (c *freightClient) Modify(ctx context.Context, in *FreightItem, opts ...grp
return out, nil
}
func (c *freightClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *freightClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Freight_Delete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -95,9 +94,9 @@ func (c *freightClient) Delete(ctx context.Context, in *protobuf.IdentRequest, o
return out, nil
}
func (c *freightClient) Create(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *freightClient) Create(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Freight_Create_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -105,7 +104,7 @@ func (c *freightClient) Create(ctx context.Context, in *FreightItem, opts ...grp
return out, nil
}
func (c *freightClient) Detail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*FreightItem, error) {
func (c *freightClient) Detail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*FreightItem, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(FreightItem)
err := c.cc.Invoke(ctx, Freight_Detail_FullMethodName, in, out, cOpts...)
@@ -115,7 +114,7 @@ func (c *freightClient) Detail(ctx context.Context, in *protobuf.IdentRequest, o
return out, nil
}
func (c *freightClient) DenyRegionFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*DenyRegionReply, error) {
func (c *freightClient) DenyRegionFetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*DenyRegionReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DenyRegionReply)
err := c.cc.Invoke(ctx, Freight_DenyRegionFetch_FullMethodName, in, out, cOpts...)
@@ -125,9 +124,9 @@ func (c *freightClient) DenyRegionFetch(ctx context.Context, in *protobuf.MallFe
return out, nil
}
func (c *freightClient) DenyRegionCreate(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *freightClient) DenyRegionCreate(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Freight_DenyRegionCreate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -135,9 +134,9 @@ func (c *freightClient) DenyRegionCreate(ctx context.Context, in *DenyRegionItem
return out, nil
}
func (c *freightClient) DenyRegionDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *freightClient) DenyRegionDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Freight_DenyRegionDelete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -145,9 +144,9 @@ func (c *freightClient) DenyRegionDelete(ctx context.Context, in *protobuf.Ident
return out, nil
}
func (c *freightClient) DenyRegionModify(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *freightClient) DenyRegionModify(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Freight_DenyRegionModify_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -162,23 +161,23 @@ func (c *freightClient) DenyRegionModify(ctx context.Context, in *DenyRegionItem
// 运费设置相关
type FreightServer interface {
// 运费模板列表
Fetch(context.Context, *protobuf.MallFetchRequest) (*FreightReply, error)
Fetch(context.Context, *MallFetchRequest) (*FreightReply, error)
// 运费模板修改
Modify(context.Context, *FreightItem) (*protobuf.IdentityStatusReply, error)
Modify(context.Context, *FreightItem) (*IdentityStatusReply, error)
// 运费模板删除
Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error)
Delete(context.Context, *IdentRequest) (*IdentityStatusReply, error)
// 运费模板创建
Create(context.Context, *FreightItem) (*protobuf.IdentityStatusReply, error)
Create(context.Context, *FreightItem) (*IdentityStatusReply, error)
// 运费模板详情
Detail(context.Context, *protobuf.IdentRequest) (*FreightItem, error)
Detail(context.Context, *IdentRequest) (*FreightItem, error)
// 限制区域列表
DenyRegionFetch(context.Context, *protobuf.MallFetchRequest) (*DenyRegionReply, error)
DenyRegionFetch(context.Context, *MallFetchRequest) (*DenyRegionReply, error)
// 新建限制区域
DenyRegionCreate(context.Context, *DenyRegionItem) (*protobuf.IdentityStatusReply, error)
DenyRegionCreate(context.Context, *DenyRegionItem) (*IdentityStatusReply, error)
// 移除限制区域
DenyRegionDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error)
DenyRegionDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error)
// 编辑限制区域
DenyRegionModify(context.Context, *DenyRegionItem) (*protobuf.IdentityStatusReply, error)
DenyRegionModify(context.Context, *DenyRegionItem) (*IdentityStatusReply, error)
}
// UnimplementedFreightServer should be embedded to have
@@ -188,31 +187,31 @@ type FreightServer interface {
// pointer dereference when methods are called.
type UnimplementedFreightServer struct{}
func (UnimplementedFreightServer) Fetch(context.Context, *protobuf.MallFetchRequest) (*FreightReply, error) {
func (UnimplementedFreightServer) Fetch(context.Context, *MallFetchRequest) (*FreightReply, error) {
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
}
func (UnimplementedFreightServer) Modify(context.Context, *FreightItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedFreightServer) Modify(context.Context, *FreightItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Modify not implemented")
}
func (UnimplementedFreightServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedFreightServer) Delete(context.Context, *IdentRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedFreightServer) Create(context.Context, *FreightItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedFreightServer) Create(context.Context, *FreightItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedFreightServer) Detail(context.Context, *protobuf.IdentRequest) (*FreightItem, error) {
func (UnimplementedFreightServer) Detail(context.Context, *IdentRequest) (*FreightItem, error) {
return nil, status.Error(codes.Unimplemented, "method Detail not implemented")
}
func (UnimplementedFreightServer) DenyRegionFetch(context.Context, *protobuf.MallFetchRequest) (*DenyRegionReply, error) {
func (UnimplementedFreightServer) DenyRegionFetch(context.Context, *MallFetchRequest) (*DenyRegionReply, error) {
return nil, status.Error(codes.Unimplemented, "method DenyRegionFetch not implemented")
}
func (UnimplementedFreightServer) DenyRegionCreate(context.Context, *DenyRegionItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedFreightServer) DenyRegionCreate(context.Context, *DenyRegionItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method DenyRegionCreate not implemented")
}
func (UnimplementedFreightServer) DenyRegionDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedFreightServer) DenyRegionDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method DenyRegionDelete not implemented")
}
func (UnimplementedFreightServer) DenyRegionModify(context.Context, *DenyRegionItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedFreightServer) DenyRegionModify(context.Context, *DenyRegionItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method DenyRegionModify not implemented")
}
func (UnimplementedFreightServer) testEmbeddedByValue() {}
@@ -236,7 +235,7 @@ func RegisterFreightServer(s grpc.ServiceRegistrar, srv FreightServer) {
}
func _Freight_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.MallFetchRequest)
in := new(MallFetchRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -248,7 +247,7 @@ func _Freight_Fetch_Handler(srv interface{}, ctx context.Context, dec func(inter
FullMethod: Freight_Fetch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FreightServer).Fetch(ctx, req.(*protobuf.MallFetchRequest))
return srv.(FreightServer).Fetch(ctx, req.(*MallFetchRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -272,7 +271,7 @@ func _Freight_Modify_Handler(srv interface{}, ctx context.Context, dec func(inte
}
func _Freight_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -284,7 +283,7 @@ func _Freight_Delete_Handler(srv interface{}, ctx context.Context, dec func(inte
FullMethod: Freight_Delete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FreightServer).Delete(ctx, req.(*protobuf.IdentRequest))
return srv.(FreightServer).Delete(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -308,7 +307,7 @@ func _Freight_Create_Handler(srv interface{}, ctx context.Context, dec func(inte
}
func _Freight_Detail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -320,13 +319,13 @@ func _Freight_Detail_Handler(srv interface{}, ctx context.Context, dec func(inte
FullMethod: Freight_Detail_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FreightServer).Detail(ctx, req.(*protobuf.IdentRequest))
return srv.(FreightServer).Detail(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Freight_DenyRegionFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.MallFetchRequest)
in := new(MallFetchRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -338,7 +337,7 @@ func _Freight_DenyRegionFetch_Handler(srv interface{}, ctx context.Context, dec
FullMethod: Freight_DenyRegionFetch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FreightServer).DenyRegionFetch(ctx, req.(*protobuf.MallFetchRequest))
return srv.(FreightServer).DenyRegionFetch(ctx, req.(*MallFetchRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -362,7 +361,7 @@ func _Freight_DenyRegionCreate_Handler(srv interface{}, ctx context.Context, dec
}
func _Freight_DenyRegionDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -374,7 +373,7 @@ func _Freight_DenyRegionDelete_Handler(srv interface{}, ctx context.Context, dec
FullMethod: Freight_DenyRegionDelete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FreightServer).DenyRegionDelete(ctx, req.(*protobuf.IdentRequest))
return srv.(FreightServer).DenyRegionDelete(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}

View File

@@ -7,7 +7,6 @@
package mall
import (
protobuf "bsm/full/protobuf"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -180,7 +179,7 @@ var File_module_ec_mall_proto_notice_proto protoreflect.FileDescriptor
const file_module_ec_mall_proto_notice_proto_rawDesc = "" +
"\n" +
"!module/ec/mall/proto/notice.proto\x12\x04mall\x1a\x15protobuf/blocks.proto\"M\n" +
"!module/ec/mall/proto/notice.proto\x12\x04mall\x1a module/ec/mall/proto/const.proto\"M\n" +
"\x0fNoticeListReply\x12$\n" +
"\x04data\x18\x01 \x03(\v2\x10.mall.NoticeItemR\x04data\x12\x14\n" +
"\x05count\x18\x02 \x01(\x03R\x05count\"\xec\x01\n" +
@@ -216,11 +215,11 @@ func file_module_ec_mall_proto_notice_proto_rawDescGZIP() []byte {
var file_module_ec_mall_proto_notice_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_module_ec_mall_proto_notice_proto_goTypes = []any{
(*NoticeListReply)(nil), // 0: mall.NoticeListReply
(*NoticeItem)(nil), // 1: mall.NoticeItem
(*protobuf.MallFetchRequest)(nil), // 2: blocks.MallFetchRequest
(*protobuf.IdentRequest)(nil), // 3: blocks.IdentRequest
(*protobuf.IdentityStatusReply)(nil), // 4: blocks.IdentityStatusReply
(*NoticeListReply)(nil), // 0: mall.NoticeListReply
(*NoticeItem)(nil), // 1: mall.NoticeItem
(*MallFetchRequest)(nil), // 2: blocks.MallFetchRequest
(*IdentRequest)(nil), // 3: blocks.IdentRequest
(*IdentityStatusReply)(nil), // 4: blocks.IdentityStatusReply
}
var file_module_ec_mall_proto_notice_proto_depIdxs = []int32{
1, // 0: mall.NoticeListReply.data:type_name -> mall.NoticeItem
@@ -244,6 +243,7 @@ func file_module_ec_mall_proto_notice_proto_init() {
if File_module_ec_mall_proto_notice_proto != nil {
return
}
file_module_ec_mall_proto_const_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@@ -9,7 +9,6 @@ It translates gRPC into RESTful JSON APIs.
package mall
import (
"bsm/full/protobuf"
"context"
"errors"
"io"
@@ -38,7 +37,7 @@ var (
func request_Notice_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client NoticeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -53,7 +52,7 @@ func request_Notice_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, cl
func local_request_Notice_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server NoticeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -119,7 +118,7 @@ func local_request_Notice_Modify_0(ctx context.Context, marshaler runtime.Marsha
func request_Notice_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client NoticeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -134,7 +133,7 @@ func request_Notice_Delete_0(ctx context.Context, marshaler runtime.Marshaler, c
func local_request_Notice_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server NoticeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {

View File

@@ -7,7 +7,6 @@
package mall
import (
protobuf "bsm/full/protobuf"
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -33,13 +32,13 @@ const (
// Store(店铺)微服务-公告
type NoticeClient interface {
// 公告列表
Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*NoticeListReply, error)
Fetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*NoticeListReply, error)
// 新建公告
Create(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
Create(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 修改公告
Modify(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
Modify(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 删除公告
Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
}
type noticeClient struct {
@@ -50,7 +49,7 @@ func NewNoticeClient(cc grpc.ClientConnInterface) NoticeClient {
return &noticeClient{cc}
}
func (c *noticeClient) Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*NoticeListReply, error) {
func (c *noticeClient) Fetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*NoticeListReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(NoticeListReply)
err := c.cc.Invoke(ctx, Notice_Fetch_FullMethodName, in, out, cOpts...)
@@ -60,9 +59,9 @@ func (c *noticeClient) Fetch(ctx context.Context, in *protobuf.MallFetchRequest,
return out, nil
}
func (c *noticeClient) Create(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *noticeClient) Create(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Notice_Create_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -70,9 +69,9 @@ func (c *noticeClient) Create(ctx context.Context, in *NoticeItem, opts ...grpc.
return out, nil
}
func (c *noticeClient) Modify(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *noticeClient) Modify(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Notice_Modify_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -80,9 +79,9 @@ func (c *noticeClient) Modify(ctx context.Context, in *NoticeItem, opts ...grpc.
return out, nil
}
func (c *noticeClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *noticeClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Notice_Delete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -97,13 +96,13 @@ func (c *noticeClient) Delete(ctx context.Context, in *protobuf.IdentRequest, op
// Store(店铺)微服务-公告
type NoticeServer interface {
// 公告列表
Fetch(context.Context, *protobuf.MallFetchRequest) (*NoticeListReply, error)
Fetch(context.Context, *MallFetchRequest) (*NoticeListReply, error)
// 新建公告
Create(context.Context, *NoticeItem) (*protobuf.IdentityStatusReply, error)
Create(context.Context, *NoticeItem) (*IdentityStatusReply, error)
// 修改公告
Modify(context.Context, *NoticeItem) (*protobuf.IdentityStatusReply, error)
Modify(context.Context, *NoticeItem) (*IdentityStatusReply, error)
// 删除公告
Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error)
Delete(context.Context, *IdentRequest) (*IdentityStatusReply, error)
}
// UnimplementedNoticeServer should be embedded to have
@@ -113,16 +112,16 @@ type NoticeServer interface {
// pointer dereference when methods are called.
type UnimplementedNoticeServer struct{}
func (UnimplementedNoticeServer) Fetch(context.Context, *protobuf.MallFetchRequest) (*NoticeListReply, error) {
func (UnimplementedNoticeServer) Fetch(context.Context, *MallFetchRequest) (*NoticeListReply, error) {
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
}
func (UnimplementedNoticeServer) Create(context.Context, *NoticeItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedNoticeServer) Create(context.Context, *NoticeItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedNoticeServer) Modify(context.Context, *NoticeItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedNoticeServer) Modify(context.Context, *NoticeItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Modify not implemented")
}
func (UnimplementedNoticeServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedNoticeServer) Delete(context.Context, *IdentRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedNoticeServer) testEmbeddedByValue() {}
@@ -146,7 +145,7 @@ func RegisterNoticeServer(s grpc.ServiceRegistrar, srv NoticeServer) {
}
func _Notice_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.MallFetchRequest)
in := new(MallFetchRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -158,7 +157,7 @@ func _Notice_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interf
FullMethod: Notice_Fetch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NoticeServer).Fetch(ctx, req.(*protobuf.MallFetchRequest))
return srv.(NoticeServer).Fetch(ctx, req.(*MallFetchRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -200,7 +199,7 @@ func _Notice_Modify_Handler(srv interface{}, ctx context.Context, dec func(inter
}
func _Notice_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -212,7 +211,7 @@ func _Notice_Delete_Handler(srv interface{}, ctx context.Context, dec func(inter
FullMethod: Notice_Delete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NoticeServer).Delete(ctx, req.(*protobuf.IdentRequest))
return srv.(NoticeServer).Delete(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}

View File

@@ -7,7 +7,6 @@
package mall
import (
protobuf "bsm/full/protobuf"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -2130,7 +2129,7 @@ var File_module_ec_mall_proto_product_proto protoreflect.FileDescriptor
const file_module_ec_mall_proto_product_proto_rawDesc = "" +
"\n" +
"\"module/ec/mall/proto/product.proto\x12\x04mall\x1a\x15protobuf/blocks.proto\"b\n" +
"\"module/ec/mall/proto/product.proto\x12\x04mall\x1a module/ec/mall/proto/const.proto\"b\n" +
"\bAttrItem\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" +
"\x04name\x18\x02 \x01(\tR\x04name\x12\x1c\n" +
@@ -2406,31 +2405,31 @@ func file_module_ec_mall_proto_product_proto_rawDescGZIP() []byte {
var file_module_ec_mall_proto_product_proto_msgTypes = make([]protoimpl.MessageInfo, 21)
var file_module_ec_mall_proto_product_proto_goTypes = []any{
(*AttrItem)(nil), // 0: mall.AttrItem
(*CommentItem)(nil), // 1: mall.CommentItem
(*CommentItemRep)(nil), // 2: mall.CommentItemRep
(*DetailBySpecRequest)(nil), // 3: mall.DetailBySpecRequest
(*OpRequest)(nil), // 4: mall.OpRequest
(*ModifyRequest)(nil), // 5: mall.ModifyRequest
(*ListItem)(nil), // 6: mall.ListItem
(*ListWithIdRequest)(nil), // 7: mall.ListWithIdRequest
(*ListWithIdReply)(nil), // 8: mall.ListWithIdReply
(*PhotoReply)(nil), // 9: mall.PhotoReply
(*SpecReply)(nil), // 10: mall.SpecReply
(*CommentListReply)(nil), // 11: mall.CommentListReply
(*StatisticReply)(nil), // 12: mall.StatisticReply
(*OrgBySpecIdReply)(nil), // 13: mall.OrgBySpecIdReply
(*Subjoin)(nil), // 14: mall.Subjoin
(*ListReply)(nil), // 15: mall.ListReply
(*ProductBase)(nil), // 16: mall.ProductBase
(*SpecItem)(nil), // 17: mall.SpecItem
(*PhotoItem)(nil), // 18: mall.PhotoItem
(*CategoriesItem)(nil), // 19: mall.CategoriesItem
(*ProductItem)(nil), // 20: mall.ProductItem
(*protobuf.MallFetchRequest)(nil), // 21: blocks.MallFetchRequest
(*protobuf.IdentRequest)(nil), // 22: blocks.IdentRequest
(*protobuf.StoreSerialRequest)(nil), // 23: blocks.StoreSerialRequest
(*protobuf.IdentityStatusReply)(nil), // 24: blocks.IdentityStatusReply
(*AttrItem)(nil), // 0: mall.AttrItem
(*CommentItem)(nil), // 1: mall.CommentItem
(*CommentItemRep)(nil), // 2: mall.CommentItemRep
(*DetailBySpecRequest)(nil), // 3: mall.DetailBySpecRequest
(*OpRequest)(nil), // 4: mall.OpRequest
(*ModifyRequest)(nil), // 5: mall.ModifyRequest
(*ListItem)(nil), // 6: mall.ListItem
(*ListWithIdRequest)(nil), // 7: mall.ListWithIdRequest
(*ListWithIdReply)(nil), // 8: mall.ListWithIdReply
(*PhotoReply)(nil), // 9: mall.PhotoReply
(*SpecReply)(nil), // 10: mall.SpecReply
(*CommentListReply)(nil), // 11: mall.CommentListReply
(*StatisticReply)(nil), // 12: mall.StatisticReply
(*OrgBySpecIdReply)(nil), // 13: mall.OrgBySpecIdReply
(*Subjoin)(nil), // 14: mall.Subjoin
(*ListReply)(nil), // 15: mall.ListReply
(*ProductBase)(nil), // 16: mall.ProductBase
(*SpecItem)(nil), // 17: mall.SpecItem
(*PhotoItem)(nil), // 18: mall.PhotoItem
(*CategoriesItem)(nil), // 19: mall.CategoriesItem
(*ProductItem)(nil), // 20: mall.ProductItem
(*MallFetchRequest)(nil), // 21: blocks.MallFetchRequest
(*IdentRequest)(nil), // 22: blocks.IdentRequest
(*StoreSerialRequest)(nil), // 23: blocks.StoreSerialRequest
(*IdentityStatusReply)(nil), // 24: blocks.IdentityStatusReply
}
var file_module_ec_mall_proto_product_proto_depIdxs = []int32{
1, // 0: mall.CommentItemRep.list:type_name -> mall.CommentItem
@@ -2497,6 +2496,7 @@ func file_module_ec_mall_proto_product_proto_init() {
if File_module_ec_mall_proto_product_proto != nil {
return
}
file_module_ec_mall_proto_const_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@@ -9,7 +9,6 @@ It translates gRPC into RESTful JSON APIs.
package mall
import (
"bsm/full/protobuf"
"context"
"errors"
"io"
@@ -38,7 +37,7 @@ var (
func request_Product_ItemFetch_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -53,7 +52,7 @@ func request_Product_ItemFetch_0(ctx context.Context, marshaler runtime.Marshale
func local_request_Product_ItemFetch_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -65,7 +64,7 @@ func local_request_Product_ItemFetch_0(ctx context.Context, marshaler runtime.Ma
func request_Product_ItemDetail_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -80,7 +79,7 @@ func request_Product_ItemDetail_0(ctx context.Context, marshaler runtime.Marshal
func local_request_Product_ItemDetail_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -92,7 +91,7 @@ func local_request_Product_ItemDetail_0(ctx context.Context, marshaler runtime.M
func request_Product_ItemDetailBySerial_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.StoreSerialRequest
protoReq StoreSerialRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -107,7 +106,7 @@ func request_Product_ItemDetailBySerial_0(ctx context.Context, marshaler runtime
func local_request_Product_ItemDetailBySerial_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.StoreSerialRequest
protoReq StoreSerialRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -173,7 +172,7 @@ func local_request_Product_ItemCreate_0(ctx context.Context, marshaler runtime.M
func request_Product_ItemDelete_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -188,7 +187,7 @@ func request_Product_ItemDelete_0(ctx context.Context, marshaler runtime.Marshal
func local_request_Product_ItemDelete_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -254,7 +253,7 @@ func local_request_Product_ItemBatchOp_0(ctx context.Context, marshaler runtime.
func request_Product_SpecFetch_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -269,7 +268,7 @@ func request_Product_SpecFetch_0(ctx context.Context, marshaler runtime.Marshale
func local_request_Product_SpecFetch_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -335,7 +334,7 @@ func local_request_Product_SpecModify_0(ctx context.Context, marshaler runtime.M
func request_Product_SpecDelete_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -350,7 +349,7 @@ func request_Product_SpecDelete_0(ctx context.Context, marshaler runtime.Marshal
func local_request_Product_SpecDelete_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -362,7 +361,7 @@ func local_request_Product_SpecDelete_0(ctx context.Context, marshaler runtime.M
func request_Product_SpecDetail_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -377,7 +376,7 @@ func request_Product_SpecDetail_0(ctx context.Context, marshaler runtime.Marshal
func local_request_Product_SpecDetail_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -416,7 +415,7 @@ func local_request_Product_PhotoCreate_0(ctx context.Context, marshaler runtime.
func request_Product_PhotoDelete_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -431,7 +430,7 @@ func request_Product_PhotoDelete_0(ctx context.Context, marshaler runtime.Marsha
func local_request_Product_PhotoDelete_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -470,7 +469,7 @@ func local_request_Product_PhotoList_0(ctx context.Context, marshaler runtime.Ma
func request_Product_CommentFetch_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -485,7 +484,7 @@ func request_Product_CommentFetch_0(ctx context.Context, marshaler runtime.Marsh
func local_request_Product_CommentFetch_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -551,7 +550,7 @@ func local_request_Product_CommentRe_0(ctx context.Context, marshaler runtime.Ma
func request_Product_CommentDelete_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -566,7 +565,7 @@ func request_Product_CommentDelete_0(ctx context.Context, marshaler runtime.Mars
func local_request_Product_CommentDelete_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {

View File

@@ -7,7 +7,6 @@
package mall
import (
protobuf "bsm/full/protobuf"
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -50,47 +49,47 @@ const (
// 产品相关
type ProductClient interface {
// 获取产品列表
ItemFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*ListReply, error)
ItemFetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*ListReply, error)
// 获取产品详情
ItemDetail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*ProductItem, error)
ItemDetail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ProductItem, error)
// 通过产品序列获取产品详情
ItemDetailBySerial(ctx context.Context, in *protobuf.StoreSerialRequest, opts ...grpc.CallOption) (*ListReply, error)
ItemDetailBySerial(ctx context.Context, in *StoreSerialRequest, opts ...grpc.CallOption) (*ListReply, error)
// 通过规格编号获取产品详情
ItemDetailBySpec(ctx context.Context, in *DetailBySpecRequest, opts ...grpc.CallOption) (*ListItem, error)
// 添加产品
ItemCreate(ctx context.Context, in *ProductItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
ItemCreate(ctx context.Context, in *ProductItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 删除产品
ItemDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
ItemDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 发布/取消发布 产品
ItemModify(ctx context.Context, in *ModifyRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
ItemModify(ctx context.Context, in *ModifyRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 批量操作
ItemBatchOp(ctx context.Context, in *OpRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
ItemBatchOp(ctx context.Context, in *OpRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 产品规格列表
SpecFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*SpecReply, error)
SpecFetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*SpecReply, error)
// 添加产品规格
SpecCreate(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
SpecCreate(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 修改产品规格
SpecModify(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
SpecModify(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 删除产品规格
SpecDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
SpecDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 产品详情
SpecDetail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*SpecItem, error)
SpecDetail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*SpecItem, error)
// 添加产品图片
PhotoCreate(ctx context.Context, in *PhotoItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
PhotoCreate(ctx context.Context, in *PhotoItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 删除产品图片
PhotoDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
PhotoDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 产品图片列表
PhotoList(ctx context.Context, in *PhotoItem, opts ...grpc.CallOption) (*PhotoReply, error)
// 产品的评论列表
CommentFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*CommentListReply, error)
CommentFetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*CommentListReply, error)
// 评论
CommentCreate(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
CommentCreate(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 回复评论
CommentRe(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
CommentRe(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 删除评论
CommentDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
CommentDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 修改评论
CommentModify(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
CommentModify(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
}
type productClient struct {
@@ -101,7 +100,7 @@ func NewProductClient(cc grpc.ClientConnInterface) ProductClient {
return &productClient{cc}
}
func (c *productClient) ItemFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*ListReply, error) {
func (c *productClient) ItemFetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*ListReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListReply)
err := c.cc.Invoke(ctx, Product_ItemFetch_FullMethodName, in, out, cOpts...)
@@ -111,7 +110,7 @@ func (c *productClient) ItemFetch(ctx context.Context, in *protobuf.MallFetchReq
return out, nil
}
func (c *productClient) ItemDetail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*ProductItem, error) {
func (c *productClient) ItemDetail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ProductItem, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ProductItem)
err := c.cc.Invoke(ctx, Product_ItemDetail_FullMethodName, in, out, cOpts...)
@@ -121,7 +120,7 @@ func (c *productClient) ItemDetail(ctx context.Context, in *protobuf.IdentReques
return out, nil
}
func (c *productClient) ItemDetailBySerial(ctx context.Context, in *protobuf.StoreSerialRequest, opts ...grpc.CallOption) (*ListReply, error) {
func (c *productClient) ItemDetailBySerial(ctx context.Context, in *StoreSerialRequest, opts ...grpc.CallOption) (*ListReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListReply)
err := c.cc.Invoke(ctx, Product_ItemDetailBySerial_FullMethodName, in, out, cOpts...)
@@ -141,9 +140,9 @@ func (c *productClient) ItemDetailBySpec(ctx context.Context, in *DetailBySpecRe
return out, nil
}
func (c *productClient) ItemCreate(ctx context.Context, in *ProductItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *productClient) ItemCreate(ctx context.Context, in *ProductItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Product_ItemCreate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -151,9 +150,9 @@ func (c *productClient) ItemCreate(ctx context.Context, in *ProductItem, opts ..
return out, nil
}
func (c *productClient) ItemDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *productClient) ItemDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Product_ItemDelete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -161,9 +160,9 @@ func (c *productClient) ItemDelete(ctx context.Context, in *protobuf.IdentReques
return out, nil
}
func (c *productClient) ItemModify(ctx context.Context, in *ModifyRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *productClient) ItemModify(ctx context.Context, in *ModifyRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Product_ItemModify_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -171,9 +170,9 @@ func (c *productClient) ItemModify(ctx context.Context, in *ModifyRequest, opts
return out, nil
}
func (c *productClient) ItemBatchOp(ctx context.Context, in *OpRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *productClient) ItemBatchOp(ctx context.Context, in *OpRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Product_ItemBatchOp_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -181,7 +180,7 @@ func (c *productClient) ItemBatchOp(ctx context.Context, in *OpRequest, opts ...
return out, nil
}
func (c *productClient) SpecFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*SpecReply, error) {
func (c *productClient) SpecFetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*SpecReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SpecReply)
err := c.cc.Invoke(ctx, Product_SpecFetch_FullMethodName, in, out, cOpts...)
@@ -191,9 +190,9 @@ func (c *productClient) SpecFetch(ctx context.Context, in *protobuf.MallFetchReq
return out, nil
}
func (c *productClient) SpecCreate(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *productClient) SpecCreate(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Product_SpecCreate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -201,9 +200,9 @@ func (c *productClient) SpecCreate(ctx context.Context, in *SpecItem, opts ...gr
return out, nil
}
func (c *productClient) SpecModify(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *productClient) SpecModify(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Product_SpecModify_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -211,9 +210,9 @@ func (c *productClient) SpecModify(ctx context.Context, in *SpecItem, opts ...gr
return out, nil
}
func (c *productClient) SpecDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *productClient) SpecDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Product_SpecDelete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -221,7 +220,7 @@ func (c *productClient) SpecDelete(ctx context.Context, in *protobuf.IdentReques
return out, nil
}
func (c *productClient) SpecDetail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*SpecItem, error) {
func (c *productClient) SpecDetail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*SpecItem, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SpecItem)
err := c.cc.Invoke(ctx, Product_SpecDetail_FullMethodName, in, out, cOpts...)
@@ -231,9 +230,9 @@ func (c *productClient) SpecDetail(ctx context.Context, in *protobuf.IdentReques
return out, nil
}
func (c *productClient) PhotoCreate(ctx context.Context, in *PhotoItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *productClient) PhotoCreate(ctx context.Context, in *PhotoItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Product_PhotoCreate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -241,9 +240,9 @@ func (c *productClient) PhotoCreate(ctx context.Context, in *PhotoItem, opts ...
return out, nil
}
func (c *productClient) PhotoDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *productClient) PhotoDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Product_PhotoDelete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -261,7 +260,7 @@ func (c *productClient) PhotoList(ctx context.Context, in *PhotoItem, opts ...gr
return out, nil
}
func (c *productClient) CommentFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*CommentListReply, error) {
func (c *productClient) CommentFetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*CommentListReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CommentListReply)
err := c.cc.Invoke(ctx, Product_CommentFetch_FullMethodName, in, out, cOpts...)
@@ -271,9 +270,9 @@ func (c *productClient) CommentFetch(ctx context.Context, in *protobuf.MallFetch
return out, nil
}
func (c *productClient) CommentCreate(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *productClient) CommentCreate(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Product_CommentCreate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -281,9 +280,9 @@ func (c *productClient) CommentCreate(ctx context.Context, in *CommentItem, opts
return out, nil
}
func (c *productClient) CommentRe(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *productClient) CommentRe(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Product_CommentRe_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -291,9 +290,9 @@ func (c *productClient) CommentRe(ctx context.Context, in *CommentItem, opts ...
return out, nil
}
func (c *productClient) CommentDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *productClient) CommentDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Product_CommentDelete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -301,9 +300,9 @@ func (c *productClient) CommentDelete(ctx context.Context, in *protobuf.IdentReq
return out, nil
}
func (c *productClient) CommentModify(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *productClient) CommentModify(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Product_CommentModify_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -318,47 +317,47 @@ func (c *productClient) CommentModify(ctx context.Context, in *CommentItem, opts
// 产品相关
type ProductServer interface {
// 获取产品列表
ItemFetch(context.Context, *protobuf.MallFetchRequest) (*ListReply, error)
ItemFetch(context.Context, *MallFetchRequest) (*ListReply, error)
// 获取产品详情
ItemDetail(context.Context, *protobuf.IdentRequest) (*ProductItem, error)
ItemDetail(context.Context, *IdentRequest) (*ProductItem, error)
// 通过产品序列获取产品详情
ItemDetailBySerial(context.Context, *protobuf.StoreSerialRequest) (*ListReply, error)
ItemDetailBySerial(context.Context, *StoreSerialRequest) (*ListReply, error)
// 通过规格编号获取产品详情
ItemDetailBySpec(context.Context, *DetailBySpecRequest) (*ListItem, error)
// 添加产品
ItemCreate(context.Context, *ProductItem) (*protobuf.IdentityStatusReply, error)
ItemCreate(context.Context, *ProductItem) (*IdentityStatusReply, error)
// 删除产品
ItemDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error)
ItemDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error)
// 发布/取消发布 产品
ItemModify(context.Context, *ModifyRequest) (*protobuf.IdentityStatusReply, error)
ItemModify(context.Context, *ModifyRequest) (*IdentityStatusReply, error)
// 批量操作
ItemBatchOp(context.Context, *OpRequest) (*protobuf.IdentityStatusReply, error)
ItemBatchOp(context.Context, *OpRequest) (*IdentityStatusReply, error)
// 产品规格列表
SpecFetch(context.Context, *protobuf.MallFetchRequest) (*SpecReply, error)
SpecFetch(context.Context, *MallFetchRequest) (*SpecReply, error)
// 添加产品规格
SpecCreate(context.Context, *SpecItem) (*protobuf.IdentityStatusReply, error)
SpecCreate(context.Context, *SpecItem) (*IdentityStatusReply, error)
// 修改产品规格
SpecModify(context.Context, *SpecItem) (*protobuf.IdentityStatusReply, error)
SpecModify(context.Context, *SpecItem) (*IdentityStatusReply, error)
// 删除产品规格
SpecDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error)
SpecDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error)
// 产品详情
SpecDetail(context.Context, *protobuf.IdentRequest) (*SpecItem, error)
SpecDetail(context.Context, *IdentRequest) (*SpecItem, error)
// 添加产品图片
PhotoCreate(context.Context, *PhotoItem) (*protobuf.IdentityStatusReply, error)
PhotoCreate(context.Context, *PhotoItem) (*IdentityStatusReply, error)
// 删除产品图片
PhotoDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error)
PhotoDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error)
// 产品图片列表
PhotoList(context.Context, *PhotoItem) (*PhotoReply, error)
// 产品的评论列表
CommentFetch(context.Context, *protobuf.MallFetchRequest) (*CommentListReply, error)
CommentFetch(context.Context, *MallFetchRequest) (*CommentListReply, error)
// 评论
CommentCreate(context.Context, *CommentItem) (*protobuf.IdentityStatusReply, error)
CommentCreate(context.Context, *CommentItem) (*IdentityStatusReply, error)
// 回复评论
CommentRe(context.Context, *CommentItem) (*protobuf.IdentityStatusReply, error)
CommentRe(context.Context, *CommentItem) (*IdentityStatusReply, error)
// 删除评论
CommentDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error)
CommentDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error)
// 修改评论
CommentModify(context.Context, *CommentItem) (*protobuf.IdentityStatusReply, error)
CommentModify(context.Context, *CommentItem) (*IdentityStatusReply, error)
}
// UnimplementedProductServer should be embedded to have
@@ -368,67 +367,67 @@ type ProductServer interface {
// pointer dereference when methods are called.
type UnimplementedProductServer struct{}
func (UnimplementedProductServer) ItemFetch(context.Context, *protobuf.MallFetchRequest) (*ListReply, error) {
func (UnimplementedProductServer) ItemFetch(context.Context, *MallFetchRequest) (*ListReply, error) {
return nil, status.Error(codes.Unimplemented, "method ItemFetch not implemented")
}
func (UnimplementedProductServer) ItemDetail(context.Context, *protobuf.IdentRequest) (*ProductItem, error) {
func (UnimplementedProductServer) ItemDetail(context.Context, *IdentRequest) (*ProductItem, error) {
return nil, status.Error(codes.Unimplemented, "method ItemDetail not implemented")
}
func (UnimplementedProductServer) ItemDetailBySerial(context.Context, *protobuf.StoreSerialRequest) (*ListReply, error) {
func (UnimplementedProductServer) ItemDetailBySerial(context.Context, *StoreSerialRequest) (*ListReply, error) {
return nil, status.Error(codes.Unimplemented, "method ItemDetailBySerial not implemented")
}
func (UnimplementedProductServer) ItemDetailBySpec(context.Context, *DetailBySpecRequest) (*ListItem, error) {
return nil, status.Error(codes.Unimplemented, "method ItemDetailBySpec not implemented")
}
func (UnimplementedProductServer) ItemCreate(context.Context, *ProductItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedProductServer) ItemCreate(context.Context, *ProductItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method ItemCreate not implemented")
}
func (UnimplementedProductServer) ItemDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedProductServer) ItemDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method ItemDelete not implemented")
}
func (UnimplementedProductServer) ItemModify(context.Context, *ModifyRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedProductServer) ItemModify(context.Context, *ModifyRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method ItemModify not implemented")
}
func (UnimplementedProductServer) ItemBatchOp(context.Context, *OpRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedProductServer) ItemBatchOp(context.Context, *OpRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method ItemBatchOp not implemented")
}
func (UnimplementedProductServer) SpecFetch(context.Context, *protobuf.MallFetchRequest) (*SpecReply, error) {
func (UnimplementedProductServer) SpecFetch(context.Context, *MallFetchRequest) (*SpecReply, error) {
return nil, status.Error(codes.Unimplemented, "method SpecFetch not implemented")
}
func (UnimplementedProductServer) SpecCreate(context.Context, *SpecItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedProductServer) SpecCreate(context.Context, *SpecItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method SpecCreate not implemented")
}
func (UnimplementedProductServer) SpecModify(context.Context, *SpecItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedProductServer) SpecModify(context.Context, *SpecItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method SpecModify not implemented")
}
func (UnimplementedProductServer) SpecDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedProductServer) SpecDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method SpecDelete not implemented")
}
func (UnimplementedProductServer) SpecDetail(context.Context, *protobuf.IdentRequest) (*SpecItem, error) {
func (UnimplementedProductServer) SpecDetail(context.Context, *IdentRequest) (*SpecItem, error) {
return nil, status.Error(codes.Unimplemented, "method SpecDetail not implemented")
}
func (UnimplementedProductServer) PhotoCreate(context.Context, *PhotoItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedProductServer) PhotoCreate(context.Context, *PhotoItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method PhotoCreate not implemented")
}
func (UnimplementedProductServer) PhotoDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedProductServer) PhotoDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method PhotoDelete not implemented")
}
func (UnimplementedProductServer) PhotoList(context.Context, *PhotoItem) (*PhotoReply, error) {
return nil, status.Error(codes.Unimplemented, "method PhotoList not implemented")
}
func (UnimplementedProductServer) CommentFetch(context.Context, *protobuf.MallFetchRequest) (*CommentListReply, error) {
func (UnimplementedProductServer) CommentFetch(context.Context, *MallFetchRequest) (*CommentListReply, error) {
return nil, status.Error(codes.Unimplemented, "method CommentFetch not implemented")
}
func (UnimplementedProductServer) CommentCreate(context.Context, *CommentItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedProductServer) CommentCreate(context.Context, *CommentItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method CommentCreate not implemented")
}
func (UnimplementedProductServer) CommentRe(context.Context, *CommentItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedProductServer) CommentRe(context.Context, *CommentItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method CommentRe not implemented")
}
func (UnimplementedProductServer) CommentDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedProductServer) CommentDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method CommentDelete not implemented")
}
func (UnimplementedProductServer) CommentModify(context.Context, *CommentItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedProductServer) CommentModify(context.Context, *CommentItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method CommentModify not implemented")
}
func (UnimplementedProductServer) testEmbeddedByValue() {}
@@ -452,7 +451,7 @@ func RegisterProductServer(s grpc.ServiceRegistrar, srv ProductServer) {
}
func _Product_ItemFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.MallFetchRequest)
in := new(MallFetchRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -464,13 +463,13 @@ func _Product_ItemFetch_Handler(srv interface{}, ctx context.Context, dec func(i
FullMethod: Product_ItemFetch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProductServer).ItemFetch(ctx, req.(*protobuf.MallFetchRequest))
return srv.(ProductServer).ItemFetch(ctx, req.(*MallFetchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Product_ItemDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -482,13 +481,13 @@ func _Product_ItemDetail_Handler(srv interface{}, ctx context.Context, dec func(
FullMethod: Product_ItemDetail_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProductServer).ItemDetail(ctx, req.(*protobuf.IdentRequest))
return srv.(ProductServer).ItemDetail(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Product_ItemDetailBySerial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.StoreSerialRequest)
in := new(StoreSerialRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -500,7 +499,7 @@ func _Product_ItemDetailBySerial_Handler(srv interface{}, ctx context.Context, d
FullMethod: Product_ItemDetailBySerial_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProductServer).ItemDetailBySerial(ctx, req.(*protobuf.StoreSerialRequest))
return srv.(ProductServer).ItemDetailBySerial(ctx, req.(*StoreSerialRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -542,7 +541,7 @@ func _Product_ItemCreate_Handler(srv interface{}, ctx context.Context, dec func(
}
func _Product_ItemDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -554,7 +553,7 @@ func _Product_ItemDelete_Handler(srv interface{}, ctx context.Context, dec func(
FullMethod: Product_ItemDelete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProductServer).ItemDelete(ctx, req.(*protobuf.IdentRequest))
return srv.(ProductServer).ItemDelete(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -596,7 +595,7 @@ func _Product_ItemBatchOp_Handler(srv interface{}, ctx context.Context, dec func
}
func _Product_SpecFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.MallFetchRequest)
in := new(MallFetchRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -608,7 +607,7 @@ func _Product_SpecFetch_Handler(srv interface{}, ctx context.Context, dec func(i
FullMethod: Product_SpecFetch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProductServer).SpecFetch(ctx, req.(*protobuf.MallFetchRequest))
return srv.(ProductServer).SpecFetch(ctx, req.(*MallFetchRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -650,7 +649,7 @@ func _Product_SpecModify_Handler(srv interface{}, ctx context.Context, dec func(
}
func _Product_SpecDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -662,13 +661,13 @@ func _Product_SpecDelete_Handler(srv interface{}, ctx context.Context, dec func(
FullMethod: Product_SpecDelete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProductServer).SpecDelete(ctx, req.(*protobuf.IdentRequest))
return srv.(ProductServer).SpecDelete(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Product_SpecDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -680,7 +679,7 @@ func _Product_SpecDetail_Handler(srv interface{}, ctx context.Context, dec func(
FullMethod: Product_SpecDetail_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProductServer).SpecDetail(ctx, req.(*protobuf.IdentRequest))
return srv.(ProductServer).SpecDetail(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -704,7 +703,7 @@ func _Product_PhotoCreate_Handler(srv interface{}, ctx context.Context, dec func
}
func _Product_PhotoDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -716,7 +715,7 @@ func _Product_PhotoDelete_Handler(srv interface{}, ctx context.Context, dec func
FullMethod: Product_PhotoDelete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProductServer).PhotoDelete(ctx, req.(*protobuf.IdentRequest))
return srv.(ProductServer).PhotoDelete(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -740,7 +739,7 @@ func _Product_PhotoList_Handler(srv interface{}, ctx context.Context, dec func(i
}
func _Product_CommentFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.MallFetchRequest)
in := new(MallFetchRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -752,7 +751,7 @@ func _Product_CommentFetch_Handler(srv interface{}, ctx context.Context, dec fun
FullMethod: Product_CommentFetch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProductServer).CommentFetch(ctx, req.(*protobuf.MallFetchRequest))
return srv.(ProductServer).CommentFetch(ctx, req.(*MallFetchRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -794,7 +793,7 @@ func _Product_CommentRe_Handler(srv interface{}, ctx context.Context, dec func(i
}
func _Product_CommentDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -806,7 +805,7 @@ func _Product_CommentDelete_Handler(srv interface{}, ctx context.Context, dec fu
FullMethod: Product_CommentDelete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProductServer).CommentDelete(ctx, req.(*protobuf.IdentRequest))
return srv.(ProductServer).CommentDelete(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}

View File

@@ -7,7 +7,6 @@
package mall
import (
protobuf "bsm/full/protobuf"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -454,7 +453,7 @@ var File_module_ec_mall_proto_staff_proto protoreflect.FileDescriptor
const file_module_ec_mall_proto_staff_proto_rawDesc = "" +
"\n" +
" module/ec/mall/proto/staff.proto\x12\x04mall\x1a\x15protobuf/blocks.proto\"\x9e\x01\n" +
" module/ec/mall/proto/staff.proto\x12\x04mall\x1a module/ec/mall/proto/const.proto\"\x9e\x01\n" +
"\fLoginRequest\x12\x18\n" +
"\aaccount\x18\x01 \x01(\tR\aaccount\x12\x1a\n" +
"\bpassword\x18\x02 \x01(\tR\bpassword\x12\x14\n" +
@@ -524,14 +523,14 @@ func file_module_ec_mall_proto_staff_proto_rawDescGZIP() []byte {
var file_module_ec_mall_proto_staff_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_module_ec_mall_proto_staff_proto_goTypes = []any{
(*LoginRequest)(nil), // 0: mall.LoginRequest
(*LoginReply)(nil), // 1: mall.LoginReply
(*SetAccountRequest)(nil), // 2: mall.SetAccountRequest
(*StaffItem)(nil), // 3: mall.StaffItem
(*StaffListReply)(nil), // 4: mall.StaffListReply
(*protobuf.MallFetchRequest)(nil), // 5: blocks.MallFetchRequest
(*protobuf.IdentRequest)(nil), // 6: blocks.IdentRequest
(*protobuf.IdentityStatusReply)(nil), // 7: blocks.IdentityStatusReply
(*LoginRequest)(nil), // 0: mall.LoginRequest
(*LoginReply)(nil), // 1: mall.LoginReply
(*SetAccountRequest)(nil), // 2: mall.SetAccountRequest
(*StaffItem)(nil), // 3: mall.StaffItem
(*StaffListReply)(nil), // 4: mall.StaffListReply
(*MallFetchRequest)(nil), // 5: blocks.MallFetchRequest
(*IdentRequest)(nil), // 6: blocks.IdentRequest
(*IdentityStatusReply)(nil), // 7: blocks.IdentityStatusReply
}
var file_module_ec_mall_proto_staff_proto_depIdxs = []int32{
3, // 0: mall.StaffListReply.data:type_name -> mall.StaffItem
@@ -561,6 +560,7 @@ func file_module_ec_mall_proto_staff_proto_init() {
if File_module_ec_mall_proto_staff_proto != nil {
return
}
file_module_ec_mall_proto_const_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@@ -9,7 +9,6 @@ It translates gRPC into RESTful JSON APIs.
package mall
import (
"bsm/full/protobuf"
"context"
"errors"
"io"
@@ -65,7 +64,7 @@ func local_request_Staff_Login_0(ctx context.Context, marshaler runtime.Marshale
func request_Staff_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client StaffClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -80,7 +79,7 @@ func request_Staff_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, cli
func local_request_Staff_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server StaffServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.MallFetchRequest
protoReq MallFetchRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -119,7 +118,7 @@ func local_request_Staff_Create_0(ctx context.Context, marshaler runtime.Marshal
func request_Staff_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client StaffClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -134,7 +133,7 @@ func request_Staff_Delete_0(ctx context.Context, marshaler runtime.Marshaler, cl
func local_request_Staff_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server StaffServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -146,7 +145,7 @@ func local_request_Staff_Delete_0(ctx context.Context, marshaler runtime.Marshal
func request_Staff_GetProfile_0(ctx context.Context, marshaler runtime.Marshaler, client StaffClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -161,7 +160,7 @@ func request_Staff_GetProfile_0(ctx context.Context, marshaler runtime.Marshaler
func local_request_Staff_GetProfile_0(ctx context.Context, marshaler runtime.Marshaler, server StaffServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {

View File

@@ -7,7 +7,6 @@
package mall
import (
protobuf "bsm/full/protobuf"
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -38,17 +37,17 @@ type StaffClient interface {
// 登录
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error)
// 获取工作人员列表
Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*StaffListReply, error)
Fetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*StaffListReply, error)
// 创建工作人员
Create(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
Create(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 删除工作人员
Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 获取个人信息
GetProfile(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*StaffItem, error)
GetProfile(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StaffItem, error)
// 设置个人信息
SetProfile(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
SetProfile(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 设置账号密码
SetPassword(ctx context.Context, in *SetAccountRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
SetPassword(ctx context.Context, in *SetAccountRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
}
type staffClient struct {
@@ -69,7 +68,7 @@ func (c *staffClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.
return out, nil
}
func (c *staffClient) Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*StaffListReply, error) {
func (c *staffClient) Fetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*StaffListReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StaffListReply)
err := c.cc.Invoke(ctx, Staff_Fetch_FullMethodName, in, out, cOpts...)
@@ -79,9 +78,9 @@ func (c *staffClient) Fetch(ctx context.Context, in *protobuf.MallFetchRequest,
return out, nil
}
func (c *staffClient) Create(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *staffClient) Create(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Staff_Create_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -89,9 +88,9 @@ func (c *staffClient) Create(ctx context.Context, in *StaffItem, opts ...grpc.Ca
return out, nil
}
func (c *staffClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *staffClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Staff_Delete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -99,7 +98,7 @@ func (c *staffClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opt
return out, nil
}
func (c *staffClient) GetProfile(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*StaffItem, error) {
func (c *staffClient) GetProfile(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StaffItem, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StaffItem)
err := c.cc.Invoke(ctx, Staff_GetProfile_FullMethodName, in, out, cOpts...)
@@ -109,9 +108,9 @@ func (c *staffClient) GetProfile(ctx context.Context, in *protobuf.IdentRequest,
return out, nil
}
func (c *staffClient) SetProfile(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *staffClient) SetProfile(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Staff_SetProfile_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -119,9 +118,9 @@ func (c *staffClient) SetProfile(ctx context.Context, in *StaffItem, opts ...grp
return out, nil
}
func (c *staffClient) SetPassword(ctx context.Context, in *SetAccountRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *staffClient) SetPassword(ctx context.Context, in *SetAccountRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Staff_SetPassword_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -138,17 +137,17 @@ type StaffServer interface {
// 登录
Login(context.Context, *LoginRequest) (*LoginReply, error)
// 获取工作人员列表
Fetch(context.Context, *protobuf.MallFetchRequest) (*StaffListReply, error)
Fetch(context.Context, *MallFetchRequest) (*StaffListReply, error)
// 创建工作人员
Create(context.Context, *StaffItem) (*protobuf.IdentityStatusReply, error)
Create(context.Context, *StaffItem) (*IdentityStatusReply, error)
// 删除工作人员
Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error)
Delete(context.Context, *IdentRequest) (*IdentityStatusReply, error)
// 获取个人信息
GetProfile(context.Context, *protobuf.IdentRequest) (*StaffItem, error)
GetProfile(context.Context, *IdentRequest) (*StaffItem, error)
// 设置个人信息
SetProfile(context.Context, *StaffItem) (*protobuf.IdentityStatusReply, error)
SetProfile(context.Context, *StaffItem) (*IdentityStatusReply, error)
// 设置账号密码
SetPassword(context.Context, *SetAccountRequest) (*protobuf.IdentityStatusReply, error)
SetPassword(context.Context, *SetAccountRequest) (*IdentityStatusReply, error)
}
// UnimplementedStaffServer should be embedded to have
@@ -161,22 +160,22 @@ type UnimplementedStaffServer struct{}
func (UnimplementedStaffServer) Login(context.Context, *LoginRequest) (*LoginReply, error) {
return nil, status.Error(codes.Unimplemented, "method Login not implemented")
}
func (UnimplementedStaffServer) Fetch(context.Context, *protobuf.MallFetchRequest) (*StaffListReply, error) {
func (UnimplementedStaffServer) Fetch(context.Context, *MallFetchRequest) (*StaffListReply, error) {
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
}
func (UnimplementedStaffServer) Create(context.Context, *StaffItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedStaffServer) Create(context.Context, *StaffItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedStaffServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedStaffServer) Delete(context.Context, *IdentRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedStaffServer) GetProfile(context.Context, *protobuf.IdentRequest) (*StaffItem, error) {
func (UnimplementedStaffServer) GetProfile(context.Context, *IdentRequest) (*StaffItem, error) {
return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented")
}
func (UnimplementedStaffServer) SetProfile(context.Context, *StaffItem) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedStaffServer) SetProfile(context.Context, *StaffItem) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method SetProfile not implemented")
}
func (UnimplementedStaffServer) SetPassword(context.Context, *SetAccountRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedStaffServer) SetPassword(context.Context, *SetAccountRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method SetPassword not implemented")
}
func (UnimplementedStaffServer) testEmbeddedByValue() {}
@@ -218,7 +217,7 @@ func _Staff_Login_Handler(srv interface{}, ctx context.Context, dec func(interfa
}
func _Staff_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.MallFetchRequest)
in := new(MallFetchRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -230,7 +229,7 @@ func _Staff_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interfa
FullMethod: Staff_Fetch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StaffServer).Fetch(ctx, req.(*protobuf.MallFetchRequest))
return srv.(StaffServer).Fetch(ctx, req.(*MallFetchRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -254,7 +253,7 @@ func _Staff_Create_Handler(srv interface{}, ctx context.Context, dec func(interf
}
func _Staff_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -266,13 +265,13 @@ func _Staff_Delete_Handler(srv interface{}, ctx context.Context, dec func(interf
FullMethod: Staff_Delete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StaffServer).Delete(ctx, req.(*protobuf.IdentRequest))
return srv.(StaffServer).Delete(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Staff_GetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -284,7 +283,7 @@ func _Staff_GetProfile_Handler(srv interface{}, ctx context.Context, dec func(in
FullMethod: Staff_GetProfile_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StaffServer).GetProfile(ctx, req.(*protobuf.IdentRequest))
return srv.(StaffServer).GetProfile(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}

View File

@@ -7,7 +7,6 @@
package mall
import (
protobuf "bsm/full/protobuf"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -662,7 +661,7 @@ var File_module_ec_mall_proto_store_proto protoreflect.FileDescriptor
const file_module_ec_mall_proto_store_proto_rawDesc = "" +
"\n" +
" module/ec/mall/proto/store.proto\x12\x04mall\x1a\x15protobuf/blocks.proto\"F\n" +
" module/ec/mall/proto/store.proto\x12\x04mall\x1a module/ec/mall/proto/const.proto\"F\n" +
"\x0eSettingRequest\x12\x1a\n" +
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x18\n" +
"\aconfigs\x18\x02 \x01(\tR\aconfigs\"(\n" +
@@ -746,17 +745,17 @@ func file_module_ec_mall_proto_store_proto_rawDescGZIP() []byte {
var file_module_ec_mall_proto_store_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_module_ec_mall_proto_store_proto_goTypes = []any{
(*SettingRequest)(nil), // 0: mall.SettingRequest
(*ConfigsReply)(nil), // 1: mall.ConfigsReply
(*LicensingRequest)(nil), // 2: mall.LicensingRequest
(*ApplyJoinRequest)(nil), // 3: mall.ApplyJoinRequest
(*StoreBasic)(nil), // 4: mall.StoreBasic
(*MiniCodeRequest)(nil), // 5: mall.MiniCodeRequest
(*MiniCodeReply)(nil), // 6: mall.MiniCodeReply
(*MallSearchRequest)(nil), // 7: mall.MallSearchRequest
(*MallSearchReply)(nil), // 8: mall.MallSearchReply
(*protobuf.IdentRequest)(nil), // 9: blocks.IdentRequest
(*protobuf.IdentityStatusReply)(nil), // 10: blocks.IdentityStatusReply
(*SettingRequest)(nil), // 0: mall.SettingRequest
(*ConfigsReply)(nil), // 1: mall.ConfigsReply
(*LicensingRequest)(nil), // 2: mall.LicensingRequest
(*ApplyJoinRequest)(nil), // 3: mall.ApplyJoinRequest
(*StoreBasic)(nil), // 4: mall.StoreBasic
(*MiniCodeRequest)(nil), // 5: mall.MiniCodeRequest
(*MiniCodeReply)(nil), // 6: mall.MiniCodeReply
(*MallSearchRequest)(nil), // 7: mall.MallSearchRequest
(*MallSearchReply)(nil), // 8: mall.MallSearchReply
(*IdentRequest)(nil), // 9: blocks.IdentRequest
(*IdentityStatusReply)(nil), // 10: blocks.IdentityStatusReply
}
var file_module_ec_mall_proto_store_proto_depIdxs = []int32{
4, // 0: mall.MallSearchReply.list:type_name -> mall.StoreBasic
@@ -792,6 +791,7 @@ func file_module_ec_mall_proto_store_proto_init() {
if File_module_ec_mall_proto_store_proto != nil {
return
}
file_module_ec_mall_proto_const_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@@ -9,7 +9,6 @@ It translates gRPC into RESTful JSON APIs.
package mall
import (
"bsm/full/protobuf"
"context"
"errors"
"io"
@@ -92,7 +91,7 @@ func local_request_Store_Licensing_0(ctx context.Context, marshaler runtime.Mars
func request_Store_GetSetting_0(ctx context.Context, marshaler runtime.Marshaler, client StoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -107,7 +106,7 @@ func request_Store_GetSetting_0(ctx context.Context, marshaler runtime.Marshaler
func local_request_Store_GetSetting_0(ctx context.Context, marshaler runtime.Marshaler, server StoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -200,7 +199,7 @@ func local_request_Store_SetEmail_0(ctx context.Context, marshaler runtime.Marsh
func request_Store_GetPayment_0(ctx context.Context, marshaler runtime.Marshaler, client StoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -215,7 +214,7 @@ func request_Store_GetPayment_0(ctx context.Context, marshaler runtime.Marshaler
func local_request_Store_GetPayment_0(ctx context.Context, marshaler runtime.Marshaler, server StoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -227,7 +226,7 @@ func local_request_Store_GetPayment_0(ctx context.Context, marshaler runtime.Mar
func request_Store_GetEmail_0(ctx context.Context, marshaler runtime.Marshaler, client StoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
@@ -242,7 +241,7 @@ func request_Store_GetEmail_0(ctx context.Context, marshaler runtime.Marshaler,
func local_request_Store_GetEmail_0(ctx context.Context, marshaler runtime.Marshaler, server StoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq blocks.IdentRequest
protoReq IdentRequest
metadata runtime.ServerMetadata
)
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {

View File

@@ -7,7 +7,6 @@
package mall
import (
protobuf "bsm/full/protobuf"
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -39,21 +38,21 @@ const (
// Store(店铺)微服务-店铺基础服务
type StoreClient interface {
// 申请加入店铺
ApplyJoin(ctx context.Context, in *ApplyJoinRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
ApplyJoin(ctx context.Context, in *ApplyJoinRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 店铺许可授权
Licensing(ctx context.Context, in *LicensingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
Licensing(ctx context.Context, in *LicensingRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 获取店铺基础配置
GetSetting(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*StoreBasic, error)
GetSetting(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StoreBasic, error)
// 设置店铺基础配置
SetSetting(ctx context.Context, in *StoreBasic, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
SetSetting(ctx context.Context, in *StoreBasic, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 设置支付方式配置
SetPayment(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
SetPayment(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 设置邮件服务器配置
SetEmail(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
SetEmail(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
// 获取支付方式配置
GetPayment(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error)
GetPayment(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error)
// 获取邮件服务器配置
GetEmail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error)
GetEmail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error)
// 获取小程序推荐码
MiniCode(ctx context.Context, in *MiniCodeRequest, opts ...grpc.CallOption) (*MiniCodeReply, error)
// 店铺搜索
@@ -68,9 +67,9 @@ func NewStoreClient(cc grpc.ClientConnInterface) StoreClient {
return &storeClient{cc}
}
func (c *storeClient) ApplyJoin(ctx context.Context, in *ApplyJoinRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *storeClient) ApplyJoin(ctx context.Context, in *ApplyJoinRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Store_ApplyJoin_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -78,9 +77,9 @@ func (c *storeClient) ApplyJoin(ctx context.Context, in *ApplyJoinRequest, opts
return out, nil
}
func (c *storeClient) Licensing(ctx context.Context, in *LicensingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *storeClient) Licensing(ctx context.Context, in *LicensingRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Store_Licensing_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -88,7 +87,7 @@ func (c *storeClient) Licensing(ctx context.Context, in *LicensingRequest, opts
return out, nil
}
func (c *storeClient) GetSetting(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*StoreBasic, error) {
func (c *storeClient) GetSetting(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StoreBasic, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StoreBasic)
err := c.cc.Invoke(ctx, Store_GetSetting_FullMethodName, in, out, cOpts...)
@@ -98,9 +97,9 @@ func (c *storeClient) GetSetting(ctx context.Context, in *protobuf.IdentRequest,
return out, nil
}
func (c *storeClient) SetSetting(ctx context.Context, in *StoreBasic, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *storeClient) SetSetting(ctx context.Context, in *StoreBasic, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Store_SetSetting_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -108,9 +107,9 @@ func (c *storeClient) SetSetting(ctx context.Context, in *StoreBasic, opts ...gr
return out, nil
}
func (c *storeClient) SetPayment(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *storeClient) SetPayment(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Store_SetPayment_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -118,9 +117,9 @@ func (c *storeClient) SetPayment(ctx context.Context, in *SettingRequest, opts .
return out, nil
}
func (c *storeClient) SetEmail(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
func (c *storeClient) SetEmail(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(protobuf.IdentityStatusReply)
out := new(IdentityStatusReply)
err := c.cc.Invoke(ctx, Store_SetEmail_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -128,7 +127,7 @@ func (c *storeClient) SetEmail(ctx context.Context, in *SettingRequest, opts ...
return out, nil
}
func (c *storeClient) GetPayment(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error) {
func (c *storeClient) GetPayment(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ConfigsReply)
err := c.cc.Invoke(ctx, Store_GetPayment_FullMethodName, in, out, cOpts...)
@@ -138,7 +137,7 @@ func (c *storeClient) GetPayment(ctx context.Context, in *protobuf.IdentRequest,
return out, nil
}
func (c *storeClient) GetEmail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error) {
func (c *storeClient) GetEmail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ConfigsReply)
err := c.cc.Invoke(ctx, Store_GetEmail_FullMethodName, in, out, cOpts...)
@@ -175,21 +174,21 @@ func (c *storeClient) Search(ctx context.Context, in *MallSearchRequest, opts ..
// Store(店铺)微服务-店铺基础服务
type StoreServer interface {
// 申请加入店铺
ApplyJoin(context.Context, *ApplyJoinRequest) (*protobuf.IdentityStatusReply, error)
ApplyJoin(context.Context, *ApplyJoinRequest) (*IdentityStatusReply, error)
// 店铺许可授权
Licensing(context.Context, *LicensingRequest) (*protobuf.IdentityStatusReply, error)
Licensing(context.Context, *LicensingRequest) (*IdentityStatusReply, error)
// 获取店铺基础配置
GetSetting(context.Context, *protobuf.IdentRequest) (*StoreBasic, error)
GetSetting(context.Context, *IdentRequest) (*StoreBasic, error)
// 设置店铺基础配置
SetSetting(context.Context, *StoreBasic) (*protobuf.IdentityStatusReply, error)
SetSetting(context.Context, *StoreBasic) (*IdentityStatusReply, error)
// 设置支付方式配置
SetPayment(context.Context, *SettingRequest) (*protobuf.IdentityStatusReply, error)
SetPayment(context.Context, *SettingRequest) (*IdentityStatusReply, error)
// 设置邮件服务器配置
SetEmail(context.Context, *SettingRequest) (*protobuf.IdentityStatusReply, error)
SetEmail(context.Context, *SettingRequest) (*IdentityStatusReply, error)
// 获取支付方式配置
GetPayment(context.Context, *protobuf.IdentRequest) (*ConfigsReply, error)
GetPayment(context.Context, *IdentRequest) (*ConfigsReply, error)
// 获取邮件服务器配置
GetEmail(context.Context, *protobuf.IdentRequest) (*ConfigsReply, error)
GetEmail(context.Context, *IdentRequest) (*ConfigsReply, error)
// 获取小程序推荐码
MiniCode(context.Context, *MiniCodeRequest) (*MiniCodeReply, error)
// 店铺搜索
@@ -203,28 +202,28 @@ type StoreServer interface {
// pointer dereference when methods are called.
type UnimplementedStoreServer struct{}
func (UnimplementedStoreServer) ApplyJoin(context.Context, *ApplyJoinRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedStoreServer) ApplyJoin(context.Context, *ApplyJoinRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method ApplyJoin not implemented")
}
func (UnimplementedStoreServer) Licensing(context.Context, *LicensingRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedStoreServer) Licensing(context.Context, *LicensingRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Licensing not implemented")
}
func (UnimplementedStoreServer) GetSetting(context.Context, *protobuf.IdentRequest) (*StoreBasic, error) {
func (UnimplementedStoreServer) GetSetting(context.Context, *IdentRequest) (*StoreBasic, error) {
return nil, status.Error(codes.Unimplemented, "method GetSetting not implemented")
}
func (UnimplementedStoreServer) SetSetting(context.Context, *StoreBasic) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedStoreServer) SetSetting(context.Context, *StoreBasic) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method SetSetting not implemented")
}
func (UnimplementedStoreServer) SetPayment(context.Context, *SettingRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedStoreServer) SetPayment(context.Context, *SettingRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method SetPayment not implemented")
}
func (UnimplementedStoreServer) SetEmail(context.Context, *SettingRequest) (*protobuf.IdentityStatusReply, error) {
func (UnimplementedStoreServer) SetEmail(context.Context, *SettingRequest) (*IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method SetEmail not implemented")
}
func (UnimplementedStoreServer) GetPayment(context.Context, *protobuf.IdentRequest) (*ConfigsReply, error) {
func (UnimplementedStoreServer) GetPayment(context.Context, *IdentRequest) (*ConfigsReply, error) {
return nil, status.Error(codes.Unimplemented, "method GetPayment not implemented")
}
func (UnimplementedStoreServer) GetEmail(context.Context, *protobuf.IdentRequest) (*ConfigsReply, error) {
func (UnimplementedStoreServer) GetEmail(context.Context, *IdentRequest) (*ConfigsReply, error) {
return nil, status.Error(codes.Unimplemented, "method GetEmail not implemented")
}
func (UnimplementedStoreServer) MiniCode(context.Context, *MiniCodeRequest) (*MiniCodeReply, error) {
@@ -290,7 +289,7 @@ func _Store_Licensing_Handler(srv interface{}, ctx context.Context, dec func(int
}
func _Store_GetSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -302,7 +301,7 @@ func _Store_GetSetting_Handler(srv interface{}, ctx context.Context, dec func(in
FullMethod: Store_GetSetting_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StoreServer).GetSetting(ctx, req.(*protobuf.IdentRequest))
return srv.(StoreServer).GetSetting(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -362,7 +361,7 @@ func _Store_SetEmail_Handler(srv interface{}, ctx context.Context, dec func(inte
}
func _Store_GetPayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -374,13 +373,13 @@ func _Store_GetPayment_Handler(srv interface{}, ctx context.Context, dec func(in
FullMethod: Store_GetPayment_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StoreServer).GetPayment(ctx, req.(*protobuf.IdentRequest))
return srv.(StoreServer).GetPayment(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Store_GetEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(protobuf.IdentRequest)
in := new(IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -392,7 +391,7 @@ func _Store_GetEmail_Handler(srv interface{}, ctx context.Context, dec func(inte
FullMethod: Store_GetEmail_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StoreServer).GetEmail(ctx, req.(*protobuf.IdentRequest))
return srv.(StoreServer).GetEmail(ctx, req.(*IdentRequest))
}
return interceptor(ctx, in, info, handler)
}