2024-02-02 09:39:10 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: cerc/bond/v1/query.proto
package bondv1
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.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
const (
2024-03-07 11:25:15 +00:00
Query_Params_FullMethodName = "/cerc.bond.v1.Query/Params"
Query_Bonds_FullMethodName = "/cerc.bond.v1.Query/Bonds"
Query_GetBondById_FullMethodName = "/cerc.bond.v1.Query/GetBondById"
Query_GetBondsByOwner_FullMethodName = "/cerc.bond.v1.Query/GetBondsByOwner"
Query_GetBondModuleBalance_FullMethodName = "/cerc.bond.v1.Query/GetBondModuleBalance"
2024-02-02 09:39:10 +00: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 {
2024-02-08 13:23:20 +00:00
// Params queries bonds module params.
Params ( ctx context . Context , in * QueryParamsRequest , opts ... grpc . CallOption ) ( * QueryParamsResponse , error )
// Bonds queries bonds list
2024-03-07 11:25:15 +00:00
Bonds ( ctx context . Context , in * QueryBondsRequest , opts ... grpc . CallOption ) ( * QueryBondsResponse , error )
2024-02-08 13:23:20 +00:00
// GetBondById
GetBondById ( ctx context . Context , in * QueryGetBondByIdRequest , opts ... grpc . CallOption ) ( * QueryGetBondByIdResponse , error )
// Get Bonds list by Owner
GetBondsByOwner ( ctx context . Context , in * QueryGetBondsByOwnerRequest , opts ... grpc . CallOption ) ( * QueryGetBondsByOwnerResponse , error )
// Get Bond module balance
2024-03-07 11:25:15 +00:00
GetBondModuleBalance ( ctx context . Context , in * QueryGetBondModuleBalanceRequest , opts ... grpc . CallOption ) ( * QueryGetBondModuleBalanceResponse , error )
2024-02-02 09:39:10 +00:00
}
type queryClient struct {
cc grpc . ClientConnInterface
}
func NewQueryClient ( cc grpc . ClientConnInterface ) QueryClient {
return & queryClient { cc }
}
2024-02-08 13:23:20 +00:00
func ( c * queryClient ) Params ( ctx context . Context , in * QueryParamsRequest , opts ... grpc . CallOption ) ( * QueryParamsResponse , error ) {
out := new ( QueryParamsResponse )
err := c . cc . Invoke ( ctx , Query_Params_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2024-03-07 11:25:15 +00:00
func ( c * queryClient ) Bonds ( ctx context . Context , in * QueryBondsRequest , opts ... grpc . CallOption ) ( * QueryBondsResponse , error ) {
out := new ( QueryBondsResponse )
2024-02-02 09:39:10 +00:00
err := c . cc . Invoke ( ctx , Query_Bonds_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2024-02-08 13:23:20 +00:00
func ( c * queryClient ) GetBondById ( ctx context . Context , in * QueryGetBondByIdRequest , opts ... grpc . CallOption ) ( * QueryGetBondByIdResponse , error ) {
out := new ( QueryGetBondByIdResponse )
err := c . cc . Invoke ( ctx , Query_GetBondById_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * queryClient ) GetBondsByOwner ( ctx context . Context , in * QueryGetBondsByOwnerRequest , opts ... grpc . CallOption ) ( * QueryGetBondsByOwnerResponse , error ) {
out := new ( QueryGetBondsByOwnerResponse )
err := c . cc . Invoke ( ctx , Query_GetBondsByOwner_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2024-03-07 11:25:15 +00:00
func ( c * queryClient ) GetBondModuleBalance ( ctx context . Context , in * QueryGetBondModuleBalanceRequest , opts ... grpc . CallOption ) ( * QueryGetBondModuleBalanceResponse , error ) {
2024-02-08 13:23:20 +00:00
out := new ( QueryGetBondModuleBalanceResponse )
2024-03-07 11:25:15 +00:00
err := c . cc . Invoke ( ctx , Query_GetBondModuleBalance_FullMethodName , in , out , opts ... )
2024-02-08 13:23:20 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2024-02-02 09:39:10 +00:00
// QueryServer is the server API for Query service.
// All implementations must embed UnimplementedQueryServer
// for forward compatibility
type QueryServer interface {
2024-02-08 13:23:20 +00:00
// Params queries bonds module params.
Params ( context . Context , * QueryParamsRequest ) ( * QueryParamsResponse , error )
// Bonds queries bonds list
2024-03-07 11:25:15 +00:00
Bonds ( context . Context , * QueryBondsRequest ) ( * QueryBondsResponse , error )
2024-02-08 13:23:20 +00:00
// GetBondById
GetBondById ( context . Context , * QueryGetBondByIdRequest ) ( * QueryGetBondByIdResponse , error )
// Get Bonds list by Owner
GetBondsByOwner ( context . Context , * QueryGetBondsByOwnerRequest ) ( * QueryGetBondsByOwnerResponse , error )
// Get Bond module balance
2024-03-07 11:25:15 +00:00
GetBondModuleBalance ( context . Context , * QueryGetBondModuleBalanceRequest ) ( * QueryGetBondModuleBalanceResponse , error )
2024-02-02 09:39:10 +00:00
mustEmbedUnimplementedQueryServer ( )
}
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
type UnimplementedQueryServer struct {
}
2024-02-08 13:23:20 +00:00
func ( UnimplementedQueryServer ) Params ( context . Context , * QueryParamsRequest ) ( * QueryParamsResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Params not implemented" )
}
2024-03-07 11:25:15 +00:00
func ( UnimplementedQueryServer ) Bonds ( context . Context , * QueryBondsRequest ) ( * QueryBondsResponse , error ) {
2024-02-02 09:39:10 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method Bonds not implemented" )
}
2024-02-08 13:23:20 +00:00
func ( UnimplementedQueryServer ) GetBondById ( context . Context , * QueryGetBondByIdRequest ) ( * QueryGetBondByIdResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetBondById not implemented" )
}
func ( UnimplementedQueryServer ) GetBondsByOwner ( context . Context , * QueryGetBondsByOwnerRequest ) ( * QueryGetBondsByOwnerResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetBondsByOwner not implemented" )
}
2024-03-07 11:25:15 +00:00
func ( UnimplementedQueryServer ) GetBondModuleBalance ( context . Context , * QueryGetBondModuleBalanceRequest ) ( * QueryGetBondModuleBalanceResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetBondModuleBalance not implemented" )
2024-02-08 13:23:20 +00:00
}
2024-02-02 09:39:10 +00:00
func ( UnimplementedQueryServer ) mustEmbedUnimplementedQueryServer ( ) { }
// 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 )
}
2024-02-08 13:23:20 +00:00
func _Query_Params_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( QueryParamsRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( QueryServer ) . Params ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Query_Params_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( QueryServer ) . Params ( ctx , req . ( * QueryParamsRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-02-02 09:39:10 +00:00
func _Query_Bonds_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2024-03-07 11:25:15 +00:00
in := new ( QueryBondsRequest )
2024-02-02 09:39:10 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( QueryServer ) . Bonds ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Query_Bonds_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-03-07 11:25:15 +00:00
return srv . ( QueryServer ) . Bonds ( ctx , req . ( * QueryBondsRequest ) )
2024-02-02 09:39:10 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2024-02-08 13:23:20 +00:00
func _Query_GetBondById_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( QueryGetBondByIdRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( QueryServer ) . GetBondById ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Query_GetBondById_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( QueryServer ) . GetBondById ( ctx , req . ( * QueryGetBondByIdRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Query_GetBondsByOwner_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( QueryGetBondsByOwnerRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( QueryServer ) . GetBondsByOwner ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Query_GetBondsByOwner_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( QueryServer ) . GetBondsByOwner ( ctx , req . ( * QueryGetBondsByOwnerRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-03-07 11:25:15 +00:00
func _Query_GetBondModuleBalance_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2024-02-08 13:23:20 +00:00
in := new ( QueryGetBondModuleBalanceRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2024-03-07 11:25:15 +00:00
return srv . ( QueryServer ) . GetBondModuleBalance ( ctx , in )
2024-02-08 13:23:20 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-03-07 11:25:15 +00:00
FullMethod : Query_GetBondModuleBalance_FullMethodName ,
2024-02-08 13:23:20 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-03-07 11:25:15 +00:00
return srv . ( QueryServer ) . GetBondModuleBalance ( ctx , req . ( * QueryGetBondModuleBalanceRequest ) )
2024-02-08 13:23:20 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2024-02-02 09:39:10 +00: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 {
ServiceName : "cerc.bond.v1.Query" ,
HandlerType : ( * QueryServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
2024-02-08 13:23:20 +00:00
{
MethodName : "Params" ,
Handler : _Query_Params_Handler ,
} ,
2024-02-02 09:39:10 +00:00
{
MethodName : "Bonds" ,
Handler : _Query_Bonds_Handler ,
} ,
2024-02-08 13:23:20 +00:00
{
MethodName : "GetBondById" ,
Handler : _Query_GetBondById_Handler ,
} ,
{
MethodName : "GetBondsByOwner" ,
Handler : _Query_GetBondsByOwner_Handler ,
} ,
{
2024-03-07 11:25:15 +00:00
MethodName : "GetBondModuleBalance" ,
Handler : _Query_GetBondModuleBalance_Handler ,
2024-02-08 13:23:20 +00:00
} ,
2024-02-02 09:39:10 +00:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "cerc/bond/v1/query.proto" ,
}