github.com/hashicorp/go-plugin@v1.6.0/examples/grpc/proto/kv.pb.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 // Code generated by protoc-gen-go. DO NOT EDIT. 5 // versions: 6 // protoc-gen-go v1.31.0 7 // protoc (unknown) 8 // source: proto/kv.proto 9 10 package proto 11 12 import ( 13 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 14 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 15 reflect "reflect" 16 sync "sync" 17 ) 18 19 const ( 20 // Verify that this generated code is sufficiently up-to-date. 21 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 22 // Verify that runtime/protoimpl is sufficiently up-to-date. 23 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 24 ) 25 26 type GetRequest struct { 27 state protoimpl.MessageState 28 sizeCache protoimpl.SizeCache 29 unknownFields protoimpl.UnknownFields 30 31 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 32 } 33 34 func (x *GetRequest) Reset() { 35 *x = GetRequest{} 36 if protoimpl.UnsafeEnabled { 37 mi := &file_proto_kv_proto_msgTypes[0] 38 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 39 ms.StoreMessageInfo(mi) 40 } 41 } 42 43 func (x *GetRequest) String() string { 44 return protoimpl.X.MessageStringOf(x) 45 } 46 47 func (*GetRequest) ProtoMessage() {} 48 49 func (x *GetRequest) ProtoReflect() protoreflect.Message { 50 mi := &file_proto_kv_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 GetRequest.ProtoReflect.Descriptor instead. 62 func (*GetRequest) Descriptor() ([]byte, []int) { 63 return file_proto_kv_proto_rawDescGZIP(), []int{0} 64 } 65 66 func (x *GetRequest) GetKey() string { 67 if x != nil { 68 return x.Key 69 } 70 return "" 71 } 72 73 type GetResponse struct { 74 state protoimpl.MessageState 75 sizeCache protoimpl.SizeCache 76 unknownFields protoimpl.UnknownFields 77 78 Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` 79 } 80 81 func (x *GetResponse) Reset() { 82 *x = GetResponse{} 83 if protoimpl.UnsafeEnabled { 84 mi := &file_proto_kv_proto_msgTypes[1] 85 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 86 ms.StoreMessageInfo(mi) 87 } 88 } 89 90 func (x *GetResponse) String() string { 91 return protoimpl.X.MessageStringOf(x) 92 } 93 94 func (*GetResponse) ProtoMessage() {} 95 96 func (x *GetResponse) ProtoReflect() protoreflect.Message { 97 mi := &file_proto_kv_proto_msgTypes[1] 98 if protoimpl.UnsafeEnabled && x != nil { 99 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 100 if ms.LoadMessageInfo() == nil { 101 ms.StoreMessageInfo(mi) 102 } 103 return ms 104 } 105 return mi.MessageOf(x) 106 } 107 108 // Deprecated: Use GetResponse.ProtoReflect.Descriptor instead. 109 func (*GetResponse) Descriptor() ([]byte, []int) { 110 return file_proto_kv_proto_rawDescGZIP(), []int{1} 111 } 112 113 func (x *GetResponse) GetValue() []byte { 114 if x != nil { 115 return x.Value 116 } 117 return nil 118 } 119 120 type PutRequest struct { 121 state protoimpl.MessageState 122 sizeCache protoimpl.SizeCache 123 unknownFields protoimpl.UnknownFields 124 125 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 126 Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` 127 } 128 129 func (x *PutRequest) Reset() { 130 *x = PutRequest{} 131 if protoimpl.UnsafeEnabled { 132 mi := &file_proto_kv_proto_msgTypes[2] 133 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 134 ms.StoreMessageInfo(mi) 135 } 136 } 137 138 func (x *PutRequest) String() string { 139 return protoimpl.X.MessageStringOf(x) 140 } 141 142 func (*PutRequest) ProtoMessage() {} 143 144 func (x *PutRequest) ProtoReflect() protoreflect.Message { 145 mi := &file_proto_kv_proto_msgTypes[2] 146 if protoimpl.UnsafeEnabled && x != nil { 147 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 148 if ms.LoadMessageInfo() == nil { 149 ms.StoreMessageInfo(mi) 150 } 151 return ms 152 } 153 return mi.MessageOf(x) 154 } 155 156 // Deprecated: Use PutRequest.ProtoReflect.Descriptor instead. 157 func (*PutRequest) Descriptor() ([]byte, []int) { 158 return file_proto_kv_proto_rawDescGZIP(), []int{2} 159 } 160 161 func (x *PutRequest) GetKey() string { 162 if x != nil { 163 return x.Key 164 } 165 return "" 166 } 167 168 func (x *PutRequest) GetValue() []byte { 169 if x != nil { 170 return x.Value 171 } 172 return nil 173 } 174 175 type Empty struct { 176 state protoimpl.MessageState 177 sizeCache protoimpl.SizeCache 178 unknownFields protoimpl.UnknownFields 179 } 180 181 func (x *Empty) Reset() { 182 *x = Empty{} 183 if protoimpl.UnsafeEnabled { 184 mi := &file_proto_kv_proto_msgTypes[3] 185 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 186 ms.StoreMessageInfo(mi) 187 } 188 } 189 190 func (x *Empty) String() string { 191 return protoimpl.X.MessageStringOf(x) 192 } 193 194 func (*Empty) ProtoMessage() {} 195 196 func (x *Empty) ProtoReflect() protoreflect.Message { 197 mi := &file_proto_kv_proto_msgTypes[3] 198 if protoimpl.UnsafeEnabled && x != nil { 199 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 200 if ms.LoadMessageInfo() == nil { 201 ms.StoreMessageInfo(mi) 202 } 203 return ms 204 } 205 return mi.MessageOf(x) 206 } 207 208 // Deprecated: Use Empty.ProtoReflect.Descriptor instead. 209 func (*Empty) Descriptor() ([]byte, []int) { 210 return file_proto_kv_proto_rawDescGZIP(), []int{3} 211 } 212 213 var File_proto_kv_proto protoreflect.FileDescriptor 214 215 var file_proto_kv_proto_rawDesc = []byte{ 216 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6b, 0x76, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 217 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1e, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 218 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 219 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x23, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 220 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 221 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x34, 0x0a, 0x0a, 222 0x50, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 223 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 224 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 225 0x75, 0x65, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x5a, 0x0a, 0x02, 0x4b, 226 0x56, 0x12, 0x2c, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 227 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x70, 0x72, 228 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 229 0x26, 0x0a, 0x03, 0x50, 0x75, 0x74, 0x12, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 230 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 231 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 232 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 233 } 234 235 var ( 236 file_proto_kv_proto_rawDescOnce sync.Once 237 file_proto_kv_proto_rawDescData = file_proto_kv_proto_rawDesc 238 ) 239 240 func file_proto_kv_proto_rawDescGZIP() []byte { 241 file_proto_kv_proto_rawDescOnce.Do(func() { 242 file_proto_kv_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_kv_proto_rawDescData) 243 }) 244 return file_proto_kv_proto_rawDescData 245 } 246 247 var file_proto_kv_proto_msgTypes = make([]protoimpl.MessageInfo, 4) 248 var file_proto_kv_proto_goTypes = []interface{}{ 249 (*GetRequest)(nil), // 0: proto.GetRequest 250 (*GetResponse)(nil), // 1: proto.GetResponse 251 (*PutRequest)(nil), // 2: proto.PutRequest 252 (*Empty)(nil), // 3: proto.Empty 253 } 254 var file_proto_kv_proto_depIdxs = []int32{ 255 0, // 0: proto.KV.Get:input_type -> proto.GetRequest 256 2, // 1: proto.KV.Put:input_type -> proto.PutRequest 257 1, // 2: proto.KV.Get:output_type -> proto.GetResponse 258 3, // 3: proto.KV.Put:output_type -> proto.Empty 259 2, // [2:4] is the sub-list for method output_type 260 0, // [0:2] is the sub-list for method input_type 261 0, // [0:0] is the sub-list for extension type_name 262 0, // [0:0] is the sub-list for extension extendee 263 0, // [0:0] is the sub-list for field type_name 264 } 265 266 func init() { file_proto_kv_proto_init() } 267 func file_proto_kv_proto_init() { 268 if File_proto_kv_proto != nil { 269 return 270 } 271 if !protoimpl.UnsafeEnabled { 272 file_proto_kv_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 273 switch v := v.(*GetRequest); i { 274 case 0: 275 return &v.state 276 case 1: 277 return &v.sizeCache 278 case 2: 279 return &v.unknownFields 280 default: 281 return nil 282 } 283 } 284 file_proto_kv_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 285 switch v := v.(*GetResponse); i { 286 case 0: 287 return &v.state 288 case 1: 289 return &v.sizeCache 290 case 2: 291 return &v.unknownFields 292 default: 293 return nil 294 } 295 } 296 file_proto_kv_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 297 switch v := v.(*PutRequest); i { 298 case 0: 299 return &v.state 300 case 1: 301 return &v.sizeCache 302 case 2: 303 return &v.unknownFields 304 default: 305 return nil 306 } 307 } 308 file_proto_kv_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 309 switch v := v.(*Empty); i { 310 case 0: 311 return &v.state 312 case 1: 313 return &v.sizeCache 314 case 2: 315 return &v.unknownFields 316 default: 317 return nil 318 } 319 } 320 } 321 type x struct{} 322 out := protoimpl.TypeBuilder{ 323 File: protoimpl.DescBuilder{ 324 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 325 RawDescriptor: file_proto_kv_proto_rawDesc, 326 NumEnums: 0, 327 NumMessages: 4, 328 NumExtensions: 0, 329 NumServices: 1, 330 }, 331 GoTypes: file_proto_kv_proto_goTypes, 332 DependencyIndexes: file_proto_kv_proto_depIdxs, 333 MessageInfos: file_proto_kv_proto_msgTypes, 334 }.Build() 335 File_proto_kv_proto = out.File 336 file_proto_kv_proto_rawDesc = nil 337 file_proto_kv_proto_goTypes = nil 338 file_proto_kv_proto_depIdxs = nil 339 }