refactor: centralize protobuf and remove go-zero

This commit is contained in:
2026-08-09 15:10:19 +08:00
parent 5cc5fd92ed
commit 4bbed3156c
357 changed files with 14208 additions and 19903 deletions

View File

@@ -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: notice.proto
// - protoc-gen-go-grpc v1.6.2
// - protoc v7.35.0
// source: module/ec/mall/proto/notice.proto
package mall
import (
protobuf "bsm/full/protobuf"
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -32,13 +33,13 @@ const (
// Store(店铺)微服务-公告
type NoticeClient interface {
// 公告列表
Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*NoticeListReply, error)
Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*NoticeListReply, error)
// 新建公告
Create(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*StatusReply, error)
Create(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
// 修改公告
Modify(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*StatusReply, error)
Modify(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
// 删除公告
Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error)
}
type noticeClient struct {
@@ -49,7 +50,7 @@ func NewNoticeClient(cc grpc.ClientConnInterface) NoticeClient {
return &noticeClient{cc}
}
func (c *noticeClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*NoticeListReply, error) {
func (c *noticeClient) Fetch(ctx context.Context, in *protobuf.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...)
@@ -59,9 +60,9 @@ func (c *noticeClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc
return out, nil
}
func (c *noticeClient) Create(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*StatusReply, error) {
func (c *noticeClient) Create(ctx context.Context, in *NoticeItem, 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, Notice_Create_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -69,9 +70,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) (*StatusReply, error) {
func (c *noticeClient) Modify(ctx context.Context, in *NoticeItem, 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, Notice_Modify_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -79,9 +80,9 @@ func (c *noticeClient) Modify(ctx context.Context, in *NoticeItem, opts ...grpc.
return out, nil
}
func (c *noticeClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
func (c *noticeClient) Delete(ctx context.Context, in *protobuf.IdentRequest, 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, Notice_Delete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -90,43 +91,41 @@ func (c *noticeClient) Delete(ctx context.Context, in *IdentRequest, opts ...grp
}
// NoticeServer is the server API for Notice service.
// All implementations must embed UnimplementedNoticeServer
// All implementations should embed UnimplementedNoticeServer
// for forward compatibility.
//
// Store(店铺)微服务-公告
type NoticeServer interface {
// 公告列表
Fetch(context.Context, *FetchRequest) (*NoticeListReply, error)
Fetch(context.Context, *protobuf.MallFetchRequest) (*NoticeListReply, error)
// 新建公告
Create(context.Context, *NoticeItem) (*StatusReply, error)
Create(context.Context, *NoticeItem) (*protobuf.IdentityStatusReply, error)
// 修改公告
Modify(context.Context, *NoticeItem) (*StatusReply, error)
Modify(context.Context, *NoticeItem) (*protobuf.IdentityStatusReply, error)
// 删除公告
Delete(context.Context, *IdentRequest) (*StatusReply, error)
mustEmbedUnimplementedNoticeServer()
Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error)
}
// UnimplementedNoticeServer must be embedded to have
// UnimplementedNoticeServer 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 UnimplementedNoticeServer struct{}
func (UnimplementedNoticeServer) Fetch(context.Context, *FetchRequest) (*NoticeListReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented")
func (UnimplementedNoticeServer) Fetch(context.Context, *protobuf.MallFetchRequest) (*NoticeListReply, error) {
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
}
func (UnimplementedNoticeServer) Create(context.Context, *NoticeItem) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
func (UnimplementedNoticeServer) Create(context.Context, *NoticeItem) (*protobuf.IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedNoticeServer) Modify(context.Context, *NoticeItem) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Modify not implemented")
func (UnimplementedNoticeServer) Modify(context.Context, *NoticeItem) (*protobuf.IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Modify not implemented")
}
func (UnimplementedNoticeServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
func (UnimplementedNoticeServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedNoticeServer) mustEmbedUnimplementedNoticeServer() {}
func (UnimplementedNoticeServer) testEmbeddedByValue() {}
func (UnimplementedNoticeServer) testEmbeddedByValue() {}
// UnsafeNoticeServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to NoticeServer will
@@ -136,7 +135,7 @@ type UnsafeNoticeServer interface {
}
func RegisterNoticeServer(s grpc.ServiceRegistrar, srv NoticeServer) {
// If the following call pancis, it indicates UnimplementedNoticeServer was
// If the following call panics, it indicates UnimplementedNoticeServer 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.
@@ -147,7 +146,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(FetchRequest)
in := new(protobuf.MallFetchRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -159,7 +158,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.(*FetchRequest))
return srv.(NoticeServer).Fetch(ctx, req.(*protobuf.MallFetchRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -201,7 +200,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(IdentRequest)
in := new(protobuf.IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -213,7 +212,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.(*IdentRequest))
return srv.(NoticeServer).Delete(ctx, req.(*protobuf.IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -243,5 +242,5 @@ var Notice_ServiceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "notice.proto",
Metadata: "module/ec/mall/proto/notice.proto",
}