github.com/cloudwego/kitex@v0.9.0/pkg/remote/trans/nphttp2/status/mock_test.go (about)

     1  /*
     2   * Copyright 2022 CloudWeGo Authors
     3   *
     4   * Licensed under the Apache License, Version 2.0 (the "License");
     5   * you may not use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *     http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16  
    17  package status
    18  
    19  import (
    20  	"reflect"
    21  	"sync"
    22  
    23  	"google.golang.org/protobuf/reflect/protoreflect"
    24  	"google.golang.org/protobuf/runtime/protoimpl"
    25  )
    26  
    27  const (
    28  	// Verify that this generated code is sufficiently up-to-date.
    29  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    30  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    31  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    32  )
    33  
    34  type MockReq struct {
    35  	state         protoimpl.MessageState
    36  	sizeCache     protoimpl.SizeCache
    37  	unknownFields protoimpl.UnknownFields
    38  
    39  	Msg     string            `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
    40  	StrMap  map[string]string `protobuf:"bytes,2,rep,name=strMap,proto3" json:"strMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    41  	StrList []string          `protobuf:"bytes,3,rep,name=strList,proto3" json:"strList,omitempty"`
    42  }
    43  
    44  func (x *MockReq) Reset() {
    45  	*x = MockReq{}
    46  	if protoimpl.UnsafeEnabled {
    47  		mi := &file_test_proto_msgTypes[0]
    48  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    49  		ms.StoreMessageInfo(mi)
    50  	}
    51  }
    52  
    53  func (x *MockReq) String() string {
    54  	return protoimpl.X.MessageStringOf(x)
    55  }
    56  
    57  func (*MockReq) ProtoMessage() {}
    58  
    59  func (x *MockReq) ProtoReflect() protoreflect.Message {
    60  	mi := &file_test_proto_msgTypes[0]
    61  	if protoimpl.UnsafeEnabled && x != nil {
    62  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    63  		if ms.LoadMessageInfo() == nil {
    64  			ms.StoreMessageInfo(mi)
    65  		}
    66  		return ms
    67  	}
    68  	return mi.MessageOf(x)
    69  }
    70  
    71  // Deprecated: Use MockReq.ProtoReflect.Descriptor instead.
    72  func (*MockReq) Descriptor() ([]byte, []int) {
    73  	return file_test_proto_rawDescGZIP(), []int{0}
    74  }
    75  
    76  func (x *MockReq) GetMsg() string {
    77  	if x != nil {
    78  		return x.Msg
    79  	}
    80  	return ""
    81  }
    82  
    83  func (x *MockReq) GetStrMap() map[string]string {
    84  	if x != nil {
    85  		return x.StrMap
    86  	}
    87  	return nil
    88  }
    89  
    90  func (x *MockReq) GetStrList() []string {
    91  	if x != nil {
    92  		return x.StrList
    93  	}
    94  	return nil
    95  }
    96  
    97  var File_test_proto protoreflect.FileDescriptor
    98  
    99  var file_test_proto_rawDesc = []byte{
   100  	0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72,
   101  	0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0xa7, 0x01, 0x0a, 0x07, 0x4d, 0x6f, 0x63, 0x6b, 0x52,
   102  	0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
   103  	0x03, 0x6d, 0x73, 0x67, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x4d, 0x61, 0x70, 0x18, 0x02,
   104  	0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
   105  	0x4d, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x2e, 0x53, 0x74, 0x72, 0x4d, 0x61, 0x70, 0x45, 0x6e,
   106  	0x74, 0x72, 0x79, 0x52, 0x06, 0x73, 0x74, 0x72, 0x4d, 0x61, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73,
   107  	0x74, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74,
   108  	0x72, 0x4c, 0x69, 0x73, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x4d, 0x61, 0x70, 0x45,
   109  	0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
   110  	0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
   111  	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
   112  	0x42, 0x35, 0x5a, 0x33, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x64, 0x2e, 0x6f,
   113  	0x72, 0x67, 0x2f, 0x6b, 0x69, 0x74, 0x65, 0x2f, 0x6b, 0x69, 0x74, 0x65, 0x78, 0x2f, 0x70, 0x6b,
   114  	0x67, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x2f, 0x70,
   115  	0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   116  }
   117  
   118  var (
   119  	file_test_proto_rawDescOnce sync.Once
   120  	file_test_proto_rawDescData = file_test_proto_rawDesc
   121  )
   122  
   123  func file_test_proto_rawDescGZIP() []byte {
   124  	file_test_proto_rawDescOnce.Do(func() {
   125  		file_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_proto_rawDescData)
   126  	})
   127  	return file_test_proto_rawDescData
   128  }
   129  
   130  var (
   131  	file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   132  	file_test_proto_goTypes  = []interface{}{
   133  		(*MockReq)(nil), // 0: protobuf.MockReq
   134  		nil,             // 1: protobuf.MockReq.StrMapEntry
   135  	}
   136  )
   137  
   138  var file_test_proto_depIdxs = []int32{
   139  	1, // 0: protobuf.MockReq.strMap:type_name -> protobuf.MockReq.StrMapEntry
   140  	1, // [1:1] is the sub-list for method output_type
   141  	1, // [1:1] is the sub-list for method input_type
   142  	1, // [1:1] is the sub-list for extension type_name
   143  	1, // [1:1] is the sub-list for extension extendee
   144  	0, // [0:1] is the sub-list for field type_name
   145  }
   146  
   147  func init() { file_test_proto_init() }
   148  func file_test_proto_init() {
   149  	if File_test_proto != nil {
   150  		return
   151  	}
   152  	if !protoimpl.UnsafeEnabled {
   153  		file_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   154  			switch v := v.(*MockReq); i {
   155  			case 0:
   156  				return &v.state
   157  			case 1:
   158  				return &v.sizeCache
   159  			case 2:
   160  				return &v.unknownFields
   161  			default:
   162  				return nil
   163  			}
   164  		}
   165  	}
   166  	type x struct{}
   167  	out := protoimpl.TypeBuilder{
   168  		File: protoimpl.DescBuilder{
   169  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   170  			RawDescriptor: file_test_proto_rawDesc,
   171  			NumEnums:      0,
   172  			NumMessages:   2,
   173  			NumExtensions: 0,
   174  			NumServices:   0,
   175  		},
   176  		GoTypes:           file_test_proto_goTypes,
   177  		DependencyIndexes: file_test_proto_depIdxs,
   178  		MessageInfos:      file_test_proto_msgTypes,
   179  	}.Build()
   180  	File_test_proto = out.File
   181  	file_test_proto_rawDesc = nil
   182  	file_test_proto_goTypes = nil
   183  	file_test_proto_depIdxs = nil
   184  }