github.com/jxskiss/gopkg/v2@v2.14.9-0.20240514120614-899f3e7952b4/exp/kvutil/sharding_protobuf_test/model.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.31.0
     4  // 	protoc        v4.23.4
     5  // source: model.proto
     6  
     7  package sharding_protobuf_test
     8  
     9  import (
    10  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    11  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    12  	reflect "reflect"
    13  	sync "sync"
    14  )
    15  
    16  const (
    17  	// Verify that this generated code is sufficiently up-to-date.
    18  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    19  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    20  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    21  )
    22  
    23  type ShardingData struct {
    24  	state         protoimpl.MessageState
    25  	sizeCache     protoimpl.SizeCache
    26  	unknownFields protoimpl.UnknownFields
    27  
    28  	TotalNum int32  `protobuf:"varint,1,opt,name=total_num,json=totalNum,proto3" json:"total_num,omitempty"`
    29  	ShardNum int32  `protobuf:"varint,2,opt,name=shard_num,json=shardNum,proto3" json:"shard_num,omitempty"`
    30  	Digest   []byte `protobuf:"bytes,3,opt,name=digest,proto3" json:"digest,omitempty"`
    31  	Data     []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
    32  }
    33  
    34  func (x *ShardingData) Reset() {
    35  	*x = ShardingData{}
    36  	if protoimpl.UnsafeEnabled {
    37  		mi := &file_model_proto_msgTypes[0]
    38  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    39  		ms.StoreMessageInfo(mi)
    40  	}
    41  }
    42  
    43  func (x *ShardingData) String() string {
    44  	return protoimpl.X.MessageStringOf(x)
    45  }
    46  
    47  func (*ShardingData) ProtoMessage() {}
    48  
    49  func (x *ShardingData) ProtoReflect() protoreflect.Message {
    50  	mi := &file_model_proto_msgTypes[0]
    51  	if protoimpl.UnsafeEnabled && x != nil {
    52  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    53  		if ms.LoadMessageInfo() == nil {
    54  			ms.StoreMessageInfo(mi)
    55  		}
    56  		return ms
    57  	}
    58  	return mi.MessageOf(x)
    59  }
    60  
    61  // Deprecated: Use ShardingData.ProtoReflect.Descriptor instead.
    62  func (*ShardingData) Descriptor() ([]byte, []int) {
    63  	return file_model_proto_rawDescGZIP(), []int{0}
    64  }
    65  
    66  func (x *ShardingData) GetTotalNum() int32 {
    67  	if x != nil {
    68  		return x.TotalNum
    69  	}
    70  	return 0
    71  }
    72  
    73  func (x *ShardingData) GetShardNum() int32 {
    74  	if x != nil {
    75  		return x.ShardNum
    76  	}
    77  	return 0
    78  }
    79  
    80  func (x *ShardingData) GetDigest() []byte {
    81  	if x != nil {
    82  		return x.Digest
    83  	}
    84  	return nil
    85  }
    86  
    87  func (x *ShardingData) GetData() []byte {
    88  	if x != nil {
    89  		return x.Data
    90  	}
    91  	return nil
    92  }
    93  
    94  type TestShardingModel struct {
    95  	state         protoimpl.MessageState
    96  	sizeCache     protoimpl.SizeCache
    97  	unknownFields protoimpl.UnknownFields
    98  
    99  	Id        int64         `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
   100  	BizData   []byte        `protobuf:"bytes,2,opt,name=biz_data,json=bizData,proto3" json:"biz_data,omitempty"`
   101  	ShardData *ShardingData `protobuf:"bytes,255,opt,name=shard_data,json=shardData,proto3,oneof" json:"shard_data,omitempty"`
   102  }
   103  
   104  func (x *TestShardingModel) Reset() {
   105  	*x = TestShardingModel{}
   106  	if protoimpl.UnsafeEnabled {
   107  		mi := &file_model_proto_msgTypes[1]
   108  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   109  		ms.StoreMessageInfo(mi)
   110  	}
   111  }
   112  
   113  func (x *TestShardingModel) String() string {
   114  	return protoimpl.X.MessageStringOf(x)
   115  }
   116  
   117  func (*TestShardingModel) ProtoMessage() {}
   118  
   119  func (x *TestShardingModel) ProtoReflect() protoreflect.Message {
   120  	mi := &file_model_proto_msgTypes[1]
   121  	if protoimpl.UnsafeEnabled && x != nil {
   122  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   123  		if ms.LoadMessageInfo() == nil {
   124  			ms.StoreMessageInfo(mi)
   125  		}
   126  		return ms
   127  	}
   128  	return mi.MessageOf(x)
   129  }
   130  
   131  // Deprecated: Use TestShardingModel.ProtoReflect.Descriptor instead.
   132  func (*TestShardingModel) Descriptor() ([]byte, []int) {
   133  	return file_model_proto_rawDescGZIP(), []int{1}
   134  }
   135  
   136  func (x *TestShardingModel) GetId() int64 {
   137  	if x != nil {
   138  		return x.Id
   139  	}
   140  	return 0
   141  }
   142  
   143  func (x *TestShardingModel) GetBizData() []byte {
   144  	if x != nil {
   145  		return x.BizData
   146  	}
   147  	return nil
   148  }
   149  
   150  func (x *TestShardingModel) GetShardData() *ShardingData {
   151  	if x != nil {
   152  		return x.ShardData
   153  	}
   154  	return nil
   155  }
   156  
   157  var File_model_proto protoreflect.FileDescriptor
   158  
   159  var file_model_proto_rawDesc = []byte{
   160  	0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x74, 0x0a,
   161  	0x0c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a,
   162  	0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
   163  	0x52, 0x08, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x68,
   164  	0x61, 0x72, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73,
   165  	0x68, 0x61, 0x72, 0x64, 0x4e, 0x75, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73,
   166  	0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12,
   167  	0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64,
   168  	0x61, 0x74, 0x61, 0x22, 0x81, 0x01, 0x0a, 0x11, 0x54, 0x65, 0x73, 0x74, 0x53, 0x68, 0x61, 0x72,
   169  	0x64, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
   170  	0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x69, 0x7a,
   171  	0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x69, 0x7a,
   172  	0x44, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x61,
   173  	0x74, 0x61, 0x18, 0xff, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x68, 0x61, 0x72,
   174  	0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72,
   175  	0x64, 0x44, 0x61, 0x74, 0x61, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x68, 0x61,
   176  	0x72, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x42, 0x1a, 0x5a, 0x18, 0x2e, 0x3b, 0x73, 0x68, 0x61,
   177  	0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74,
   178  	0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   179  }
   180  
   181  var (
   182  	file_model_proto_rawDescOnce sync.Once
   183  	file_model_proto_rawDescData = file_model_proto_rawDesc
   184  )
   185  
   186  func file_model_proto_rawDescGZIP() []byte {
   187  	file_model_proto_rawDescOnce.Do(func() {
   188  		file_model_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_proto_rawDescData)
   189  	})
   190  	return file_model_proto_rawDescData
   191  }
   192  
   193  var file_model_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   194  var file_model_proto_goTypes = []interface{}{
   195  	(*ShardingData)(nil),      // 0: ShardingData
   196  	(*TestShardingModel)(nil), // 1: TestShardingModel
   197  }
   198  var file_model_proto_depIdxs = []int32{
   199  	0, // 0: TestShardingModel.shard_data:type_name -> ShardingData
   200  	1, // [1:1] is the sub-list for method output_type
   201  	1, // [1:1] is the sub-list for method input_type
   202  	1, // [1:1] is the sub-list for extension type_name
   203  	1, // [1:1] is the sub-list for extension extendee
   204  	0, // [0:1] is the sub-list for field type_name
   205  }
   206  
   207  func init() { file_model_proto_init() }
   208  func file_model_proto_init() {
   209  	if File_model_proto != nil {
   210  		return
   211  	}
   212  	if !protoimpl.UnsafeEnabled {
   213  		file_model_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   214  			switch v := v.(*ShardingData); i {
   215  			case 0:
   216  				return &v.state
   217  			case 1:
   218  				return &v.sizeCache
   219  			case 2:
   220  				return &v.unknownFields
   221  			default:
   222  				return nil
   223  			}
   224  		}
   225  		file_model_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   226  			switch v := v.(*TestShardingModel); i {
   227  			case 0:
   228  				return &v.state
   229  			case 1:
   230  				return &v.sizeCache
   231  			case 2:
   232  				return &v.unknownFields
   233  			default:
   234  				return nil
   235  			}
   236  		}
   237  	}
   238  	file_model_proto_msgTypes[1].OneofWrappers = []interface{}{}
   239  	type x struct{}
   240  	out := protoimpl.TypeBuilder{
   241  		File: protoimpl.DescBuilder{
   242  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   243  			RawDescriptor: file_model_proto_rawDesc,
   244  			NumEnums:      0,
   245  			NumMessages:   2,
   246  			NumExtensions: 0,
   247  			NumServices:   0,
   248  		},
   249  		GoTypes:           file_model_proto_goTypes,
   250  		DependencyIndexes: file_model_proto_depIdxs,
   251  		MessageInfos:      file_model_proto_msgTypes,
   252  	}.Build()
   253  	File_model_proto = out.File
   254  	file_model_proto_rawDesc = nil
   255  	file_model_proto_goTypes = nil
   256  	file_model_proto_depIdxs = nil
   257  }