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

@@ -15,7 +15,6 @@ tool (
require (
git.apinb.com/bsm-sdk/core v0.2.0
git.apinb.com/bsm-sdk/engine v1.3.2
github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0
github.com/patrickmn/go-cache v2.1.0+incompatible
go.etcd.io/etcd/client/v3 v3.7.1

View File

@@ -1,7 +1,5 @@
filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo=
filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc=
git.apinb.com/bsm-sdk/engine v1.3.2 h1:QJ20jveUIHcn3Tu0ktrkZI9zGRaPuJRZ+YTbSa1Zj1w=
git.apinb.com/bsm-sdk/engine v1.3.2/go.mod h1:OXRlO6Cdidqagw+LJjCngvpuuX1rwhxDwZlL/MhwiKQ=
git.apinb.com/bsm-tools/protoc-gen-markdown v0.0.0-20250907131213-6c1694ce6bcb h1:GoXhkGzI5vZ9JMXCVsSRw/AGsJY0tM2aEv76YaUg2wM=
git.apinb.com/bsm-tools/protoc-gen-markdown v0.0.0-20250907131213-6c1694ce6bcb/go.mod h1:l+84zWPM4F40Ppar+jLapgjRNt6XWDsr+l0vN4Jjlm4=
git.apinb.com/bsm-tools/protoc-gen-slc v0.0.13 h1:RGg2R2kHz6IAD7scH6So2FlZYctFUDxqWR8i/+fMfOU=

View File

@@ -8,8 +8,8 @@ import (
"bsm/full/module/base/feedback/internal/impl"
"bsm/full/module/base/feedback/internal/models"
pb "bsm/full/module/base/feedback/pb"
"git.apinb.com/bsm-sdk/core/errcode"
"git.apinb.com/bsm-sdk/core/vars"
"git.apinb.com/bsm-sdk/engine/exception"
)
// Delete 删除反馈记录
@@ -19,7 +19,7 @@ import (
func Delete(ctx context.Context, in *pb.DeleteRequest) (reply *pb.StatusReply, err error) {
// 验证请求参数
if in.GetIdentity() == "" {
return nil, exception.ErrInvalidArgument
return nil, errcode.ErrInvalidArgument
}
// 删除记录GORM会自动处理关联的图片和附件删除

View File

@@ -8,7 +8,7 @@ import (
"bsm/full/module/base/feedback/internal/impl"
"bsm/full/module/base/feedback/internal/models"
pb "bsm/full/module/base/feedback/pb"
"git.apinb.com/bsm-sdk/engine/exception"
"git.apinb.com/bsm-sdk/core/errcode"
"gorm.io/gorm"
)
@@ -19,7 +19,7 @@ import (
func Get(ctx context.Context, in *pb.GetRequest) (reply *pb.GetReply, err error) {
// 验证请求参数
if in.GetIdentity() == "" {
return nil, exception.ErrInvalidArgument
return nil, errcode.ErrInvalidArgument
}
out := new(pb.GetReply)
@@ -29,7 +29,7 @@ func Get(ctx context.Context, in *pb.GetRequest) (reply *pb.GetReply, err error)
err = impl.DBService.Preload("Images").Where("identity = ?", in.GetIdentity()).First(record).Error
if err != nil {
if errors.Is(err, gorm.ErrRecordNotFound) {
return nil, exception.ErrNotFound
return nil, errcode.ErrRecordNotFound
}
return nil, err
}

View File

@@ -8,11 +8,11 @@ import (
"bsm/full/module/base/feedback/internal/impl"
"bsm/full/module/base/feedback/internal/models"
pb "bsm/full/module/base/feedback/pb"
"git.apinb.com/bsm-sdk/core/errcode"
"git.apinb.com/bsm-sdk/core/service"
"git.apinb.com/bsm-sdk/core/types"
"git.apinb.com/bsm-sdk/core/utils"
"git.apinb.com/bsm-sdk/core/vars"
"git.apinb.com/bsm-sdk/engine/exception"
)
// Modify 修改反馈记录
@@ -28,7 +28,7 @@ func Modify(ctx context.Context, in *pb.ModifyRequest) (reply *pb.StatusReply, e
// 验证请求参数
if in.GetIdentity() == "" {
return nil, exception.ErrInvalidArgument
return nil, errcode.ErrInvalidArgument
}
// 构建更新记录

View File

@@ -8,8 +8,8 @@ import (
"bsm/full/module/base/feedback/internal/impl"
"bsm/full/module/base/feedback/internal/models"
pb "bsm/full/module/base/feedback/pb"
"git.apinb.com/bsm-sdk/core/errcode"
"git.apinb.com/bsm-sdk/core/vars"
"git.apinb.com/bsm-sdk/engine/exception"
)
// Remark 添加或更新反馈记录的备注和状态
@@ -19,7 +19,7 @@ import (
func Remark(ctx context.Context, in *pb.RemarkRequest) (reply *pb.StatusReply, err error) {
// 验证请求参数
if in.GetIdentity() == "" {
return nil, exception.ErrInvalidArgument
return nil, errcode.ErrInvalidArgument
}
// 构建更新记录

View File

@@ -2,9 +2,9 @@
package server
import (
"context"
"bsm/full/module/base/feedback/internal/logic/method"
pb "bsm/full/module/base/feedback/pb"
"context"
)
type MethodServer struct {

View File

@@ -2,8 +2,8 @@
package server
import (
"context"
pb "bsm/full/module/base/feedback/pb"
"context"
"git.apinb.com/bsm-sdk/core/vars"
gwRuntime "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"google.golang.org/grpc"

View File

@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.8
// protoc (unknown)
// source: feedback.proto
// protoc-gen-go v1.36.11
// protoc v7.35.0
// source: module/base/feedback/proto/feedback.proto
package feedback
@@ -39,7 +39,7 @@ type ListRequest struct {
func (x *ListRequest) Reset() {
*x = ListRequest{}
mi := &file_feedback_proto_msgTypes[0]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -51,7 +51,7 @@ func (x *ListRequest) String() string {
func (*ListRequest) ProtoMessage() {}
func (x *ListRequest) ProtoReflect() protoreflect.Message {
mi := &file_feedback_proto_msgTypes[0]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -64,7 +64,7 @@ func (x *ListRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) Descriptor() ([]byte, []int) {
return file_feedback_proto_rawDescGZIP(), []int{0}
return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{0}
}
func (x *ListRequest) GetPage() int64 {
@@ -147,7 +147,7 @@ type ListReply struct {
func (x *ListReply) Reset() {
*x = ListReply{}
mi := &file_feedback_proto_msgTypes[1]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -159,7 +159,7 @@ func (x *ListReply) String() string {
func (*ListReply) ProtoMessage() {}
func (x *ListReply) ProtoReflect() protoreflect.Message {
mi := &file_feedback_proto_msgTypes[1]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -172,7 +172,7 @@ func (x *ListReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListReply.ProtoReflect.Descriptor instead.
func (*ListReply) Descriptor() ([]byte, []int) {
return file_feedback_proto_rawDescGZIP(), []int{1}
return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{1}
}
func (x *ListReply) GetCount() int64 {
@@ -213,7 +213,7 @@ type FeedbackItem struct {
func (x *FeedbackItem) Reset() {
*x = FeedbackItem{}
mi := &file_feedback_proto_msgTypes[2]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -225,7 +225,7 @@ func (x *FeedbackItem) String() string {
func (*FeedbackItem) ProtoMessage() {}
func (x *FeedbackItem) ProtoReflect() protoreflect.Message {
mi := &file_feedback_proto_msgTypes[2]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -238,7 +238,7 @@ func (x *FeedbackItem) ProtoReflect() protoreflect.Message {
// Deprecated: Use FeedbackItem.ProtoReflect.Descriptor instead.
func (*FeedbackItem) Descriptor() ([]byte, []int) {
return file_feedback_proto_rawDescGZIP(), []int{2}
return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{2}
}
func (x *FeedbackItem) GetIdentity() string {
@@ -365,7 +365,7 @@ type FeedbackAccessory struct {
func (x *FeedbackAccessory) Reset() {
*x = FeedbackAccessory{}
mi := &file_feedback_proto_msgTypes[3]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -377,7 +377,7 @@ func (x *FeedbackAccessory) String() string {
func (*FeedbackAccessory) ProtoMessage() {}
func (x *FeedbackAccessory) ProtoReflect() protoreflect.Message {
mi := &file_feedback_proto_msgTypes[3]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -390,7 +390,7 @@ func (x *FeedbackAccessory) ProtoReflect() protoreflect.Message {
// Deprecated: Use FeedbackAccessory.ProtoReflect.Descriptor instead.
func (*FeedbackAccessory) Descriptor() ([]byte, []int) {
return file_feedback_proto_rawDescGZIP(), []int{3}
return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{3}
}
func (x *FeedbackAccessory) GetIdentity() string {
@@ -432,7 +432,7 @@ type FeedbackImage struct {
func (x *FeedbackImage) Reset() {
*x = FeedbackImage{}
mi := &file_feedback_proto_msgTypes[4]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -444,7 +444,7 @@ func (x *FeedbackImage) String() string {
func (*FeedbackImage) ProtoMessage() {}
func (x *FeedbackImage) ProtoReflect() protoreflect.Message {
mi := &file_feedback_proto_msgTypes[4]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -457,7 +457,7 @@ func (x *FeedbackImage) ProtoReflect() protoreflect.Message {
// Deprecated: Use FeedbackImage.ProtoReflect.Descriptor instead.
func (*FeedbackImage) Descriptor() ([]byte, []int) {
return file_feedback_proto_rawDescGZIP(), []int{4}
return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{4}
}
func (x *FeedbackImage) GetIdentity() string {
@@ -490,7 +490,7 @@ type GetRequest struct {
func (x *GetRequest) Reset() {
*x = GetRequest{}
mi := &file_feedback_proto_msgTypes[5]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -502,7 +502,7 @@ func (x *GetRequest) String() string {
func (*GetRequest) ProtoMessage() {}
func (x *GetRequest) ProtoReflect() protoreflect.Message {
mi := &file_feedback_proto_msgTypes[5]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -515,7 +515,7 @@ func (x *GetRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) Descriptor() ([]byte, []int) {
return file_feedback_proto_rawDescGZIP(), []int{5}
return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{5}
}
func (x *GetRequest) GetIdentity() string {
@@ -535,7 +535,7 @@ type GetReply struct {
func (x *GetReply) Reset() {
*x = GetReply{}
mi := &file_feedback_proto_msgTypes[6]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -547,7 +547,7 @@ func (x *GetReply) String() string {
func (*GetReply) ProtoMessage() {}
func (x *GetReply) ProtoReflect() protoreflect.Message {
mi := &file_feedback_proto_msgTypes[6]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -560,7 +560,7 @@ func (x *GetReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetReply.ProtoReflect.Descriptor instead.
func (*GetReply) Descriptor() ([]byte, []int) {
return file_feedback_proto_rawDescGZIP(), []int{6}
return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{6}
}
func (x *GetReply) GetRecord() *FeedbackItem {
@@ -597,7 +597,7 @@ type AddRequest struct {
func (x *AddRequest) Reset() {
*x = AddRequest{}
mi := &file_feedback_proto_msgTypes[7]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -609,7 +609,7 @@ func (x *AddRequest) String() string {
func (*AddRequest) ProtoMessage() {}
func (x *AddRequest) ProtoReflect() protoreflect.Message {
mi := &file_feedback_proto_msgTypes[7]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[7]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -622,7 +622,7 @@ func (x *AddRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.
func (*AddRequest) Descriptor() ([]byte, []int) {
return file_feedback_proto_rawDescGZIP(), []int{7}
return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{7}
}
func (x *AddRequest) GetUserIdentity() string {
@@ -718,7 +718,7 @@ type AddReply struct {
func (x *AddReply) Reset() {
*x = AddReply{}
mi := &file_feedback_proto_msgTypes[8]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -730,7 +730,7 @@ func (x *AddReply) String() string {
func (*AddReply) ProtoMessage() {}
func (x *AddReply) ProtoReflect() protoreflect.Message {
mi := &file_feedback_proto_msgTypes[8]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[8]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -743,7 +743,7 @@ func (x *AddReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddReply.ProtoReflect.Descriptor instead.
func (*AddReply) Descriptor() ([]byte, []int) {
return file_feedback_proto_rawDescGZIP(), []int{8}
return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{8}
}
func (x *AddReply) GetIdentity() string {
@@ -774,7 +774,7 @@ type ModifyRequest struct {
func (x *ModifyRequest) Reset() {
*x = ModifyRequest{}
mi := &file_feedback_proto_msgTypes[9]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -786,7 +786,7 @@ func (x *ModifyRequest) String() string {
func (*ModifyRequest) ProtoMessage() {}
func (x *ModifyRequest) ProtoReflect() protoreflect.Message {
mi := &file_feedback_proto_msgTypes[9]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[9]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -799,7 +799,7 @@ func (x *ModifyRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ModifyRequest.ProtoReflect.Descriptor instead.
func (*ModifyRequest) Descriptor() ([]byte, []int) {
return file_feedback_proto_rawDescGZIP(), []int{9}
return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{9}
}
func (x *ModifyRequest) GetIdentity() string {
@@ -902,7 +902,7 @@ type DeleteRequest struct {
func (x *DeleteRequest) Reset() {
*x = DeleteRequest{}
mi := &file_feedback_proto_msgTypes[10]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -914,7 +914,7 @@ func (x *DeleteRequest) String() string {
func (*DeleteRequest) ProtoMessage() {}
func (x *DeleteRequest) ProtoReflect() protoreflect.Message {
mi := &file_feedback_proto_msgTypes[10]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[10]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -927,7 +927,7 @@ func (x *DeleteRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) Descriptor() ([]byte, []int) {
return file_feedback_proto_rawDescGZIP(), []int{10}
return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{10}
}
func (x *DeleteRequest) GetIdentity() string {
@@ -948,7 +948,7 @@ type RemarkRequest struct {
func (x *RemarkRequest) Reset() {
*x = RemarkRequest{}
mi := &file_feedback_proto_msgTypes[11]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -960,7 +960,7 @@ func (x *RemarkRequest) String() string {
func (*RemarkRequest) ProtoMessage() {}
func (x *RemarkRequest) ProtoReflect() protoreflect.Message {
mi := &file_feedback_proto_msgTypes[11]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[11]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -973,7 +973,7 @@ func (x *RemarkRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use RemarkRequest.ProtoReflect.Descriptor instead.
func (*RemarkRequest) Descriptor() ([]byte, []int) {
return file_feedback_proto_rawDescGZIP(), []int{11}
return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{11}
}
func (x *RemarkRequest) GetIdentity() string {
@@ -1007,7 +1007,7 @@ type IdentRequest struct {
func (x *IdentRequest) Reset() {
*x = IdentRequest{}
mi := &file_feedback_proto_msgTypes[12]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1019,7 +1019,7 @@ func (x *IdentRequest) String() string {
func (*IdentRequest) ProtoMessage() {}
func (x *IdentRequest) ProtoReflect() protoreflect.Message {
mi := &file_feedback_proto_msgTypes[12]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[12]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1032,7 +1032,7 @@ func (x *IdentRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead.
func (*IdentRequest) Descriptor() ([]byte, []int) {
return file_feedback_proto_rawDescGZIP(), []int{12}
return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{12}
}
func (x *IdentRequest) GetId() int64 {
@@ -1061,7 +1061,7 @@ type StatusReply struct {
func (x *StatusReply) Reset() {
*x = StatusReply{}
mi := &file_feedback_proto_msgTypes[13]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1073,7 +1073,7 @@ func (x *StatusReply) String() string {
func (*StatusReply) ProtoMessage() {}
func (x *StatusReply) ProtoReflect() protoreflect.Message {
mi := &file_feedback_proto_msgTypes[13]
mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[13]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1086,7 +1086,7 @@ func (x *StatusReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead.
func (*StatusReply) Descriptor() ([]byte, []int) {
return file_feedback_proto_rawDescGZIP(), []int{13}
return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{13}
}
func (x *StatusReply) GetCode() int32 {
@@ -1117,11 +1117,11 @@ func (x *StatusReply) GetTimeseq() int64 {
return 0
}
var File_feedback_proto protoreflect.FileDescriptor
var File_module_base_feedback_proto_feedback_proto protoreflect.FileDescriptor
const file_feedback_proto_rawDesc = "" +
const file_module_base_feedback_proto_feedback_proto_rawDesc = "" +
"\n" +
"\x1cbase/feedback/feedback.proto\x12\bfeedback\"\x99\x02\n" +
")module/base/feedback/proto/feedback.proto\x12\bfeedback\"\x99\x02\n" +
"\vListRequest\x12\x12\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x12\n" +
"\x04size\x18\x02 \x01(\x03R\x04size\x12$\n" +
@@ -1226,23 +1226,22 @@ const file_feedback_proto_rawDesc = "" +
"\x03Add\x12\x14.feedback.AddRequest\x1a\x12.feedback.AddReply\"\x00\x12:\n" +
"\x06Modify\x12\x17.feedback.ModifyRequest\x1a\x15.feedback.StatusReply\"\x00\x12:\n" +
"\x06Delete\x12\x17.feedback.DeleteRequest\x1a\x15.feedback.StatusReply\"\x00\x12:\n" +
"\x06Remark\x12\x17.feedback.RemarkRequest\x1a\x15.feedback.StatusReply\"\x00B\fZ\n" +
".;feedbackb\x06proto3"
"\x06Remark\x12\x17.feedback.RemarkRequest\x1a\x15.feedback.StatusReply\"\x00B+Z)bsm/full/module/base/feedback/pb;feedbackb\x06proto3"
var (
file_feedback_proto_rawDescOnce sync.Once
file_feedback_proto_rawDescData []byte
file_module_base_feedback_proto_feedback_proto_rawDescOnce sync.Once
file_module_base_feedback_proto_feedback_proto_rawDescData []byte
)
func file_feedback_proto_rawDescGZIP() []byte {
file_feedback_proto_rawDescOnce.Do(func() {
file_feedback_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_feedback_proto_rawDesc), len(file_feedback_proto_rawDesc)))
func file_module_base_feedback_proto_feedback_proto_rawDescGZIP() []byte {
file_module_base_feedback_proto_feedback_proto_rawDescOnce.Do(func() {
file_module_base_feedback_proto_feedback_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_feedback_proto_feedback_proto_rawDesc), len(file_module_base_feedback_proto_feedback_proto_rawDesc)))
})
return file_feedback_proto_rawDescData
return file_module_base_feedback_proto_feedback_proto_rawDescData
}
var file_feedback_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_feedback_proto_goTypes = []any{
var file_module_base_feedback_proto_feedback_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_module_base_feedback_proto_feedback_proto_goTypes = []any{
(*ListRequest)(nil), // 0: feedback.ListRequest
(*ListReply)(nil), // 1: feedback.ListReply
(*FeedbackItem)(nil), // 2: feedback.FeedbackItem
@@ -1258,7 +1257,7 @@ var file_feedback_proto_goTypes = []any{
(*IdentRequest)(nil), // 12: feedback.IdentRequest
(*StatusReply)(nil), // 13: feedback.StatusReply
}
var file_feedback_proto_depIdxs = []int32{
var file_module_base_feedback_proto_feedback_proto_depIdxs = []int32{
2, // 0: feedback.ListReply.list:type_name -> feedback.FeedbackItem
4, // 1: feedback.FeedbackItem.images:type_name -> feedback.FeedbackImage
3, // 2: feedback.FeedbackItem.accessories:type_name -> feedback.FeedbackAccessory
@@ -1286,26 +1285,26 @@ var file_feedback_proto_depIdxs = []int32{
0, // [0:8] is the sub-list for field type_name
}
func init() { file_feedback_proto_init() }
func file_feedback_proto_init() {
if File_feedback_proto != nil {
func init() { file_module_base_feedback_proto_feedback_proto_init() }
func file_module_base_feedback_proto_feedback_proto_init() {
if File_module_base_feedback_proto_feedback_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_feedback_proto_rawDesc), len(file_feedback_proto_rawDesc)),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_feedback_proto_feedback_proto_rawDesc), len(file_module_base_feedback_proto_feedback_proto_rawDesc)),
NumEnums: 0,
NumMessages: 14,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_feedback_proto_goTypes,
DependencyIndexes: file_feedback_proto_depIdxs,
MessageInfos: file_feedback_proto_msgTypes,
GoTypes: file_module_base_feedback_proto_feedback_proto_goTypes,
DependencyIndexes: file_module_base_feedback_proto_feedback_proto_depIdxs,
MessageInfos: file_module_base_feedback_proto_feedback_proto_msgTypes,
}.Build()
File_feedback_proto = out.File
file_feedback_proto_goTypes = nil
file_feedback_proto_depIdxs = nil
File_module_base_feedback_proto_feedback_proto = out.File
file_module_base_feedback_proto_feedback_proto_goTypes = nil
file_module_base_feedback_proto_feedback_proto_depIdxs = nil
}

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: feedback.proto
// source: module/base/feedback/proto/feedback.proto
/*
Package feedback is a reverse proxy.

View File

@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: feedback.proto
// - protoc-gen-go-grpc v1.6.2
// - protoc v7.35.0
// source: module/base/feedback/proto/feedback.proto
package feedback
@@ -110,7 +110,7 @@ func (c *methodClient) Remark(ctx context.Context, in *RemarkRequest, opts ...gr
}
// MethodServer is the server API for Method service.
// All implementations must embed UnimplementedMethodServer
// All implementations should embed UnimplementedMethodServer
// for forward compatibility.
//
// Feedback-建议反馈模块
@@ -121,10 +121,9 @@ type MethodServer interface {
Modify(context.Context, *ModifyRequest) (*StatusReply, error)
Delete(context.Context, *DeleteRequest) (*StatusReply, error)
Remark(context.Context, *RemarkRequest) (*StatusReply, error)
mustEmbedUnimplementedMethodServer()
}
// UnimplementedMethodServer must be embedded to have
// UnimplementedMethodServer should be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
@@ -132,25 +131,24 @@ type MethodServer interface {
type UnimplementedMethodServer struct{}
func (UnimplementedMethodServer) List(context.Context, *ListRequest) (*ListReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
return nil, status.Error(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedMethodServer) Get(context.Context, *GetRequest) (*GetReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedMethodServer) Add(context.Context, *AddRequest) (*AddReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Add not implemented")
return nil, status.Error(codes.Unimplemented, "method Add not implemented")
}
func (UnimplementedMethodServer) Modify(context.Context, *ModifyRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Modify not implemented")
return nil, status.Error(codes.Unimplemented, "method Modify not implemented")
}
func (UnimplementedMethodServer) Delete(context.Context, *DeleteRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedMethodServer) Remark(context.Context, *RemarkRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Remark not implemented")
return nil, status.Error(codes.Unimplemented, "method Remark not implemented")
}
func (UnimplementedMethodServer) mustEmbedUnimplementedMethodServer() {}
func (UnimplementedMethodServer) testEmbeddedByValue() {}
func (UnimplementedMethodServer) testEmbeddedByValue() {}
// UnsafeMethodServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MethodServer will
@@ -160,7 +158,7 @@ type UnsafeMethodServer interface {
}
func RegisterMethodServer(s grpc.ServiceRegistrar, srv MethodServer) {
// If the following call pancis, it indicates UnimplementedMethodServer was
// If the following call panics, it indicates UnimplementedMethodServer 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.
@@ -311,5 +309,5 @@ var Method_ServiceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "feedback.proto",
Metadata: "module/base/feedback/proto/feedback.proto",
}

View File

@@ -1,15 +1,15 @@
syntax = "proto3";
package feedback;
option go_package = ".;feedback";
option go_package = "bsm/full/module/base/feedback/pb;feedback";
// Feedback-建议反馈模块
service Method{
rpc List(ListRequest) returns (ListReply) {}
rpc Get(GetRequest) returns (GetReply) {}
rpc Add(AddRequest) returns (AddReply) {}
rpc Modify(ModifyRequest) returns (StatusReply) {}
rpc Delete(DeleteRequest) returns (StatusReply) {}
rpc Remark(RemarkRequest) returns (StatusReply) {}
rpc List(ListRequest) returns (ListReply) {}
rpc Get(GetRequest) returns (GetReply) {}
rpc Add(AddRequest) returns (AddReply) {}
rpc Modify(ModifyRequest) returns (StatusReply) {}
rpc Delete(DeleteRequest) returns (StatusReply) {}
rpc Remark(RemarkRequest) returns (StatusReply) {}
}