refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: store.proto
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.35.0
|
||||
// source: module/ec/mall/proto/store.proto
|
||||
|
||||
package mall
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -38,21 +39,21 @@ const (
|
||||
// Store(店铺)微服务-店铺基础服务
|
||||
type StoreClient interface {
|
||||
// 申请加入店铺
|
||||
ApplyJoin(ctx context.Context, in *ApplyJoinRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
ApplyJoin(ctx context.Context, in *ApplyJoinRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
|
||||
// 店铺许可授权
|
||||
Licensing(ctx context.Context, in *LicensingRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Licensing(ctx context.Context, in *LicensingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
|
||||
// 获取店铺基础配置
|
||||
GetSetting(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StoreBasic, error)
|
||||
GetSetting(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*StoreBasic, error)
|
||||
// 设置店铺基础配置
|
||||
SetSetting(ctx context.Context, in *StoreBasic, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
SetSetting(ctx context.Context, in *StoreBasic, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
|
||||
// 设置支付方式配置
|
||||
SetPayment(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
SetPayment(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
|
||||
// 设置邮件服务器配置
|
||||
SetEmail(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
SetEmail(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
|
||||
// 获取支付方式配置
|
||||
GetPayment(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error)
|
||||
GetPayment(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error)
|
||||
// 获取邮件服务器配置
|
||||
GetEmail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error)
|
||||
GetEmail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error)
|
||||
// 获取小程序推荐码
|
||||
MiniCode(ctx context.Context, in *MiniCodeRequest, opts ...grpc.CallOption) (*MiniCodeReply, error)
|
||||
// 店铺搜索
|
||||
@@ -67,9 +68,9 @@ func NewStoreClient(cc grpc.ClientConnInterface) StoreClient {
|
||||
return &storeClient{cc}
|
||||
}
|
||||
|
||||
func (c *storeClient) ApplyJoin(ctx context.Context, in *ApplyJoinRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *storeClient) ApplyJoin(ctx context.Context, in *ApplyJoinRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.IdentityStatusReply)
|
||||
err := c.cc.Invoke(ctx, Store_ApplyJoin_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -77,9 +78,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) (*StatusReply, error) {
|
||||
func (c *storeClient) Licensing(ctx context.Context, in *LicensingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.IdentityStatusReply)
|
||||
err := c.cc.Invoke(ctx, Store_Licensing_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -87,7 +88,7 @@ func (c *storeClient) Licensing(ctx context.Context, in *LicensingRequest, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *storeClient) GetSetting(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StoreBasic, error) {
|
||||
func (c *storeClient) GetSetting(ctx context.Context, in *protobuf.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...)
|
||||
@@ -97,9 +98,9 @@ func (c *storeClient) GetSetting(ctx context.Context, in *IdentRequest, opts ...
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *storeClient) SetSetting(ctx context.Context, in *StoreBasic, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *storeClient) SetSetting(ctx context.Context, in *StoreBasic, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.IdentityStatusReply)
|
||||
err := c.cc.Invoke(ctx, Store_SetSetting_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -107,9 +108,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) (*StatusReply, error) {
|
||||
func (c *storeClient) SetPayment(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.IdentityStatusReply)
|
||||
err := c.cc.Invoke(ctx, Store_SetPayment_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -117,9 +118,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) (*StatusReply, error) {
|
||||
func (c *storeClient) SetEmail(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.IdentityStatusReply)
|
||||
err := c.cc.Invoke(ctx, Store_SetEmail_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -127,7 +128,7 @@ func (c *storeClient) SetEmail(ctx context.Context, in *SettingRequest, opts ...
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *storeClient) GetPayment(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error) {
|
||||
func (c *storeClient) GetPayment(ctx context.Context, in *protobuf.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...)
|
||||
@@ -137,7 +138,7 @@ func (c *storeClient) GetPayment(ctx context.Context, in *IdentRequest, opts ...
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *storeClient) GetEmail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error) {
|
||||
func (c *storeClient) GetEmail(ctx context.Context, in *protobuf.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...)
|
||||
@@ -168,73 +169,71 @@ func (c *storeClient) Search(ctx context.Context, in *MallSearchRequest, opts ..
|
||||
}
|
||||
|
||||
// StoreServer is the server API for Store service.
|
||||
// All implementations must embed UnimplementedStoreServer
|
||||
// All implementations should embed UnimplementedStoreServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Store(店铺)微服务-店铺基础服务
|
||||
type StoreServer interface {
|
||||
// 申请加入店铺
|
||||
ApplyJoin(context.Context, *ApplyJoinRequest) (*StatusReply, error)
|
||||
ApplyJoin(context.Context, *ApplyJoinRequest) (*protobuf.IdentityStatusReply, error)
|
||||
// 店铺许可授权
|
||||
Licensing(context.Context, *LicensingRequest) (*StatusReply, error)
|
||||
Licensing(context.Context, *LicensingRequest) (*protobuf.IdentityStatusReply, error)
|
||||
// 获取店铺基础配置
|
||||
GetSetting(context.Context, *IdentRequest) (*StoreBasic, error)
|
||||
GetSetting(context.Context, *protobuf.IdentRequest) (*StoreBasic, error)
|
||||
// 设置店铺基础配置
|
||||
SetSetting(context.Context, *StoreBasic) (*StatusReply, error)
|
||||
SetSetting(context.Context, *StoreBasic) (*protobuf.IdentityStatusReply, error)
|
||||
// 设置支付方式配置
|
||||
SetPayment(context.Context, *SettingRequest) (*StatusReply, error)
|
||||
SetPayment(context.Context, *SettingRequest) (*protobuf.IdentityStatusReply, error)
|
||||
// 设置邮件服务器配置
|
||||
SetEmail(context.Context, *SettingRequest) (*StatusReply, error)
|
||||
SetEmail(context.Context, *SettingRequest) (*protobuf.IdentityStatusReply, error)
|
||||
// 获取支付方式配置
|
||||
GetPayment(context.Context, *IdentRequest) (*ConfigsReply, error)
|
||||
GetPayment(context.Context, *protobuf.IdentRequest) (*ConfigsReply, error)
|
||||
// 获取邮件服务器配置
|
||||
GetEmail(context.Context, *IdentRequest) (*ConfigsReply, error)
|
||||
GetEmail(context.Context, *protobuf.IdentRequest) (*ConfigsReply, error)
|
||||
// 获取小程序推荐码
|
||||
MiniCode(context.Context, *MiniCodeRequest) (*MiniCodeReply, error)
|
||||
// 店铺搜索
|
||||
Search(context.Context, *MallSearchRequest) (*MallSearchReply, error)
|
||||
mustEmbedUnimplementedStoreServer()
|
||||
}
|
||||
|
||||
// UnimplementedStoreServer must be embedded to have
|
||||
// UnimplementedStoreServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedStoreServer struct{}
|
||||
|
||||
func (UnimplementedStoreServer) ApplyJoin(context.Context, *ApplyJoinRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ApplyJoin not implemented")
|
||||
func (UnimplementedStoreServer) ApplyJoin(context.Context, *ApplyJoinRequest) (*protobuf.IdentityStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ApplyJoin not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) Licensing(context.Context, *LicensingRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Licensing not implemented")
|
||||
func (UnimplementedStoreServer) Licensing(context.Context, *LicensingRequest) (*protobuf.IdentityStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Licensing not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) GetSetting(context.Context, *IdentRequest) (*StoreBasic, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetSetting not implemented")
|
||||
func (UnimplementedStoreServer) GetSetting(context.Context, *protobuf.IdentRequest) (*StoreBasic, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetSetting not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) SetSetting(context.Context, *StoreBasic) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetSetting not implemented")
|
||||
func (UnimplementedStoreServer) SetSetting(context.Context, *StoreBasic) (*protobuf.IdentityStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SetSetting not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) SetPayment(context.Context, *SettingRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetPayment not implemented")
|
||||
func (UnimplementedStoreServer) SetPayment(context.Context, *SettingRequest) (*protobuf.IdentityStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SetPayment not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) SetEmail(context.Context, *SettingRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetEmail not implemented")
|
||||
func (UnimplementedStoreServer) SetEmail(context.Context, *SettingRequest) (*protobuf.IdentityStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SetEmail not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) GetPayment(context.Context, *IdentRequest) (*ConfigsReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPayment not implemented")
|
||||
func (UnimplementedStoreServer) GetPayment(context.Context, *protobuf.IdentRequest) (*ConfigsReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetPayment not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) GetEmail(context.Context, *IdentRequest) (*ConfigsReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetEmail not implemented")
|
||||
func (UnimplementedStoreServer) GetEmail(context.Context, *protobuf.IdentRequest) (*ConfigsReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetEmail not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) MiniCode(context.Context, *MiniCodeRequest) (*MiniCodeReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method MiniCode not implemented")
|
||||
return nil, status.Error(codes.Unimplemented, "method MiniCode not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) Search(context.Context, *MallSearchRequest) (*MallSearchReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Search not implemented")
|
||||
return nil, status.Error(codes.Unimplemented, "method Search not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) mustEmbedUnimplementedStoreServer() {}
|
||||
func (UnimplementedStoreServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedStoreServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeStoreServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to StoreServer will
|
||||
@@ -244,7 +243,7 @@ type UnsafeStoreServer interface {
|
||||
}
|
||||
|
||||
func RegisterStoreServer(s grpc.ServiceRegistrar, srv StoreServer) {
|
||||
// If the following call pancis, it indicates UnimplementedStoreServer was
|
||||
// If the following call panics, it indicates UnimplementedStoreServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
@@ -291,7 +290,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(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -303,7 +302,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.(*IdentRequest))
|
||||
return srv.(StoreServer).GetSetting(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -363,7 +362,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(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -375,13 +374,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.(*IdentRequest))
|
||||
return srv.(StoreServer).GetPayment(ctx, req.(*protobuf.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(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -393,7 +392,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.(*IdentRequest))
|
||||
return srv.(StoreServer).GetEmail(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -483,5 +482,5 @@ var Store_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "store.proto",
|
||||
Metadata: "module/ec/mall/proto/store.proto",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user