cosmos-sdk/api/cosmos/base/tendermint/v1beta1/query_grpc.pb.go

372 lines
16 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: cosmos/base/tendermint/v1beta1/query.proto
package tendermintv1beta1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Service_GetNodeInfo_FullMethodName = "/cosmos.base.tendermint.v1beta1.Service/GetNodeInfo"
Service_GetSyncing_FullMethodName = "/cosmos.base.tendermint.v1beta1.Service/GetSyncing"
Service_GetLatestBlock_FullMethodName = "/cosmos.base.tendermint.v1beta1.Service/GetLatestBlock"
Service_GetBlockByHeight_FullMethodName = "/cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight"
Service_GetLatestValidatorSet_FullMethodName = "/cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet"
Service_GetValidatorSetByHeight_FullMethodName = "/cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight"
Service_ABCIQuery_FullMethodName = "/cosmos.base.tendermint.v1beta1.Service/ABCIQuery"
)
// ServiceClient is the client API for Service service.
//
// 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.
//
// Service defines the gRPC querier service for tendermint queries.
type ServiceClient interface {
// GetNodeInfo queries the current node info.
GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error)
// GetSyncing queries node syncing.
GetSyncing(ctx context.Context, in *GetSyncingRequest, opts ...grpc.CallOption) (*GetSyncingResponse, error)
// GetLatestBlock returns the latest block.
GetLatestBlock(ctx context.Context, in *GetLatestBlockRequest, opts ...grpc.CallOption) (*GetLatestBlockResponse, error)
// GetBlockByHeight queries block for given height.
GetBlockByHeight(ctx context.Context, in *GetBlockByHeightRequest, opts ...grpc.CallOption) (*GetBlockByHeightResponse, error)
// GetLatestValidatorSet queries latest validator-set.
GetLatestValidatorSet(ctx context.Context, in *GetLatestValidatorSetRequest, opts ...grpc.CallOption) (*GetLatestValidatorSetResponse, error)
// GetValidatorSetByHeight queries validator-set at a given height.
GetValidatorSetByHeight(ctx context.Context, in *GetValidatorSetByHeightRequest, opts ...grpc.CallOption) (*GetValidatorSetByHeightResponse, error)
// ABCIQuery defines a query handler that supports ABCI queries directly to the
// application, bypassing Tendermint completely. The ABCI query must contain
// a valid and supported path, including app, custom, p2p, and store.
ABCIQuery(ctx context.Context, in *ABCIQueryRequest, opts ...grpc.CallOption) (*ABCIQueryResponse, error)
}
type serviceClient struct {
cc grpc.ClientConnInterface
}
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient {
return &serviceClient{cc}
}
func (c *serviceClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetNodeInfoResponse)
err := c.cc.Invoke(ctx, Service_GetNodeInfo_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *serviceClient) GetSyncing(ctx context.Context, in *GetSyncingRequest, opts ...grpc.CallOption) (*GetSyncingResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetSyncingResponse)
err := c.cc.Invoke(ctx, Service_GetSyncing_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *serviceClient) GetLatestBlock(ctx context.Context, in *GetLatestBlockRequest, opts ...grpc.CallOption) (*GetLatestBlockResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetLatestBlockResponse)
err := c.cc.Invoke(ctx, Service_GetLatestBlock_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *serviceClient) GetBlockByHeight(ctx context.Context, in *GetBlockByHeightRequest, opts ...grpc.CallOption) (*GetBlockByHeightResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetBlockByHeightResponse)
err := c.cc.Invoke(ctx, Service_GetBlockByHeight_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *serviceClient) GetLatestValidatorSet(ctx context.Context, in *GetLatestValidatorSetRequest, opts ...grpc.CallOption) (*GetLatestValidatorSetResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetLatestValidatorSetResponse)
err := c.cc.Invoke(ctx, Service_GetLatestValidatorSet_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *serviceClient) GetValidatorSetByHeight(ctx context.Context, in *GetValidatorSetByHeightRequest, opts ...grpc.CallOption) (*GetValidatorSetByHeightResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetValidatorSetByHeightResponse)
err := c.cc.Invoke(ctx, Service_GetValidatorSetByHeight_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *serviceClient) ABCIQuery(ctx context.Context, in *ABCIQueryRequest, opts ...grpc.CallOption) (*ABCIQueryResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ABCIQueryResponse)
err := c.cc.Invoke(ctx, Service_ABCIQuery_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// ServiceServer is the server API for Service service.
// All implementations must embed UnimplementedServiceServer
// for forward compatibility.
//
// Service defines the gRPC querier service for tendermint queries.
type ServiceServer interface {
// GetNodeInfo queries the current node info.
GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error)
// GetSyncing queries node syncing.
GetSyncing(context.Context, *GetSyncingRequest) (*GetSyncingResponse, error)
// GetLatestBlock returns the latest block.
GetLatestBlock(context.Context, *GetLatestBlockRequest) (*GetLatestBlockResponse, error)
// GetBlockByHeight queries block for given height.
GetBlockByHeight(context.Context, *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error)
// GetLatestValidatorSet queries latest validator-set.
GetLatestValidatorSet(context.Context, *GetLatestValidatorSetRequest) (*GetLatestValidatorSetResponse, error)
// GetValidatorSetByHeight queries validator-set at a given height.
GetValidatorSetByHeight(context.Context, *GetValidatorSetByHeightRequest) (*GetValidatorSetByHeightResponse, error)
// ABCIQuery defines a query handler that supports ABCI queries directly to the
// application, bypassing Tendermint completely. The ABCI query must contain
// a valid and supported path, including app, custom, p2p, and store.
ABCIQuery(context.Context, *ABCIQueryRequest) (*ABCIQueryResponse, error)
mustEmbedUnimplementedServiceServer()
}
// UnimplementedServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedServiceServer struct{}
func (UnimplementedServiceServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented")
}
func (UnimplementedServiceServer) GetSyncing(context.Context, *GetSyncingRequest) (*GetSyncingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSyncing not implemented")
}
func (UnimplementedServiceServer) GetLatestBlock(context.Context, *GetLatestBlockRequest) (*GetLatestBlockResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetLatestBlock not implemented")
}
func (UnimplementedServiceServer) GetBlockByHeight(context.Context, *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBlockByHeight not implemented")
}
func (UnimplementedServiceServer) GetLatestValidatorSet(context.Context, *GetLatestValidatorSetRequest) (*GetLatestValidatorSetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetLatestValidatorSet not implemented")
}
func (UnimplementedServiceServer) GetValidatorSetByHeight(context.Context, *GetValidatorSetByHeightRequest) (*GetValidatorSetByHeightResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSetByHeight not implemented")
}
func (UnimplementedServiceServer) ABCIQuery(context.Context, *ABCIQueryRequest) (*ABCIQueryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ABCIQuery not implemented")
}
func (UnimplementedServiceServer) mustEmbedUnimplementedServiceServer() {}
func (UnimplementedServiceServer) testEmbeddedByValue() {}
// UnsafeServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ServiceServer will
// result in compilation errors.
type UnsafeServiceServer interface {
mustEmbedUnimplementedServiceServer()
}
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer) {
// If the following call pancis, it indicates UnimplementedServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Service_ServiceDesc, srv)
}
func _Service_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetNodeInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServiceServer).GetNodeInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Service_GetNodeInfo_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServiceServer).GetNodeInfo(ctx, req.(*GetNodeInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Service_GetSyncing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSyncingRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServiceServer).GetSyncing(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Service_GetSyncing_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServiceServer).GetSyncing(ctx, req.(*GetSyncingRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Service_GetLatestBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetLatestBlockRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServiceServer).GetLatestBlock(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Service_GetLatestBlock_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServiceServer).GetLatestBlock(ctx, req.(*GetLatestBlockRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Service_GetBlockByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetBlockByHeightRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServiceServer).GetBlockByHeight(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Service_GetBlockByHeight_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServiceServer).GetBlockByHeight(ctx, req.(*GetBlockByHeightRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Service_GetLatestValidatorSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetLatestValidatorSetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServiceServer).GetLatestValidatorSet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Service_GetLatestValidatorSet_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServiceServer).GetLatestValidatorSet(ctx, req.(*GetLatestValidatorSetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Service_GetValidatorSetByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetValidatorSetByHeightRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServiceServer).GetValidatorSetByHeight(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Service_GetValidatorSetByHeight_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServiceServer).GetValidatorSetByHeight(ctx, req.(*GetValidatorSetByHeightRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Service_ABCIQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ABCIQueryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServiceServer).ABCIQuery(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Service_ABCIQuery_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServiceServer).ABCIQuery(ctx, req.(*ABCIQueryRequest))
}
return interceptor(ctx, in, info, handler)
}
// Service_ServiceDesc is the grpc.ServiceDesc for Service service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Service_ServiceDesc = grpc.ServiceDesc{
ServiceName: "cosmos.base.tendermint.v1beta1.Service",
HandlerType: (*ServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetNodeInfo",
Handler: _Service_GetNodeInfo_Handler,
},
{
MethodName: "GetSyncing",
Handler: _Service_GetSyncing_Handler,
},
{
MethodName: "GetLatestBlock",
Handler: _Service_GetLatestBlock_Handler,
},
{
MethodName: "GetBlockByHeight",
Handler: _Service_GetBlockByHeight_Handler,
},
{
MethodName: "GetLatestValidatorSet",
Handler: _Service_GetLatestValidatorSet_Handler,
},
{
MethodName: "GetValidatorSetByHeight",
Handler: _Service_GetValidatorSetByHeight_Handler,
},
{
MethodName: "ABCIQuery",
Handler: _Service_ABCIQuery_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cosmos/base/tendermint/v1beta1/query.proto",
}