github.com/s7techlab/cckit@v0.10.5/extensions/pinger/chaincode_pinger.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: pinger/chaincode_pinger.proto
     6  
     7  package pinger
     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  	emptypb "google.golang.org/protobuf/types/known/emptypb"
    18  	timestamppb "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  // stores time and certificate of ping tx creator
    31  type PingInfo struct {
    32  	state         protoimpl.MessageState
    33  	sizeCache     protoimpl.SizeCache
    34  	unknownFields protoimpl.UnknownFields
    35  
    36  	InvokerId           string                 `protobuf:"bytes,1,opt,name=invoker_id,json=invokerId,proto3" json:"invoker_id,omitempty"`
    37  	InvokerCert         []byte                 `protobuf:"bytes,2,opt,name=invoker_cert,json=invokerCert,proto3" json:"invoker_cert,omitempty"`
    38  	EndorsingServerTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=endorsing_server_time,json=endorsingServerTime,proto3" json:"endorsing_server_time,omitempty"`
    39  	TxTime              *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=tx_time,json=txTime,proto3" json:"tx_time,omitempty"`
    40  }
    41  
    42  func (x *PingInfo) Reset() {
    43  	*x = PingInfo{}
    44  	if protoimpl.UnsafeEnabled {
    45  		mi := &file_pinger_chaincode_pinger_proto_msgTypes[0]
    46  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    47  		ms.StoreMessageInfo(mi)
    48  	}
    49  }
    50  
    51  func (x *PingInfo) String() string {
    52  	return protoimpl.X.MessageStringOf(x)
    53  }
    54  
    55  func (*PingInfo) ProtoMessage() {}
    56  
    57  func (x *PingInfo) ProtoReflect() protoreflect.Message {
    58  	mi := &file_pinger_chaincode_pinger_proto_msgTypes[0]
    59  	if protoimpl.UnsafeEnabled && x != nil {
    60  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    61  		if ms.LoadMessageInfo() == nil {
    62  			ms.StoreMessageInfo(mi)
    63  		}
    64  		return ms
    65  	}
    66  	return mi.MessageOf(x)
    67  }
    68  
    69  // Deprecated: Use PingInfo.ProtoReflect.Descriptor instead.
    70  func (*PingInfo) Descriptor() ([]byte, []int) {
    71  	return file_pinger_chaincode_pinger_proto_rawDescGZIP(), []int{0}
    72  }
    73  
    74  func (x *PingInfo) GetInvokerId() string {
    75  	if x != nil {
    76  		return x.InvokerId
    77  	}
    78  	return ""
    79  }
    80  
    81  func (x *PingInfo) GetInvokerCert() []byte {
    82  	if x != nil {
    83  		return x.InvokerCert
    84  	}
    85  	return nil
    86  }
    87  
    88  func (x *PingInfo) GetEndorsingServerTime() *timestamppb.Timestamp {
    89  	if x != nil {
    90  		return x.EndorsingServerTime
    91  	}
    92  	return nil
    93  }
    94  
    95  func (x *PingInfo) GetTxTime() *timestamppb.Timestamp {
    96  	if x != nil {
    97  		return x.TxTime
    98  	}
    99  	return nil
   100  }
   101  
   102  var File_pinger_chaincode_pinger_proto protoreflect.FileDescriptor
   103  
   104  var file_pinger_chaincode_pinger_proto_rawDesc = []byte{
   105  	0x0a, 0x1d, 0x70, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f,
   106  	0x64, 0x65, 0x5f, 0x70, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
   107  	0x11, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x69, 0x6e, 0x67,
   108  	0x65, 0x72, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
   109  	0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   110  	0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
   111  	0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67,
   112  	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74,
   113  	0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd1,
   114  	0x01, 0x0a, 0x08, 0x50, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x69,
   115  	0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
   116  	0x09, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e,
   117  	0x76, 0x6f, 0x6b, 0x65, 0x72, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
   118  	0x52, 0x0b, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x12, 0x4e, 0x0a,
   119  	0x15, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65,
   120  	0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
   121  	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
   122  	0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x13, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73,
   123  	0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x33, 0x0a,
   124  	0x07, 0x74, 0x78, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
   125  	0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
   126  	0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x06, 0x74, 0x78, 0x54, 0x69,
   127  	0x6d, 0x65, 0x32, 0x78, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x50,
   128  	0x69, 0x6e, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x04,
   129  	0x50, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
   130  	0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, 0x65,
   131  	0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x69, 0x6e, 0x67, 0x65, 0x72,
   132  	0x2e, 0x50, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02,
   133  	0x1b, 0x22, 0x16, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x2f, 0x70, 0x69,
   134  	0x6e, 0x67, 0x65, 0x72, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0x42, 0x2e, 0x5a, 0x2c,
   135  	0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x37, 0x74, 0x65, 0x63,
   136  	0x68, 0x6c, 0x61, 0x62, 0x2f, 0x63, 0x63, 0x6b, 0x69, 0x74, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e,
   137  	0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72,
   138  	0x6f, 0x74, 0x6f, 0x33,
   139  }
   140  
   141  var (
   142  	file_pinger_chaincode_pinger_proto_rawDescOnce sync.Once
   143  	file_pinger_chaincode_pinger_proto_rawDescData = file_pinger_chaincode_pinger_proto_rawDesc
   144  )
   145  
   146  func file_pinger_chaincode_pinger_proto_rawDescGZIP() []byte {
   147  	file_pinger_chaincode_pinger_proto_rawDescOnce.Do(func() {
   148  		file_pinger_chaincode_pinger_proto_rawDescData = protoimpl.X.CompressGZIP(file_pinger_chaincode_pinger_proto_rawDescData)
   149  	})
   150  	return file_pinger_chaincode_pinger_proto_rawDescData
   151  }
   152  
   153  var file_pinger_chaincode_pinger_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   154  var file_pinger_chaincode_pinger_proto_goTypes = []interface{}{
   155  	(*PingInfo)(nil),              // 0: extensions.pinger.PingInfo
   156  	(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
   157  	(*emptypb.Empty)(nil),         // 2: google.protobuf.Empty
   158  }
   159  var file_pinger_chaincode_pinger_proto_depIdxs = []int32{
   160  	1, // 0: extensions.pinger.PingInfo.endorsing_server_time:type_name -> google.protobuf.Timestamp
   161  	1, // 1: extensions.pinger.PingInfo.tx_time:type_name -> google.protobuf.Timestamp
   162  	2, // 2: extensions.pinger.ChaincodePingerService.Ping:input_type -> google.protobuf.Empty
   163  	0, // 3: extensions.pinger.ChaincodePingerService.Ping:output_type -> extensions.pinger.PingInfo
   164  	3, // [3:4] is the sub-list for method output_type
   165  	2, // [2:3] is the sub-list for method input_type
   166  	2, // [2:2] is the sub-list for extension type_name
   167  	2, // [2:2] is the sub-list for extension extendee
   168  	0, // [0:2] is the sub-list for field type_name
   169  }
   170  
   171  func init() { file_pinger_chaincode_pinger_proto_init() }
   172  func file_pinger_chaincode_pinger_proto_init() {
   173  	if File_pinger_chaincode_pinger_proto != nil {
   174  		return
   175  	}
   176  	if !protoimpl.UnsafeEnabled {
   177  		file_pinger_chaincode_pinger_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   178  			switch v := v.(*PingInfo); i {
   179  			case 0:
   180  				return &v.state
   181  			case 1:
   182  				return &v.sizeCache
   183  			case 2:
   184  				return &v.unknownFields
   185  			default:
   186  				return nil
   187  			}
   188  		}
   189  	}
   190  	type x struct{}
   191  	out := protoimpl.TypeBuilder{
   192  		File: protoimpl.DescBuilder{
   193  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   194  			RawDescriptor: file_pinger_chaincode_pinger_proto_rawDesc,
   195  			NumEnums:      0,
   196  			NumMessages:   1,
   197  			NumExtensions: 0,
   198  			NumServices:   1,
   199  		},
   200  		GoTypes:           file_pinger_chaincode_pinger_proto_goTypes,
   201  		DependencyIndexes: file_pinger_chaincode_pinger_proto_depIdxs,
   202  		MessageInfos:      file_pinger_chaincode_pinger_proto_msgTypes,
   203  	}.Build()
   204  	File_pinger_chaincode_pinger_proto = out.File
   205  	file_pinger_chaincode_pinger_proto_rawDesc = nil
   206  	file_pinger_chaincode_pinger_proto_goTypes = nil
   207  	file_pinger_chaincode_pinger_proto_depIdxs = nil
   208  }
   209  
   210  // Reference imports to suppress errors if they are not otherwise used.
   211  var _ context.Context
   212  var _ grpc.ClientConnInterface
   213  
   214  // This is a compile-time assertion to ensure that this generated file
   215  // is compatible with the grpc package it is being compiled against.
   216  const _ = grpc.SupportPackageIsVersion6
   217  
   218  // ChaincodePingerServiceClient is the client API for ChaincodePingerService service.
   219  //
   220  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   221  type ChaincodePingerServiceClient interface {
   222  	// ping chaincode
   223  	Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PingInfo, error)
   224  }
   225  
   226  type chaincodePingerServiceClient struct {
   227  	cc grpc.ClientConnInterface
   228  }
   229  
   230  func NewChaincodePingerServiceClient(cc grpc.ClientConnInterface) ChaincodePingerServiceClient {
   231  	return &chaincodePingerServiceClient{cc}
   232  }
   233  
   234  func (c *chaincodePingerServiceClient) Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PingInfo, error) {
   235  	out := new(PingInfo)
   236  	err := c.cc.Invoke(ctx, "/extensions.pinger.ChaincodePingerService/Ping", in, out, opts...)
   237  	if err != nil {
   238  		return nil, err
   239  	}
   240  	return out, nil
   241  }
   242  
   243  // ChaincodePingerServiceServer is the server API for ChaincodePingerService service.
   244  type ChaincodePingerServiceServer interface {
   245  	// ping chaincode
   246  	Ping(context.Context, *emptypb.Empty) (*PingInfo, error)
   247  }
   248  
   249  // UnimplementedChaincodePingerServiceServer can be embedded to have forward compatible implementations.
   250  type UnimplementedChaincodePingerServiceServer struct {
   251  }
   252  
   253  func (*UnimplementedChaincodePingerServiceServer) Ping(context.Context, *emptypb.Empty) (*PingInfo, error) {
   254  	return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
   255  }
   256  
   257  func RegisterChaincodePingerServiceServer(s *grpc.Server, srv ChaincodePingerServiceServer) {
   258  	s.RegisterService(&_ChaincodePingerService_serviceDesc, srv)
   259  }
   260  
   261  func _ChaincodePingerService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   262  	in := new(emptypb.Empty)
   263  	if err := dec(in); err != nil {
   264  		return nil, err
   265  	}
   266  	if interceptor == nil {
   267  		return srv.(ChaincodePingerServiceServer).Ping(ctx, in)
   268  	}
   269  	info := &grpc.UnaryServerInfo{
   270  		Server:     srv,
   271  		FullMethod: "/extensions.pinger.ChaincodePingerService/Ping",
   272  	}
   273  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   274  		return srv.(ChaincodePingerServiceServer).Ping(ctx, req.(*emptypb.Empty))
   275  	}
   276  	return interceptor(ctx, in, info, handler)
   277  }
   278  
   279  var _ChaincodePingerService_serviceDesc = grpc.ServiceDesc{
   280  	ServiceName: "extensions.pinger.ChaincodePingerService",
   281  	HandlerType: (*ChaincodePingerServiceServer)(nil),
   282  	Methods: []grpc.MethodDesc{
   283  		{
   284  			MethodName: "Ping",
   285  			Handler:    _ChaincodePingerService_Ping_Handler,
   286  		},
   287  	},
   288  	Streams:  []grpc.StreamDesc{},
   289  	Metadata: "pinger/chaincode_pinger.proto",
   290  }