2022-01-10 23:36:56 -08:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2022-01-17 02:57:55 -08:00
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc (unknown)
// source: cosmos/upgrade/v1beta1/query.proto
2022-01-10 23:36:56 -08:00
package upgradev1beta1
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.
2022-01-17 02:57:55 -08:00
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
2022-01-10 23:36:56 -08:00
// QueryClient is the client API for Query 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.
type QueryClient interface {
// CurrentPlan queries the current upgrade plan.
CurrentPlan ( ctx context . Context , in * QueryCurrentPlanRequest , opts ... grpc . CallOption ) ( * QueryCurrentPlanResponse , error )
// AppliedPlan queries a previously applied upgrade plan by its name.
AppliedPlan ( ctx context . Context , in * QueryAppliedPlanRequest , opts ... grpc . CallOption ) ( * QueryAppliedPlanResponse , error )
// Deprecated: Do not use.
// UpgradedConsensusState queries the consensus state that will serve
// as a trusted kernel for the next version of this chain. It will only be
// stored at the last height of this chain.
// UpgradedConsensusState RPC not supported with legacy querier
// This rpc is deprecated now that IBC has its own replacement
// (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54)
UpgradedConsensusState ( ctx context . Context , in * QueryUpgradedConsensusStateRequest , opts ... grpc . CallOption ) ( * QueryUpgradedConsensusStateResponse , error )
// ModuleVersions queries the list of module versions from state.
//
// Since: cosmos-sdk 0.43
ModuleVersions ( ctx context . Context , in * QueryModuleVersionsRequest , opts ... grpc . CallOption ) ( * QueryModuleVersionsResponse , error )
}
type queryClient struct {
cc grpc . ClientConnInterface
}
func NewQueryClient ( cc grpc . ClientConnInterface ) QueryClient {
return & queryClient { cc }
}
func ( c * queryClient ) CurrentPlan ( ctx context . Context , in * QueryCurrentPlanRequest , opts ... grpc . CallOption ) ( * QueryCurrentPlanResponse , error ) {
out := new ( QueryCurrentPlanResponse )
err := c . cc . Invoke ( ctx , "/cosmos.upgrade.v1beta1.Query/CurrentPlan" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * queryClient ) AppliedPlan ( ctx context . Context , in * QueryAppliedPlanRequest , opts ... grpc . CallOption ) ( * QueryAppliedPlanResponse , error ) {
out := new ( QueryAppliedPlanResponse )
err := c . cc . Invoke ( ctx , "/cosmos.upgrade.v1beta1.Query/AppliedPlan" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// Deprecated: Do not use.
func ( c * queryClient ) UpgradedConsensusState ( ctx context . Context , in * QueryUpgradedConsensusStateRequest , opts ... grpc . CallOption ) ( * QueryUpgradedConsensusStateResponse , error ) {
out := new ( QueryUpgradedConsensusStateResponse )
err := c . cc . Invoke ( ctx , "/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * queryClient ) ModuleVersions ( ctx context . Context , in * QueryModuleVersionsRequest , opts ... grpc . CallOption ) ( * QueryModuleVersionsResponse , error ) {
out := new ( QueryModuleVersionsResponse )
err := c . cc . Invoke ( ctx , "/cosmos.upgrade.v1beta1.Query/ModuleVersions" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// QueryServer is the server API for Query service.
// All implementations must embed UnimplementedQueryServer
// for forward compatibility
type QueryServer interface {
// CurrentPlan queries the current upgrade plan.
CurrentPlan ( context . Context , * QueryCurrentPlanRequest ) ( * QueryCurrentPlanResponse , error )
// AppliedPlan queries a previously applied upgrade plan by its name.
AppliedPlan ( context . Context , * QueryAppliedPlanRequest ) ( * QueryAppliedPlanResponse , error )
// Deprecated: Do not use.
// UpgradedConsensusState queries the consensus state that will serve
// as a trusted kernel for the next version of this chain. It will only be
// stored at the last height of this chain.
// UpgradedConsensusState RPC not supported with legacy querier
// This rpc is deprecated now that IBC has its own replacement
// (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54)
UpgradedConsensusState ( context . Context , * QueryUpgradedConsensusStateRequest ) ( * QueryUpgradedConsensusStateResponse , error )
// ModuleVersions queries the list of module versions from state.
//
// Since: cosmos-sdk 0.43
ModuleVersions ( context . Context , * QueryModuleVersionsRequest ) ( * QueryModuleVersionsResponse , error )
mustEmbedUnimplementedQueryServer ( )
}
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
type UnimplementedQueryServer struct {
}
2022-01-17 02:57:55 -08:00
func ( UnimplementedQueryServer ) CurrentPlan ( context . Context , * QueryCurrentPlanRequest ) ( * QueryCurrentPlanResponse , error ) {
2022-01-10 23:36:56 -08:00
return nil , status . Errorf ( codes . Unimplemented , "method CurrentPlan not implemented" )
}
2022-01-17 02:57:55 -08:00
func ( UnimplementedQueryServer ) AppliedPlan ( context . Context , * QueryAppliedPlanRequest ) ( * QueryAppliedPlanResponse , error ) {
2022-01-10 23:36:56 -08:00
return nil , status . Errorf ( codes . Unimplemented , "method AppliedPlan not implemented" )
}
2022-01-17 02:57:55 -08:00
func ( UnimplementedQueryServer ) UpgradedConsensusState ( context . Context , * QueryUpgradedConsensusStateRequest ) ( * QueryUpgradedConsensusStateResponse , error ) {
2022-01-10 23:36:56 -08:00
return nil , status . Errorf ( codes . Unimplemented , "method UpgradedConsensusState not implemented" )
}
2022-01-17 02:57:55 -08:00
func ( UnimplementedQueryServer ) ModuleVersions ( context . Context , * QueryModuleVersionsRequest ) ( * QueryModuleVersionsResponse , error ) {
2022-01-10 23:36:56 -08:00
return nil , status . Errorf ( codes . Unimplemented , "method ModuleVersions not implemented" )
}
2022-01-17 02:57:55 -08:00
func ( UnimplementedQueryServer ) mustEmbedUnimplementedQueryServer ( ) { }
2022-01-10 23:36:56 -08:00
2022-01-17 02:57:55 -08:00
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to QueryServer will
// result in compilation errors.
type UnsafeQueryServer interface {
mustEmbedUnimplementedQueryServer ( )
}
func RegisterQueryServer ( s grpc . ServiceRegistrar , srv QueryServer ) {
s . RegisterService ( & Query_ServiceDesc , srv )
2022-01-10 23:36:56 -08:00
}
func _Query_CurrentPlan_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( QueryCurrentPlanRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( QueryServer ) . CurrentPlan ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/cosmos.upgrade.v1beta1.Query/CurrentPlan" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( QueryServer ) . CurrentPlan ( ctx , req . ( * QueryCurrentPlanRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Query_AppliedPlan_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( QueryAppliedPlanRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( QueryServer ) . AppliedPlan ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/cosmos.upgrade.v1beta1.Query/AppliedPlan" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( QueryServer ) . AppliedPlan ( ctx , req . ( * QueryAppliedPlanRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Query_UpgradedConsensusState_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( QueryUpgradedConsensusStateRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( QueryServer ) . UpgradedConsensusState ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( QueryServer ) . UpgradedConsensusState ( ctx , req . ( * QueryUpgradedConsensusStateRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Query_ModuleVersions_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( QueryModuleVersionsRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( QueryServer ) . ModuleVersions ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/cosmos.upgrade.v1beta1.Query/ModuleVersions" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( QueryServer ) . ModuleVersions ( ctx , req . ( * QueryModuleVersionsRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2022-01-17 02:57:55 -08:00
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Query_ServiceDesc = grpc . ServiceDesc {
2022-01-10 23:36:56 -08:00
ServiceName : "cosmos.upgrade.v1beta1.Query" ,
HandlerType : ( * QueryServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "CurrentPlan" ,
Handler : _Query_CurrentPlan_Handler ,
} ,
{
MethodName : "AppliedPlan" ,
Handler : _Query_AppliedPlan_Handler ,
} ,
{
MethodName : "UpgradedConsensusState" ,
Handler : _Query_UpgradedConsensusState_Handler ,
} ,
{
MethodName : "ModuleVersions" ,
Handler : _Query_ModuleVersions_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "cosmos/upgrade/v1beta1/query.proto" ,
}