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: group.proto
// - protoc-gen-go-grpc v1.6.2
// - protoc v7.35.0
// source: module/social/group/proto/group.proto
package group
import (
protobuf "bsm/full/protobuf"
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -33,18 +34,18 @@ const (
//
// 群组
type BasicClient interface {
//搜索
Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*GroupsReply, error)
//获取群组列表
Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GroupsReply, error)
//获取群组信息
Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*GroupItem, error)
//创建群组
Create(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*StatusReply, error)
//修改群组信息
Modify(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*StatusReply, error)
//解散群组
Disband(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
// 搜索
Search(ctx context.Context, in *protobuf.SearchRequest, opts ...grpc.CallOption) (*GroupsReply, error)
// 获取群组列表
Fetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*GroupsReply, error)
// 获取群组信息
Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*GroupItem, error)
// 创建群组
Create(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
// 修改群组信息
Modify(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
// 解散群组
Disband(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
}
type basicClient struct {
@@ -55,7 +56,7 @@ func NewBasicClient(cc grpc.ClientConnInterface) BasicClient {
return &basicClient{cc}
}
func (c *basicClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*GroupsReply, error) {
func (c *basicClient) Search(ctx context.Context, in *protobuf.SearchRequest, opts ...grpc.CallOption) (*GroupsReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GroupsReply)
err := c.cc.Invoke(ctx, Basic_Search_FullMethodName, in, out, cOpts...)
@@ -65,7 +66,7 @@ func (c *basicClient) Search(ctx context.Context, in *SearchRequest, opts ...grp
return out, nil
}
func (c *basicClient) Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GroupsReply, error) {
func (c *basicClient) Fetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*GroupsReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GroupsReply)
err := c.cc.Invoke(ctx, Basic_Fetch_FullMethodName, in, out, cOpts...)
@@ -75,7 +76,7 @@ func (c *basicClient) Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOpt
return out, nil
}
func (c *basicClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*GroupItem, error) {
func (c *basicClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*GroupItem, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GroupItem)
err := c.cc.Invoke(ctx, Basic_Get_FullMethodName, in, out, cOpts...)
@@ -85,9 +86,9 @@ func (c *basicClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.Ca
return out, nil
}
func (c *basicClient) Create(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*StatusReply, error) {
func (c *basicClient) Create(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
out := new(protobuf.DataStatusReply)
err := c.cc.Invoke(ctx, Basic_Create_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -95,9 +96,9 @@ func (c *basicClient) Create(ctx context.Context, in *GroupItem, opts ...grpc.Ca
return out, nil
}
func (c *basicClient) Modify(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*StatusReply, error) {
func (c *basicClient) Modify(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
out := new(protobuf.DataStatusReply)
err := c.cc.Invoke(ctx, Basic_Modify_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -105,9 +106,9 @@ func (c *basicClient) Modify(ctx context.Context, in *GroupItem, opts ...grpc.Ca
return out, nil
}
func (c *basicClient) Disband(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
func (c *basicClient) Disband(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
out := new(protobuf.DataStatusReply)
err := c.cc.Invoke(ctx, Basic_Disband_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -116,53 +117,51 @@ func (c *basicClient) Disband(ctx context.Context, in *IdentRequest, opts ...grp
}
// BasicServer is the server API for Basic service.
// All implementations must embed UnimplementedBasicServer
// All implementations should embed UnimplementedBasicServer
// for forward compatibility.
//
// 群组
type BasicServer interface {
//搜索
Search(context.Context, *SearchRequest) (*GroupsReply, error)
//获取群组列表
Fetch(context.Context, *Empty) (*GroupsReply, error)
//获取群组信息
Get(context.Context, *IdentRequest) (*GroupItem, error)
//创建群组
Create(context.Context, *GroupItem) (*StatusReply, error)
//修改群组信息
Modify(context.Context, *GroupItem) (*StatusReply, error)
//解散群组
Disband(context.Context, *IdentRequest) (*StatusReply, error)
mustEmbedUnimplementedBasicServer()
// 搜索
Search(context.Context, *protobuf.SearchRequest) (*GroupsReply, error)
// 获取群组列表
Fetch(context.Context, *protobuf.Empty) (*GroupsReply, error)
// 获取群组信息
Get(context.Context, *protobuf.IdentRequest) (*GroupItem, error)
// 创建群组
Create(context.Context, *GroupItem) (*protobuf.DataStatusReply, error)
// 修改群组信息
Modify(context.Context, *GroupItem) (*protobuf.DataStatusReply, error)
// 解散群组
Disband(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
}
// UnimplementedBasicServer must be embedded to have
// UnimplementedBasicServer 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 UnimplementedBasicServer struct{}
func (UnimplementedBasicServer) Search(context.Context, *SearchRequest) (*GroupsReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Search not implemented")
func (UnimplementedBasicServer) Search(context.Context, *protobuf.SearchRequest) (*GroupsReply, error) {
return nil, status.Error(codes.Unimplemented, "method Search not implemented")
}
func (UnimplementedBasicServer) Fetch(context.Context, *Empty) (*GroupsReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented")
func (UnimplementedBasicServer) Fetch(context.Context, *protobuf.Empty) (*GroupsReply, error) {
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
}
func (UnimplementedBasicServer) Get(context.Context, *IdentRequest) (*GroupItem, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
func (UnimplementedBasicServer) Get(context.Context, *protobuf.IdentRequest) (*GroupItem, error) {
return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedBasicServer) Create(context.Context, *GroupItem) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
func (UnimplementedBasicServer) Create(context.Context, *GroupItem) (*protobuf.DataStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedBasicServer) Modify(context.Context, *GroupItem) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Modify not implemented")
func (UnimplementedBasicServer) Modify(context.Context, *GroupItem) (*protobuf.DataStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Modify not implemented")
}
func (UnimplementedBasicServer) Disband(context.Context, *IdentRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Disband not implemented")
func (UnimplementedBasicServer) Disband(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Disband not implemented")
}
func (UnimplementedBasicServer) mustEmbedUnimplementedBasicServer() {}
func (UnimplementedBasicServer) testEmbeddedByValue() {}
func (UnimplementedBasicServer) testEmbeddedByValue() {}
// UnsafeBasicServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BasicServer will
@@ -172,7 +171,7 @@ type UnsafeBasicServer interface {
}
func RegisterBasicServer(s grpc.ServiceRegistrar, srv BasicServer) {
// If the following call pancis, it indicates UnimplementedBasicServer was
// If the following call panics, it indicates UnimplementedBasicServer 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.
@@ -183,7 +182,7 @@ func RegisterBasicServer(s grpc.ServiceRegistrar, srv BasicServer) {
}
func _Basic_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchRequest)
in := new(protobuf.SearchRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -195,13 +194,13 @@ func _Basic_Search_Handler(srv interface{}, ctx context.Context, dec func(interf
FullMethod: Basic_Search_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BasicServer).Search(ctx, req.(*SearchRequest))
return srv.(BasicServer).Search(ctx, req.(*protobuf.SearchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Basic_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
in := new(protobuf.Empty)
if err := dec(in); err != nil {
return nil, err
}
@@ -213,13 +212,13 @@ func _Basic_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interfa
FullMethod: Basic_Fetch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BasicServer).Fetch(ctx, req.(*Empty))
return srv.(BasicServer).Fetch(ctx, req.(*protobuf.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Basic_Get_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
}
@@ -231,7 +230,7 @@ func _Basic_Get_Handler(srv interface{}, ctx context.Context, dec func(interface
FullMethod: Basic_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BasicServer).Get(ctx, req.(*IdentRequest))
return srv.(BasicServer).Get(ctx, req.(*protobuf.IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -273,7 +272,7 @@ func _Basic_Modify_Handler(srv interface{}, ctx context.Context, dec func(interf
}
func _Basic_Disband_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
}
@@ -285,7 +284,7 @@ func _Basic_Disband_Handler(srv interface{}, ctx context.Context, dec func(inter
FullMethod: Basic_Disband_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BasicServer).Disband(ctx, req.(*IdentRequest))
return srv.(BasicServer).Disband(ctx, req.(*protobuf.IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -323,5 +322,5 @@ var Basic_ServiceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "group.proto",
Metadata: "module/social/group/proto/group.proto",
}