github.com/s7techlab/cckit@v0.10.5/examples/cpaper_proxy/cpaper_proxy.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.27.1 4 // protoc (unknown) 5 // source: cpaper_proxy/cpaper_proxy.proto 6 7 package cpaper_proxy 8 9 import ( 10 context "context" 11 _ "google.golang.org/genproto/googleapis/api/annotations" 12 grpc "google.golang.org/grpc" 13 codes "google.golang.org/grpc/codes" 14 status "google.golang.org/grpc/status" 15 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 16 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 17 _ "google.golang.org/protobuf/types/known/emptypb" 18 _ "google.golang.org/protobuf/types/known/timestamppb" 19 reflect "reflect" 20 sync "sync" 21 ) 22 23 const ( 24 // Verify that this generated code is sufficiently up-to-date. 25 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 26 // Verify that runtime/protoimpl is sufficiently up-to-date. 27 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 28 ) 29 30 type Id struct { 31 state protoimpl.MessageState 32 sizeCache protoimpl.SizeCache 33 unknownFields protoimpl.UnknownFields 34 35 Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` 36 PaperNumber string `protobuf:"bytes,2,opt,name=paper_number,json=paperNumber,proto3" json:"paper_number,omitempty"` 37 } 38 39 func (x *Id) Reset() { 40 *x = Id{} 41 if protoimpl.UnsafeEnabled { 42 mi := &file_cpaper_proxy_cpaper_proxy_proto_msgTypes[0] 43 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 44 ms.StoreMessageInfo(mi) 45 } 46 } 47 48 func (x *Id) String() string { 49 return protoimpl.X.MessageStringOf(x) 50 } 51 52 func (*Id) ProtoMessage() {} 53 54 func (x *Id) ProtoReflect() protoreflect.Message { 55 mi := &file_cpaper_proxy_cpaper_proxy_proto_msgTypes[0] 56 if protoimpl.UnsafeEnabled && x != nil { 57 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 58 if ms.LoadMessageInfo() == nil { 59 ms.StoreMessageInfo(mi) 60 } 61 return ms 62 } 63 return mi.MessageOf(x) 64 } 65 66 // Deprecated: Use Id.ProtoReflect.Descriptor instead. 67 func (*Id) Descriptor() ([]byte, []int) { 68 return file_cpaper_proxy_cpaper_proxy_proto_rawDescGZIP(), []int{0} 69 } 70 71 func (x *Id) GetIssuer() string { 72 if x != nil { 73 return x.Issuer 74 } 75 return "" 76 } 77 78 func (x *Id) GetPaperNumber() string { 79 if x != nil { 80 return x.PaperNumber 81 } 82 return "" 83 } 84 85 type InfoFromCPaper struct { 86 state protoimpl.MessageState 87 sizeCache protoimpl.SizeCache 88 unknownFields protoimpl.UnknownFields 89 90 Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` 91 PaperNumber string `protobuf:"bytes,2,opt,name=paper_number,json=paperNumber,proto3" json:"paper_number,omitempty"` 92 Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` 93 } 94 95 func (x *InfoFromCPaper) Reset() { 96 *x = InfoFromCPaper{} 97 if protoimpl.UnsafeEnabled { 98 mi := &file_cpaper_proxy_cpaper_proxy_proto_msgTypes[1] 99 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 100 ms.StoreMessageInfo(mi) 101 } 102 } 103 104 func (x *InfoFromCPaper) String() string { 105 return protoimpl.X.MessageStringOf(x) 106 } 107 108 func (*InfoFromCPaper) ProtoMessage() {} 109 110 func (x *InfoFromCPaper) ProtoReflect() protoreflect.Message { 111 mi := &file_cpaper_proxy_cpaper_proxy_proto_msgTypes[1] 112 if protoimpl.UnsafeEnabled && x != nil { 113 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 114 if ms.LoadMessageInfo() == nil { 115 ms.StoreMessageInfo(mi) 116 } 117 return ms 118 } 119 return mi.MessageOf(x) 120 } 121 122 // Deprecated: Use InfoFromCPaper.ProtoReflect.Descriptor instead. 123 func (*InfoFromCPaper) Descriptor() ([]byte, []int) { 124 return file_cpaper_proxy_cpaper_proxy_proto_rawDescGZIP(), []int{1} 125 } 126 127 func (x *InfoFromCPaper) GetIssuer() string { 128 if x != nil { 129 return x.Issuer 130 } 131 return "" 132 } 133 134 func (x *InfoFromCPaper) GetPaperNumber() string { 135 if x != nil { 136 return x.PaperNumber 137 } 138 return "" 139 } 140 141 func (x *InfoFromCPaper) GetOwner() string { 142 if x != nil { 143 return x.Owner 144 } 145 return "" 146 } 147 148 var File_cpaper_proxy_cpaper_proxy_proto protoreflect.FileDescriptor 149 150 var file_cpaper_proxy_cpaper_proxy_proto_rawDesc = []byte{ 151 0x0a, 0x1f, 0x63, 0x70, 0x61, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 152 0x70, 0x61, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 153 0x6f, 0x12, 0x15, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x70, 0x61, 0x70, 154 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 155 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 156 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 157 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 158 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 159 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 160 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3f, 0x0a, 0x02, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 161 0x73, 0x75, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 162 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x70, 0x65, 0x72, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 163 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x70, 0x65, 0x72, 0x4e, 164 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x61, 0x0a, 0x0e, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x72, 0x6f, 165 0x6d, 0x43, 0x50, 0x61, 0x70, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 166 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 167 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x70, 0x65, 0x72, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 168 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x70, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x62, 169 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 170 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x32, 0x90, 0x01, 0x0a, 0x12, 0x43, 0x50, 0x61, 171 0x70, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 172 0x7a, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x50, 0x61, 0x70, 0x65, 0x72, 173 0x12, 0x19, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x70, 0x61, 0x70, 174 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x49, 0x64, 0x1a, 0x25, 0x2e, 0x65, 0x78, 175 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x70, 0x61, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, 176 0x6f, 0x78, 0x79, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x50, 0x61, 0x70, 177 0x65, 0x72, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x70, 0x61, 178 0x70, 0x65, 0x72, 0x2f, 0x7b, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 179 0x70, 0x65, 0x72, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x7d, 0x42, 0x32, 0x5a, 0x30, 0x67, 180 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x37, 0x74, 0x65, 0x63, 0x68, 181 0x6c, 0x61, 0x62, 0x2f, 0x63, 0x63, 0x6b, 0x69, 0x74, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 182 0x65, 0x73, 0x2f, 0x63, 0x70, 0x61, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x62, 183 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 184 } 185 186 var ( 187 file_cpaper_proxy_cpaper_proxy_proto_rawDescOnce sync.Once 188 file_cpaper_proxy_cpaper_proxy_proto_rawDescData = file_cpaper_proxy_cpaper_proxy_proto_rawDesc 189 ) 190 191 func file_cpaper_proxy_cpaper_proxy_proto_rawDescGZIP() []byte { 192 file_cpaper_proxy_cpaper_proxy_proto_rawDescOnce.Do(func() { 193 file_cpaper_proxy_cpaper_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_cpaper_proxy_cpaper_proxy_proto_rawDescData) 194 }) 195 return file_cpaper_proxy_cpaper_proxy_proto_rawDescData 196 } 197 198 var file_cpaper_proxy_cpaper_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 199 var file_cpaper_proxy_cpaper_proxy_proto_goTypes = []interface{}{ 200 (*Id)(nil), // 0: examples.cpaper_proxy.Id 201 (*InfoFromCPaper)(nil), // 1: examples.cpaper_proxy.InfoFromCPaper 202 } 203 var file_cpaper_proxy_cpaper_proxy_proto_depIdxs = []int32{ 204 0, // 0: examples.cpaper_proxy.CPaperProxyService.GetFromCPaper:input_type -> examples.cpaper_proxy.Id 205 1, // 1: examples.cpaper_proxy.CPaperProxyService.GetFromCPaper:output_type -> examples.cpaper_proxy.InfoFromCPaper 206 1, // [1:2] is the sub-list for method output_type 207 0, // [0:1] is the sub-list for method input_type 208 0, // [0:0] is the sub-list for extension type_name 209 0, // [0:0] is the sub-list for extension extendee 210 0, // [0:0] is the sub-list for field type_name 211 } 212 213 func init() { file_cpaper_proxy_cpaper_proxy_proto_init() } 214 func file_cpaper_proxy_cpaper_proxy_proto_init() { 215 if File_cpaper_proxy_cpaper_proxy_proto != nil { 216 return 217 } 218 if !protoimpl.UnsafeEnabled { 219 file_cpaper_proxy_cpaper_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 220 switch v := v.(*Id); i { 221 case 0: 222 return &v.state 223 case 1: 224 return &v.sizeCache 225 case 2: 226 return &v.unknownFields 227 default: 228 return nil 229 } 230 } 231 file_cpaper_proxy_cpaper_proxy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 232 switch v := v.(*InfoFromCPaper); i { 233 case 0: 234 return &v.state 235 case 1: 236 return &v.sizeCache 237 case 2: 238 return &v.unknownFields 239 default: 240 return nil 241 } 242 } 243 } 244 type x struct{} 245 out := protoimpl.TypeBuilder{ 246 File: protoimpl.DescBuilder{ 247 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 248 RawDescriptor: file_cpaper_proxy_cpaper_proxy_proto_rawDesc, 249 NumEnums: 0, 250 NumMessages: 2, 251 NumExtensions: 0, 252 NumServices: 1, 253 }, 254 GoTypes: file_cpaper_proxy_cpaper_proxy_proto_goTypes, 255 DependencyIndexes: file_cpaper_proxy_cpaper_proxy_proto_depIdxs, 256 MessageInfos: file_cpaper_proxy_cpaper_proxy_proto_msgTypes, 257 }.Build() 258 File_cpaper_proxy_cpaper_proxy_proto = out.File 259 file_cpaper_proxy_cpaper_proxy_proto_rawDesc = nil 260 file_cpaper_proxy_cpaper_proxy_proto_goTypes = nil 261 file_cpaper_proxy_cpaper_proxy_proto_depIdxs = nil 262 } 263 264 // Reference imports to suppress errors if they are not otherwise used. 265 var _ context.Context 266 var _ grpc.ClientConnInterface 267 268 // This is a compile-time assertion to ensure that this generated file 269 // is compatible with the grpc package it is being compiled against. 270 const _ = grpc.SupportPackageIsVersion6 271 272 // CPaperProxyServiceClient is the client API for CPaperProxyService service. 273 // 274 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 275 type CPaperProxyServiceClient interface { 276 // List method returns all registered commercial papers 277 GetFromCPaper(ctx context.Context, in *Id, opts ...grpc.CallOption) (*InfoFromCPaper, error) 278 } 279 280 type cPaperProxyServiceClient struct { 281 cc grpc.ClientConnInterface 282 } 283 284 func NewCPaperProxyServiceClient(cc grpc.ClientConnInterface) CPaperProxyServiceClient { 285 return &cPaperProxyServiceClient{cc} 286 } 287 288 func (c *cPaperProxyServiceClient) GetFromCPaper(ctx context.Context, in *Id, opts ...grpc.CallOption) (*InfoFromCPaper, error) { 289 out := new(InfoFromCPaper) 290 err := c.cc.Invoke(ctx, "/examples.cpaper_proxy.CPaperProxyService/GetFromCPaper", in, out, opts...) 291 if err != nil { 292 return nil, err 293 } 294 return out, nil 295 } 296 297 // CPaperProxyServiceServer is the server API for CPaperProxyService service. 298 type CPaperProxyServiceServer interface { 299 // List method returns all registered commercial papers 300 GetFromCPaper(context.Context, *Id) (*InfoFromCPaper, error) 301 } 302 303 // UnimplementedCPaperProxyServiceServer can be embedded to have forward compatible implementations. 304 type UnimplementedCPaperProxyServiceServer struct { 305 } 306 307 func (*UnimplementedCPaperProxyServiceServer) GetFromCPaper(context.Context, *Id) (*InfoFromCPaper, error) { 308 return nil, status.Errorf(codes.Unimplemented, "method GetFromCPaper not implemented") 309 } 310 311 func RegisterCPaperProxyServiceServer(s *grpc.Server, srv CPaperProxyServiceServer) { 312 s.RegisterService(&_CPaperProxyService_serviceDesc, srv) 313 } 314 315 func _CPaperProxyService_GetFromCPaper_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 316 in := new(Id) 317 if err := dec(in); err != nil { 318 return nil, err 319 } 320 if interceptor == nil { 321 return srv.(CPaperProxyServiceServer).GetFromCPaper(ctx, in) 322 } 323 info := &grpc.UnaryServerInfo{ 324 Server: srv, 325 FullMethod: "/examples.cpaper_proxy.CPaperProxyService/GetFromCPaper", 326 } 327 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 328 return srv.(CPaperProxyServiceServer).GetFromCPaper(ctx, req.(*Id)) 329 } 330 return interceptor(ctx, in, info, handler) 331 } 332 333 var _CPaperProxyService_serviceDesc = grpc.ServiceDesc{ 334 ServiceName: "examples.cpaper_proxy.CPaperProxyService", 335 HandlerType: (*CPaperProxyServiceServer)(nil), 336 Methods: []grpc.MethodDesc{ 337 { 338 MethodName: "GetFromCPaper", 339 Handler: _CPaperProxyService_GetFromCPaper_Handler, 340 }, 341 }, 342 Streams: []grpc.StreamDesc{}, 343 Metadata: "cpaper_proxy/cpaper_proxy.proto", 344 }