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: match.proto
// - protoc-gen-go-grpc v1.6.2
// - protoc v7.35.0
// source: module/social/relation/proto/match.proto
package relation
import (
protobuf "bsm/full/protobuf"
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -32,13 +33,13 @@ const (
// relation-关系管理:匹配
type MatchClient interface {
// 获取匹配列表
Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchRelationItemReply, error)
Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FetchRelationItemReply, error)
// 获取匹配详情
Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*RelationItem, error)
Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.RelationItem, error)
// 执行通过,加为好友
DoJoin(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
DoJoin(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
// 执行忽略
DoIgnore(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
DoIgnore(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
}
type matchClient struct {
@@ -49,9 +50,9 @@ func NewMatchClient(cc grpc.ClientConnInterface) MatchClient {
return &matchClient{cc}
}
func (c *matchClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchRelationItemReply, error) {
func (c *matchClient) Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FetchRelationItemReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(FetchRelationItemReply)
out := new(protobuf.FetchRelationItemReply)
err := c.cc.Invoke(ctx, Match_Fetch_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -59,9 +60,9 @@ func (c *matchClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.
return out, nil
}
func (c *matchClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*RelationItem, error) {
func (c *matchClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.RelationItem, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RelationItem)
out := new(protobuf.RelationItem)
err := c.cc.Invoke(ctx, Match_Get_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -69,9 +70,9 @@ func (c *matchClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.Ca
return out, nil
}
func (c *matchClient) DoJoin(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
func (c *matchClient) DoJoin(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, Match_DoJoin_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -79,9 +80,9 @@ func (c *matchClient) DoJoin(ctx context.Context, in *IdentRequest, opts ...grpc
return out, nil
}
func (c *matchClient) DoIgnore(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
func (c *matchClient) DoIgnore(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, Match_DoIgnore_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -90,43 +91,41 @@ func (c *matchClient) DoIgnore(ctx context.Context, in *IdentRequest, opts ...gr
}
// MatchServer is the server API for Match service.
// All implementations must embed UnimplementedMatchServer
// All implementations should embed UnimplementedMatchServer
// for forward compatibility.
//
// relation-关系管理:匹配
type MatchServer interface {
// 获取匹配列表
Fetch(context.Context, *FetchRequest) (*FetchRelationItemReply, error)
Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FetchRelationItemReply, error)
// 获取匹配详情
Get(context.Context, *IdentRequest) (*RelationItem, error)
Get(context.Context, *protobuf.IdentRequest) (*protobuf.RelationItem, error)
// 执行通过,加为好友
DoJoin(context.Context, *IdentRequest) (*StatusReply, error)
DoJoin(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
// 执行忽略
DoIgnore(context.Context, *IdentRequest) (*StatusReply, error)
mustEmbedUnimplementedMatchServer()
DoIgnore(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
}
// UnimplementedMatchServer must be embedded to have
// UnimplementedMatchServer 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 UnimplementedMatchServer struct{}
func (UnimplementedMatchServer) Fetch(context.Context, *FetchRequest) (*FetchRelationItemReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented")
func (UnimplementedMatchServer) Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FetchRelationItemReply, error) {
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
}
func (UnimplementedMatchServer) Get(context.Context, *IdentRequest) (*RelationItem, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
func (UnimplementedMatchServer) Get(context.Context, *protobuf.IdentRequest) (*protobuf.RelationItem, error) {
return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedMatchServer) DoJoin(context.Context, *IdentRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method DoJoin not implemented")
func (UnimplementedMatchServer) DoJoin(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method DoJoin not implemented")
}
func (UnimplementedMatchServer) DoIgnore(context.Context, *IdentRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method DoIgnore not implemented")
func (UnimplementedMatchServer) DoIgnore(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method DoIgnore not implemented")
}
func (UnimplementedMatchServer) mustEmbedUnimplementedMatchServer() {}
func (UnimplementedMatchServer) testEmbeddedByValue() {}
func (UnimplementedMatchServer) testEmbeddedByValue() {}
// UnsafeMatchServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MatchServer will
@@ -136,7 +135,7 @@ type UnsafeMatchServer interface {
}
func RegisterMatchServer(s grpc.ServiceRegistrar, srv MatchServer) {
// If the following call pancis, it indicates UnimplementedMatchServer was
// If the following call panics, it indicates UnimplementedMatchServer 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 RegisterMatchServer(s grpc.ServiceRegistrar, srv MatchServer) {
}
func _Match_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FetchRequest)
in := new(protobuf.FetchRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -159,13 +158,13 @@ func _Match_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interfa
FullMethod: Match_Fetch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MatchServer).Fetch(ctx, req.(*FetchRequest))
return srv.(MatchServer).Fetch(ctx, req.(*protobuf.FetchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Match_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
}
@@ -177,13 +176,13 @@ func _Match_Get_Handler(srv interface{}, ctx context.Context, dec func(interface
FullMethod: Match_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MatchServer).Get(ctx, req.(*IdentRequest))
return srv.(MatchServer).Get(ctx, req.(*protobuf.IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Match_DoJoin_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
}
@@ -195,13 +194,13 @@ func _Match_DoJoin_Handler(srv interface{}, ctx context.Context, dec func(interf
FullMethod: Match_DoJoin_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MatchServer).DoJoin(ctx, req.(*IdentRequest))
return srv.(MatchServer).DoJoin(ctx, req.(*protobuf.IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Match_DoIgnore_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 _Match_DoIgnore_Handler(srv interface{}, ctx context.Context, dec func(inte
FullMethod: Match_DoIgnore_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MatchServer).DoIgnore(ctx, req.(*IdentRequest))
return srv.(MatchServer).DoIgnore(ctx, req.(*protobuf.IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -243,5 +242,5 @@ var Match_ServiceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "match.proto",
Metadata: "module/social/relation/proto/match.proto",
}