otto 3 months ago
parent
commit
1239818df9
  1. 89
      common/common.pb.go
  2. 4
      common/common.proto

89
common/common.pb.go

@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.19.5
// protoc-gen-go v1.32.0
// protoc v4.25.1
// source: common/common.proto
package common
import (
error1 "git.gz.internal.jumaiyx.cn/jm/jmproto/error"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@ -26,8 +25,8 @@ type BaseResult struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code"`
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg"`
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
}
func (x *BaseResult) Reset() {
@ -121,11 +120,11 @@ type Page struct {
unknownFields protoimpl.UnknownFields
// 当前分页
PageCur int32 `protobuf:"varint,1,opt,name=page_cur,json=pageCur,proto3" json:"page_cur"`
PageCur int32 `protobuf:"varint,1,opt,name=page_cur,json=pageCur,proto3" json:"page_cur,omitempty"`
// 总数
Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"`
Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
// 页大小
PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size"`
PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
}
func (x *Page) Reset() {
@ -186,9 +185,9 @@ type Resp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code error1.ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=error.ErrorCode" json:"code"`
ReqId string `protobuf:"bytes,2,opt,name=req_id,json=reqId,proto3" json:"req_id"`
Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg"`
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
ReqId string `protobuf:"bytes,2,opt,name=req_id,json=reqId,proto3" json:"req_id,omitempty"`
Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
}
func (x *Resp) Reset() {
@ -223,11 +222,11 @@ func (*Resp) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{3}
}
func (x *Resp) GetCode() error1.ErrorCode {
func (x *Resp) GetCode() int32 {
if x != nil {
return x.Code
}
return error1.ErrorCode(0)
return 0
}
func (x *Resp) GetReqId() string {
@ -249,8 +248,8 @@ type QueryTotalResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
Statistics int64 `protobuf:"varint,2,opt,name=statistics,proto3" json:"statistics"`
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
Statistics int64 `protobuf:"varint,2,opt,name=statistics,proto3" json:"statistics,omitempty"`
}
func (x *QueryTotalResp) Reset() {
@ -305,31 +304,29 @@ var file_common_common_proto_rawDesc = []byte{
0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x6d, 0x65, 0x74, 0x61, 0x63, 0x68, 0x61, 0x74, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x1a, 0x16, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x32, 0x0a, 0x0a, 0x42, 0x61,
0x73, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03,
0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x07,
0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x54, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12,
0x19, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x75, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x43, 0x75, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f,
0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c,
0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x55, 0x0a,
0x04, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x72,
0x65, 0x71, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x71,
0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6d, 0x73, 0x67, 0x22, 0x46, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x74,
0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18,
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1e, 0x0a, 0x0a,
0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x42, 0x35, 0x5a, 0x33,
0x67, 0x69, 0x74, 0x2e, 0x67, 0x7a, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e,
0x6a, 0x75, 0x6d, 0x61, 0x69, 0x79, 0x78, 0x2e, 0x63, 0x6e, 0x2f, 0x6a, 0x6d, 0x2f, 0x6a, 0x6d,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x3b, 0x63, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6f, 0x6e, 0x22, 0x32, 0x0a, 0x0a, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
0x54, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x5f,
0x63, 0x75, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x43,
0x75, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65,
0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67,
0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x43, 0x0a, 0x04, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a,
0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64,
0x65, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x65, 0x71, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x72, 0x65, 0x71, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x46, 0x0a, 0x0e, 0x51, 0x75,
0x65, 0x72, 0x79, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05,
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74,
0x61, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69,
0x63, 0x73, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x2e, 0x67, 0x7a, 0x2e, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x6a, 0x75, 0x6d, 0x61, 0x69, 0x79, 0x78, 0x2e, 0x63, 0x6e,
0x2f, 0x6a, 0x6d, 0x2f, 0x6a, 0x6d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
@ -351,15 +348,13 @@ var file_common_common_proto_goTypes = []interface{}{
(*Page)(nil), // 2: metachat.api.service.common.Page
(*Resp)(nil), // 3: metachat.api.service.common.Resp
(*QueryTotalResp)(nil), // 4: metachat.api.service.common.QueryTotalResp
(error1.ErrorCode)(0), // 5: error.ErrorCode
}
var file_common_common_proto_depIdxs = []int32{
5, // 0: metachat.api.service.common.Resp.code:type_name -> error.ErrorCode
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_common_common_proto_init() }

4
common/common.proto

@ -1,7 +1,7 @@
syntax = "proto3";
package metachat.api.service.common;
import "error/error_code.proto";
//import "error/error_code.proto";
option go_package = "git.gz.internal.jumaiyx.cn/jm/jmproto/common;common";
@ -26,7 +26,7 @@ message Page {
}
message Resp {
error.ErrorCode code = 1;
int32 code = 1;
string req_id = 2;
string msg = 3;
}

Loading…
Cancel
Save