github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/rpc/rpcquery/rpcquery_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  
     3  package rpcquery
     4  
     5  import (
     6  	context "context"
     7  
     8  	acm "github.com/hyperledger/burrow/acm"
     9  	names "github.com/hyperledger/burrow/execution/names"
    10  	rpc "github.com/hyperledger/burrow/rpc"
    11  	payload "github.com/hyperledger/burrow/txs/payload"
    12  	types "github.com/tendermint/tendermint/proto/tendermint/types"
    13  	grpc "google.golang.org/grpc"
    14  	codes "google.golang.org/grpc/codes"
    15  	status "google.golang.org/grpc/status"
    16  )
    17  
    18  // This is a compile-time assertion to ensure that this generated file
    19  // is compatible with the grpc package it is being compiled against.
    20  // Requires gRPC-Go v1.32.0 or later.
    21  const _ = grpc.SupportPackageIsVersion7
    22  
    23  // QueryClient is the client API for Query service.
    24  //
    25  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
    26  type QueryClient interface {
    27  	Status(ctx context.Context, in *StatusParam, opts ...grpc.CallOption) (*rpc.ResultStatus, error)
    28  	GetAccount(ctx context.Context, in *GetAccountParam, opts ...grpc.CallOption) (*acm.Account, error)
    29  	GetMetadata(ctx context.Context, in *GetMetadataParam, opts ...grpc.CallOption) (*MetadataResult, error)
    30  	GetStorage(ctx context.Context, in *GetStorageParam, opts ...grpc.CallOption) (*StorageValue, error)
    31  	ListAccounts(ctx context.Context, in *ListAccountsParam, opts ...grpc.CallOption) (Query_ListAccountsClient, error)
    32  	GetName(ctx context.Context, in *GetNameParam, opts ...grpc.CallOption) (*names.Entry, error)
    33  	ListNames(ctx context.Context, in *ListNamesParam, opts ...grpc.CallOption) (Query_ListNamesClient, error)
    34  	// GetNetworkRegistry returns for each validator address, the list of their identified node at the current state
    35  	GetNetworkRegistry(ctx context.Context, in *GetNetworkRegistryParam, opts ...grpc.CallOption) (*NetworkRegistry, error)
    36  	GetValidatorSet(ctx context.Context, in *GetValidatorSetParam, opts ...grpc.CallOption) (*ValidatorSet, error)
    37  	GetValidatorSetHistory(ctx context.Context, in *GetValidatorSetHistoryParam, opts ...grpc.CallOption) (*ValidatorSetHistory, error)
    38  	GetProposal(ctx context.Context, in *GetProposalParam, opts ...grpc.CallOption) (*payload.Ballot, error)
    39  	ListProposals(ctx context.Context, in *ListProposalsParam, opts ...grpc.CallOption) (Query_ListProposalsClient, error)
    40  	GetStats(ctx context.Context, in *GetStatsParam, opts ...grpc.CallOption) (*Stats, error)
    41  	GetBlockHeader(ctx context.Context, in *GetBlockParam, opts ...grpc.CallOption) (*types.Header, error)
    42  }
    43  
    44  type queryClient struct {
    45  	cc grpc.ClientConnInterface
    46  }
    47  
    48  func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
    49  	return &queryClient{cc}
    50  }
    51  
    52  func (c *queryClient) Status(ctx context.Context, in *StatusParam, opts ...grpc.CallOption) (*rpc.ResultStatus, error) {
    53  	out := new(rpc.ResultStatus)
    54  	err := c.cc.Invoke(ctx, "/rpcquery.Query/Status", in, out, opts...)
    55  	if err != nil {
    56  		return nil, err
    57  	}
    58  	return out, nil
    59  }
    60  
    61  func (c *queryClient) GetAccount(ctx context.Context, in *GetAccountParam, opts ...grpc.CallOption) (*acm.Account, error) {
    62  	out := new(acm.Account)
    63  	err := c.cc.Invoke(ctx, "/rpcquery.Query/GetAccount", in, out, opts...)
    64  	if err != nil {
    65  		return nil, err
    66  	}
    67  	return out, nil
    68  }
    69  
    70  func (c *queryClient) GetMetadata(ctx context.Context, in *GetMetadataParam, opts ...grpc.CallOption) (*MetadataResult, error) {
    71  	out := new(MetadataResult)
    72  	err := c.cc.Invoke(ctx, "/rpcquery.Query/GetMetadata", in, out, opts...)
    73  	if err != nil {
    74  		return nil, err
    75  	}
    76  	return out, nil
    77  }
    78  
    79  func (c *queryClient) GetStorage(ctx context.Context, in *GetStorageParam, opts ...grpc.CallOption) (*StorageValue, error) {
    80  	out := new(StorageValue)
    81  	err := c.cc.Invoke(ctx, "/rpcquery.Query/GetStorage", in, out, opts...)
    82  	if err != nil {
    83  		return nil, err
    84  	}
    85  	return out, nil
    86  }
    87  
    88  func (c *queryClient) ListAccounts(ctx context.Context, in *ListAccountsParam, opts ...grpc.CallOption) (Query_ListAccountsClient, error) {
    89  	stream, err := c.cc.NewStream(ctx, &Query_ServiceDesc.Streams[0], "/rpcquery.Query/ListAccounts", opts...)
    90  	if err != nil {
    91  		return nil, err
    92  	}
    93  	x := &queryListAccountsClient{stream}
    94  	if err := x.ClientStream.SendMsg(in); err != nil {
    95  		return nil, err
    96  	}
    97  	if err := x.ClientStream.CloseSend(); err != nil {
    98  		return nil, err
    99  	}
   100  	return x, nil
   101  }
   102  
   103  type Query_ListAccountsClient interface {
   104  	Recv() (*acm.Account, error)
   105  	grpc.ClientStream
   106  }
   107  
   108  type queryListAccountsClient struct {
   109  	grpc.ClientStream
   110  }
   111  
   112  func (x *queryListAccountsClient) Recv() (*acm.Account, error) {
   113  	m := new(acm.Account)
   114  	if err := x.ClientStream.RecvMsg(m); err != nil {
   115  		return nil, err
   116  	}
   117  	return m, nil
   118  }
   119  
   120  func (c *queryClient) GetName(ctx context.Context, in *GetNameParam, opts ...grpc.CallOption) (*names.Entry, error) {
   121  	out := new(names.Entry)
   122  	err := c.cc.Invoke(ctx, "/rpcquery.Query/GetName", in, out, opts...)
   123  	if err != nil {
   124  		return nil, err
   125  	}
   126  	return out, nil
   127  }
   128  
   129  func (c *queryClient) ListNames(ctx context.Context, in *ListNamesParam, opts ...grpc.CallOption) (Query_ListNamesClient, error) {
   130  	stream, err := c.cc.NewStream(ctx, &Query_ServiceDesc.Streams[1], "/rpcquery.Query/ListNames", opts...)
   131  	if err != nil {
   132  		return nil, err
   133  	}
   134  	x := &queryListNamesClient{stream}
   135  	if err := x.ClientStream.SendMsg(in); err != nil {
   136  		return nil, err
   137  	}
   138  	if err := x.ClientStream.CloseSend(); err != nil {
   139  		return nil, err
   140  	}
   141  	return x, nil
   142  }
   143  
   144  type Query_ListNamesClient interface {
   145  	Recv() (*names.Entry, error)
   146  	grpc.ClientStream
   147  }
   148  
   149  type queryListNamesClient struct {
   150  	grpc.ClientStream
   151  }
   152  
   153  func (x *queryListNamesClient) Recv() (*names.Entry, error) {
   154  	m := new(names.Entry)
   155  	if err := x.ClientStream.RecvMsg(m); err != nil {
   156  		return nil, err
   157  	}
   158  	return m, nil
   159  }
   160  
   161  func (c *queryClient) GetNetworkRegistry(ctx context.Context, in *GetNetworkRegistryParam, opts ...grpc.CallOption) (*NetworkRegistry, error) {
   162  	out := new(NetworkRegistry)
   163  	err := c.cc.Invoke(ctx, "/rpcquery.Query/GetNetworkRegistry", in, out, opts...)
   164  	if err != nil {
   165  		return nil, err
   166  	}
   167  	return out, nil
   168  }
   169  
   170  func (c *queryClient) GetValidatorSet(ctx context.Context, in *GetValidatorSetParam, opts ...grpc.CallOption) (*ValidatorSet, error) {
   171  	out := new(ValidatorSet)
   172  	err := c.cc.Invoke(ctx, "/rpcquery.Query/GetValidatorSet", in, out, opts...)
   173  	if err != nil {
   174  		return nil, err
   175  	}
   176  	return out, nil
   177  }
   178  
   179  func (c *queryClient) GetValidatorSetHistory(ctx context.Context, in *GetValidatorSetHistoryParam, opts ...grpc.CallOption) (*ValidatorSetHistory, error) {
   180  	out := new(ValidatorSetHistory)
   181  	err := c.cc.Invoke(ctx, "/rpcquery.Query/GetValidatorSetHistory", in, out, opts...)
   182  	if err != nil {
   183  		return nil, err
   184  	}
   185  	return out, nil
   186  }
   187  
   188  func (c *queryClient) GetProposal(ctx context.Context, in *GetProposalParam, opts ...grpc.CallOption) (*payload.Ballot, error) {
   189  	out := new(payload.Ballot)
   190  	err := c.cc.Invoke(ctx, "/rpcquery.Query/GetProposal", in, out, opts...)
   191  	if err != nil {
   192  		return nil, err
   193  	}
   194  	return out, nil
   195  }
   196  
   197  func (c *queryClient) ListProposals(ctx context.Context, in *ListProposalsParam, opts ...grpc.CallOption) (Query_ListProposalsClient, error) {
   198  	stream, err := c.cc.NewStream(ctx, &Query_ServiceDesc.Streams[2], "/rpcquery.Query/ListProposals", opts...)
   199  	if err != nil {
   200  		return nil, err
   201  	}
   202  	x := &queryListProposalsClient{stream}
   203  	if err := x.ClientStream.SendMsg(in); err != nil {
   204  		return nil, err
   205  	}
   206  	if err := x.ClientStream.CloseSend(); err != nil {
   207  		return nil, err
   208  	}
   209  	return x, nil
   210  }
   211  
   212  type Query_ListProposalsClient interface {
   213  	Recv() (*ProposalResult, error)
   214  	grpc.ClientStream
   215  }
   216  
   217  type queryListProposalsClient struct {
   218  	grpc.ClientStream
   219  }
   220  
   221  func (x *queryListProposalsClient) Recv() (*ProposalResult, error) {
   222  	m := new(ProposalResult)
   223  	if err := x.ClientStream.RecvMsg(m); err != nil {
   224  		return nil, err
   225  	}
   226  	return m, nil
   227  }
   228  
   229  func (c *queryClient) GetStats(ctx context.Context, in *GetStatsParam, opts ...grpc.CallOption) (*Stats, error) {
   230  	out := new(Stats)
   231  	err := c.cc.Invoke(ctx, "/rpcquery.Query/GetStats", in, out, opts...)
   232  	if err != nil {
   233  		return nil, err
   234  	}
   235  	return out, nil
   236  }
   237  
   238  func (c *queryClient) GetBlockHeader(ctx context.Context, in *GetBlockParam, opts ...grpc.CallOption) (*types.Header, error) {
   239  	out := new(types.Header)
   240  	err := c.cc.Invoke(ctx, "/rpcquery.Query/GetBlockHeader", in, out, opts...)
   241  	if err != nil {
   242  		return nil, err
   243  	}
   244  	return out, nil
   245  }
   246  
   247  // QueryServer is the server API for Query service.
   248  // All implementations must embed UnimplementedQueryServer
   249  // for forward compatibility
   250  type QueryServer interface {
   251  	Status(context.Context, *StatusParam) (*rpc.ResultStatus, error)
   252  	GetAccount(context.Context, *GetAccountParam) (*acm.Account, error)
   253  	GetMetadata(context.Context, *GetMetadataParam) (*MetadataResult, error)
   254  	GetStorage(context.Context, *GetStorageParam) (*StorageValue, error)
   255  	ListAccounts(*ListAccountsParam, Query_ListAccountsServer) error
   256  	GetName(context.Context, *GetNameParam) (*names.Entry, error)
   257  	ListNames(*ListNamesParam, Query_ListNamesServer) error
   258  	// GetNetworkRegistry returns for each validator address, the list of their identified node at the current state
   259  	GetNetworkRegistry(context.Context, *GetNetworkRegistryParam) (*NetworkRegistry, error)
   260  	GetValidatorSet(context.Context, *GetValidatorSetParam) (*ValidatorSet, error)
   261  	GetValidatorSetHistory(context.Context, *GetValidatorSetHistoryParam) (*ValidatorSetHistory, error)
   262  	GetProposal(context.Context, *GetProposalParam) (*payload.Ballot, error)
   263  	ListProposals(*ListProposalsParam, Query_ListProposalsServer) error
   264  	GetStats(context.Context, *GetStatsParam) (*Stats, error)
   265  	GetBlockHeader(context.Context, *GetBlockParam) (*types.Header, error)
   266  	mustEmbedUnimplementedQueryServer()
   267  }
   268  
   269  // UnimplementedQueryServer must be embedded to have forward compatible implementations.
   270  type UnimplementedQueryServer struct {
   271  }
   272  
   273  func (UnimplementedQueryServer) Status(context.Context, *StatusParam) (*rpc.ResultStatus, error) {
   274  	return nil, status.Errorf(codes.Unimplemented, "method Status not implemented")
   275  }
   276  func (UnimplementedQueryServer) GetAccount(context.Context, *GetAccountParam) (*acm.Account, error) {
   277  	return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented")
   278  }
   279  func (UnimplementedQueryServer) GetMetadata(context.Context, *GetMetadataParam) (*MetadataResult, error) {
   280  	return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented")
   281  }
   282  func (UnimplementedQueryServer) GetStorage(context.Context, *GetStorageParam) (*StorageValue, error) {
   283  	return nil, status.Errorf(codes.Unimplemented, "method GetStorage not implemented")
   284  }
   285  func (UnimplementedQueryServer) ListAccounts(*ListAccountsParam, Query_ListAccountsServer) error {
   286  	return status.Errorf(codes.Unimplemented, "method ListAccounts not implemented")
   287  }
   288  func (UnimplementedQueryServer) GetName(context.Context, *GetNameParam) (*names.Entry, error) {
   289  	return nil, status.Errorf(codes.Unimplemented, "method GetName not implemented")
   290  }
   291  func (UnimplementedQueryServer) ListNames(*ListNamesParam, Query_ListNamesServer) error {
   292  	return status.Errorf(codes.Unimplemented, "method ListNames not implemented")
   293  }
   294  func (UnimplementedQueryServer) GetNetworkRegistry(context.Context, *GetNetworkRegistryParam) (*NetworkRegistry, error) {
   295  	return nil, status.Errorf(codes.Unimplemented, "method GetNetworkRegistry not implemented")
   296  }
   297  func (UnimplementedQueryServer) GetValidatorSet(context.Context, *GetValidatorSetParam) (*ValidatorSet, error) {
   298  	return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSet not implemented")
   299  }
   300  func (UnimplementedQueryServer) GetValidatorSetHistory(context.Context, *GetValidatorSetHistoryParam) (*ValidatorSetHistory, error) {
   301  	return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSetHistory not implemented")
   302  }
   303  func (UnimplementedQueryServer) GetProposal(context.Context, *GetProposalParam) (*payload.Ballot, error) {
   304  	return nil, status.Errorf(codes.Unimplemented, "method GetProposal not implemented")
   305  }
   306  func (UnimplementedQueryServer) ListProposals(*ListProposalsParam, Query_ListProposalsServer) error {
   307  	return status.Errorf(codes.Unimplemented, "method ListProposals not implemented")
   308  }
   309  func (UnimplementedQueryServer) GetStats(context.Context, *GetStatsParam) (*Stats, error) {
   310  	return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
   311  }
   312  func (UnimplementedQueryServer) GetBlockHeader(context.Context, *GetBlockParam) (*types.Header, error) {
   313  	return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeader not implemented")
   314  }
   315  func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
   316  
   317  // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
   318  // Use of this interface is not recommended, as added methods to QueryServer will
   319  // result in compilation errors.
   320  type UnsafeQueryServer interface {
   321  	mustEmbedUnimplementedQueryServer()
   322  }
   323  
   324  func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
   325  	s.RegisterService(&Query_ServiceDesc, srv)
   326  }
   327  
   328  func _Query_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   329  	in := new(StatusParam)
   330  	if err := dec(in); err != nil {
   331  		return nil, err
   332  	}
   333  	if interceptor == nil {
   334  		return srv.(QueryServer).Status(ctx, in)
   335  	}
   336  	info := &grpc.UnaryServerInfo{
   337  		Server:     srv,
   338  		FullMethod: "/rpcquery.Query/Status",
   339  	}
   340  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   341  		return srv.(QueryServer).Status(ctx, req.(*StatusParam))
   342  	}
   343  	return interceptor(ctx, in, info, handler)
   344  }
   345  
   346  func _Query_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   347  	in := new(GetAccountParam)
   348  	if err := dec(in); err != nil {
   349  		return nil, err
   350  	}
   351  	if interceptor == nil {
   352  		return srv.(QueryServer).GetAccount(ctx, in)
   353  	}
   354  	info := &grpc.UnaryServerInfo{
   355  		Server:     srv,
   356  		FullMethod: "/rpcquery.Query/GetAccount",
   357  	}
   358  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   359  		return srv.(QueryServer).GetAccount(ctx, req.(*GetAccountParam))
   360  	}
   361  	return interceptor(ctx, in, info, handler)
   362  }
   363  
   364  func _Query_GetMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   365  	in := new(GetMetadataParam)
   366  	if err := dec(in); err != nil {
   367  		return nil, err
   368  	}
   369  	if interceptor == nil {
   370  		return srv.(QueryServer).GetMetadata(ctx, in)
   371  	}
   372  	info := &grpc.UnaryServerInfo{
   373  		Server:     srv,
   374  		FullMethod: "/rpcquery.Query/GetMetadata",
   375  	}
   376  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   377  		return srv.(QueryServer).GetMetadata(ctx, req.(*GetMetadataParam))
   378  	}
   379  	return interceptor(ctx, in, info, handler)
   380  }
   381  
   382  func _Query_GetStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   383  	in := new(GetStorageParam)
   384  	if err := dec(in); err != nil {
   385  		return nil, err
   386  	}
   387  	if interceptor == nil {
   388  		return srv.(QueryServer).GetStorage(ctx, in)
   389  	}
   390  	info := &grpc.UnaryServerInfo{
   391  		Server:     srv,
   392  		FullMethod: "/rpcquery.Query/GetStorage",
   393  	}
   394  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   395  		return srv.(QueryServer).GetStorage(ctx, req.(*GetStorageParam))
   396  	}
   397  	return interceptor(ctx, in, info, handler)
   398  }
   399  
   400  func _Query_ListAccounts_Handler(srv interface{}, stream grpc.ServerStream) error {
   401  	m := new(ListAccountsParam)
   402  	if err := stream.RecvMsg(m); err != nil {
   403  		return err
   404  	}
   405  	return srv.(QueryServer).ListAccounts(m, &queryListAccountsServer{stream})
   406  }
   407  
   408  type Query_ListAccountsServer interface {
   409  	Send(*acm.Account) error
   410  	grpc.ServerStream
   411  }
   412  
   413  type queryListAccountsServer struct {
   414  	grpc.ServerStream
   415  }
   416  
   417  func (x *queryListAccountsServer) Send(m *acm.Account) error {
   418  	return x.ServerStream.SendMsg(m)
   419  }
   420  
   421  func _Query_GetName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   422  	in := new(GetNameParam)
   423  	if err := dec(in); err != nil {
   424  		return nil, err
   425  	}
   426  	if interceptor == nil {
   427  		return srv.(QueryServer).GetName(ctx, in)
   428  	}
   429  	info := &grpc.UnaryServerInfo{
   430  		Server:     srv,
   431  		FullMethod: "/rpcquery.Query/GetName",
   432  	}
   433  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   434  		return srv.(QueryServer).GetName(ctx, req.(*GetNameParam))
   435  	}
   436  	return interceptor(ctx, in, info, handler)
   437  }
   438  
   439  func _Query_ListNames_Handler(srv interface{}, stream grpc.ServerStream) error {
   440  	m := new(ListNamesParam)
   441  	if err := stream.RecvMsg(m); err != nil {
   442  		return err
   443  	}
   444  	return srv.(QueryServer).ListNames(m, &queryListNamesServer{stream})
   445  }
   446  
   447  type Query_ListNamesServer interface {
   448  	Send(*names.Entry) error
   449  	grpc.ServerStream
   450  }
   451  
   452  type queryListNamesServer struct {
   453  	grpc.ServerStream
   454  }
   455  
   456  func (x *queryListNamesServer) Send(m *names.Entry) error {
   457  	return x.ServerStream.SendMsg(m)
   458  }
   459  
   460  func _Query_GetNetworkRegistry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   461  	in := new(GetNetworkRegistryParam)
   462  	if err := dec(in); err != nil {
   463  		return nil, err
   464  	}
   465  	if interceptor == nil {
   466  		return srv.(QueryServer).GetNetworkRegistry(ctx, in)
   467  	}
   468  	info := &grpc.UnaryServerInfo{
   469  		Server:     srv,
   470  		FullMethod: "/rpcquery.Query/GetNetworkRegistry",
   471  	}
   472  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   473  		return srv.(QueryServer).GetNetworkRegistry(ctx, req.(*GetNetworkRegistryParam))
   474  	}
   475  	return interceptor(ctx, in, info, handler)
   476  }
   477  
   478  func _Query_GetValidatorSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   479  	in := new(GetValidatorSetParam)
   480  	if err := dec(in); err != nil {
   481  		return nil, err
   482  	}
   483  	if interceptor == nil {
   484  		return srv.(QueryServer).GetValidatorSet(ctx, in)
   485  	}
   486  	info := &grpc.UnaryServerInfo{
   487  		Server:     srv,
   488  		FullMethod: "/rpcquery.Query/GetValidatorSet",
   489  	}
   490  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   491  		return srv.(QueryServer).GetValidatorSet(ctx, req.(*GetValidatorSetParam))
   492  	}
   493  	return interceptor(ctx, in, info, handler)
   494  }
   495  
   496  func _Query_GetValidatorSetHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   497  	in := new(GetValidatorSetHistoryParam)
   498  	if err := dec(in); err != nil {
   499  		return nil, err
   500  	}
   501  	if interceptor == nil {
   502  		return srv.(QueryServer).GetValidatorSetHistory(ctx, in)
   503  	}
   504  	info := &grpc.UnaryServerInfo{
   505  		Server:     srv,
   506  		FullMethod: "/rpcquery.Query/GetValidatorSetHistory",
   507  	}
   508  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   509  		return srv.(QueryServer).GetValidatorSetHistory(ctx, req.(*GetValidatorSetHistoryParam))
   510  	}
   511  	return interceptor(ctx, in, info, handler)
   512  }
   513  
   514  func _Query_GetProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   515  	in := new(GetProposalParam)
   516  	if err := dec(in); err != nil {
   517  		return nil, err
   518  	}
   519  	if interceptor == nil {
   520  		return srv.(QueryServer).GetProposal(ctx, in)
   521  	}
   522  	info := &grpc.UnaryServerInfo{
   523  		Server:     srv,
   524  		FullMethod: "/rpcquery.Query/GetProposal",
   525  	}
   526  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   527  		return srv.(QueryServer).GetProposal(ctx, req.(*GetProposalParam))
   528  	}
   529  	return interceptor(ctx, in, info, handler)
   530  }
   531  
   532  func _Query_ListProposals_Handler(srv interface{}, stream grpc.ServerStream) error {
   533  	m := new(ListProposalsParam)
   534  	if err := stream.RecvMsg(m); err != nil {
   535  		return err
   536  	}
   537  	return srv.(QueryServer).ListProposals(m, &queryListProposalsServer{stream})
   538  }
   539  
   540  type Query_ListProposalsServer interface {
   541  	Send(*ProposalResult) error
   542  	grpc.ServerStream
   543  }
   544  
   545  type queryListProposalsServer struct {
   546  	grpc.ServerStream
   547  }
   548  
   549  func (x *queryListProposalsServer) Send(m *ProposalResult) error {
   550  	return x.ServerStream.SendMsg(m)
   551  }
   552  
   553  func _Query_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   554  	in := new(GetStatsParam)
   555  	if err := dec(in); err != nil {
   556  		return nil, err
   557  	}
   558  	if interceptor == nil {
   559  		return srv.(QueryServer).GetStats(ctx, in)
   560  	}
   561  	info := &grpc.UnaryServerInfo{
   562  		Server:     srv,
   563  		FullMethod: "/rpcquery.Query/GetStats",
   564  	}
   565  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   566  		return srv.(QueryServer).GetStats(ctx, req.(*GetStatsParam))
   567  	}
   568  	return interceptor(ctx, in, info, handler)
   569  }
   570  
   571  func _Query_GetBlockHeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   572  	in := new(GetBlockParam)
   573  	if err := dec(in); err != nil {
   574  		return nil, err
   575  	}
   576  	if interceptor == nil {
   577  		return srv.(QueryServer).GetBlockHeader(ctx, in)
   578  	}
   579  	info := &grpc.UnaryServerInfo{
   580  		Server:     srv,
   581  		FullMethod: "/rpcquery.Query/GetBlockHeader",
   582  	}
   583  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   584  		return srv.(QueryServer).GetBlockHeader(ctx, req.(*GetBlockParam))
   585  	}
   586  	return interceptor(ctx, in, info, handler)
   587  }
   588  
   589  // Query_ServiceDesc is the grpc.ServiceDesc for Query service.
   590  // It's only intended for direct use with grpc.RegisterService,
   591  // and not to be introspected or modified (even as a copy)
   592  var Query_ServiceDesc = grpc.ServiceDesc{
   593  	ServiceName: "rpcquery.Query",
   594  	HandlerType: (*QueryServer)(nil),
   595  	Methods: []grpc.MethodDesc{
   596  		{
   597  			MethodName: "Status",
   598  			Handler:    _Query_Status_Handler,
   599  		},
   600  		{
   601  			MethodName: "GetAccount",
   602  			Handler:    _Query_GetAccount_Handler,
   603  		},
   604  		{
   605  			MethodName: "GetMetadata",
   606  			Handler:    _Query_GetMetadata_Handler,
   607  		},
   608  		{
   609  			MethodName: "GetStorage",
   610  			Handler:    _Query_GetStorage_Handler,
   611  		},
   612  		{
   613  			MethodName: "GetName",
   614  			Handler:    _Query_GetName_Handler,
   615  		},
   616  		{
   617  			MethodName: "GetNetworkRegistry",
   618  			Handler:    _Query_GetNetworkRegistry_Handler,
   619  		},
   620  		{
   621  			MethodName: "GetValidatorSet",
   622  			Handler:    _Query_GetValidatorSet_Handler,
   623  		},
   624  		{
   625  			MethodName: "GetValidatorSetHistory",
   626  			Handler:    _Query_GetValidatorSetHistory_Handler,
   627  		},
   628  		{
   629  			MethodName: "GetProposal",
   630  			Handler:    _Query_GetProposal_Handler,
   631  		},
   632  		{
   633  			MethodName: "GetStats",
   634  			Handler:    _Query_GetStats_Handler,
   635  		},
   636  		{
   637  			MethodName: "GetBlockHeader",
   638  			Handler:    _Query_GetBlockHeader_Handler,
   639  		},
   640  	},
   641  	Streams: []grpc.StreamDesc{
   642  		{
   643  			StreamName:    "ListAccounts",
   644  			Handler:       _Query_ListAccounts_Handler,
   645  			ServerStreams: true,
   646  		},
   647  		{
   648  			StreamName:    "ListNames",
   649  			Handler:       _Query_ListNames_Handler,
   650  			ServerStreams: true,
   651  		},
   652  		{
   653  			StreamName:    "ListProposals",
   654  			Handler:       _Query_ListProposals_Handler,
   655  			ServerStreams: true,
   656  		},
   657  	},
   658  	Metadata: "rpcquery.proto",
   659  }