laconicd/api/cerc/registry/v1/query_grpc.pb.go
Prathamesh Musale aed2d6d4c6 Rename RPC method to reserve authority and fix proto lint errors (#17)
- Rename RPC method to reserve authority from `ReserveName` to `ReserveAuthority`
  and `GetBondsModuleBalance` to `GetBondModuleBalance`
- Run lint formatter
- Fix proto lint errors and regenerate proto bindings

Reviewed-on: deep-stack/laconic2d#17
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-03-07 11:25:15 +00:00

424 lines
16 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: cerc/registry/v1/query.proto
package registryv1
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 (
Query_Params_FullMethodName = "/cerc.registry.v1.Query/Params"
Query_Records_FullMethodName = "/cerc.registry.v1.Query/Records"
Query_GetRecord_FullMethodName = "/cerc.registry.v1.Query/GetRecord"
Query_GetRecordsByBondId_FullMethodName = "/cerc.registry.v1.Query/GetRecordsByBondId"
Query_NameRecords_FullMethodName = "/cerc.registry.v1.Query/NameRecords"
Query_Whois_FullMethodName = "/cerc.registry.v1.Query/Whois"
Query_LookupLrn_FullMethodName = "/cerc.registry.v1.Query/LookupLrn"
Query_ResolveLrn_FullMethodName = "/cerc.registry.v1.Query/ResolveLrn"
Query_GetRegistryModuleBalance_FullMethodName = "/cerc.registry.v1.Query/GetRegistryModuleBalance"
)
// 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 {
// Params queries the registry module params.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// Records queries all records
Records(ctx context.Context, in *QueryRecordsRequest, opts ...grpc.CallOption) (*QueryRecordsResponse, error)
// Get record by id
GetRecord(ctx context.Context, in *QueryGetRecordRequest, opts ...grpc.CallOption) (*QueryGetRecordResponse, error)
// Get records by bond id
GetRecordsByBondId(ctx context.Context, in *QueryGetRecordsByBondIdRequest, opts ...grpc.CallOption) (*QueryGetRecordsByBondIdResponse, error)
// NameRecords queries all name records
NameRecords(ctx context.Context, in *QueryNameRecordsRequest, opts ...grpc.CallOption) (*QueryNameRecordsResponse, error)
// Whois method retrieve the name authority info
Whois(ctx context.Context, in *QueryWhoisRequest, opts ...grpc.CallOption) (*QueryWhoisResponse, error)
// LookupLrn
LookupLrn(ctx context.Context, in *QueryLookupLrnRequest, opts ...grpc.CallOption) (*QueryLookupLrnResponse, error)
// ResolveLrn
ResolveLrn(ctx context.Context, in *QueryResolveLrnRequest, opts ...grpc.CallOption) (*QueryResolveLrnResponse, error)
// Get registry module balance
GetRegistryModuleBalance(ctx context.Context, in *QueryGetRegistryModuleBalanceRequest, opts ...grpc.CallOption) (*QueryGetRegistryModuleBalanceResponse, error)
}
type queryClient struct {
cc grpc.ClientConnInterface
}
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
return &queryClient{cc}
}
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
}
func (c *queryClient) Records(ctx context.Context, in *QueryRecordsRequest, opts ...grpc.CallOption) (*QueryRecordsResponse, error) {
out := new(QueryRecordsResponse)
err := c.cc.Invoke(ctx, Query_Records_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) GetRecord(ctx context.Context, in *QueryGetRecordRequest, opts ...grpc.CallOption) (*QueryGetRecordResponse, error) {
out := new(QueryGetRecordResponse)
err := c.cc.Invoke(ctx, Query_GetRecord_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) GetRecordsByBondId(ctx context.Context, in *QueryGetRecordsByBondIdRequest, opts ...grpc.CallOption) (*QueryGetRecordsByBondIdResponse, error) {
out := new(QueryGetRecordsByBondIdResponse)
err := c.cc.Invoke(ctx, Query_GetRecordsByBondId_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) NameRecords(ctx context.Context, in *QueryNameRecordsRequest, opts ...grpc.CallOption) (*QueryNameRecordsResponse, error) {
out := new(QueryNameRecordsResponse)
err := c.cc.Invoke(ctx, Query_NameRecords_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Whois(ctx context.Context, in *QueryWhoisRequest, opts ...grpc.CallOption) (*QueryWhoisResponse, error) {
out := new(QueryWhoisResponse)
err := c.cc.Invoke(ctx, Query_Whois_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) LookupLrn(ctx context.Context, in *QueryLookupLrnRequest, opts ...grpc.CallOption) (*QueryLookupLrnResponse, error) {
out := new(QueryLookupLrnResponse)
err := c.cc.Invoke(ctx, Query_LookupLrn_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) ResolveLrn(ctx context.Context, in *QueryResolveLrnRequest, opts ...grpc.CallOption) (*QueryResolveLrnResponse, error) {
out := new(QueryResolveLrnResponse)
err := c.cc.Invoke(ctx, Query_ResolveLrn_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) GetRegistryModuleBalance(ctx context.Context, in *QueryGetRegistryModuleBalanceRequest, opts ...grpc.CallOption) (*QueryGetRegistryModuleBalanceResponse, error) {
out := new(QueryGetRegistryModuleBalanceResponse)
err := c.cc.Invoke(ctx, Query_GetRegistryModuleBalance_FullMethodName, 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 {
// Params queries the registry module params.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// Records queries all records
Records(context.Context, *QueryRecordsRequest) (*QueryRecordsResponse, error)
// Get record by id
GetRecord(context.Context, *QueryGetRecordRequest) (*QueryGetRecordResponse, error)
// Get records by bond id
GetRecordsByBondId(context.Context, *QueryGetRecordsByBondIdRequest) (*QueryGetRecordsByBondIdResponse, error)
// NameRecords queries all name records
NameRecords(context.Context, *QueryNameRecordsRequest) (*QueryNameRecordsResponse, error)
// Whois method retrieve the name authority info
Whois(context.Context, *QueryWhoisRequest) (*QueryWhoisResponse, error)
// LookupLrn
LookupLrn(context.Context, *QueryLookupLrnRequest) (*QueryLookupLrnResponse, error)
// ResolveLrn
ResolveLrn(context.Context, *QueryResolveLrnRequest) (*QueryResolveLrnResponse, error)
// Get registry module balance
GetRegistryModuleBalance(context.Context, *QueryGetRegistryModuleBalanceRequest) (*QueryGetRegistryModuleBalanceResponse, error)
mustEmbedUnimplementedQueryServer()
}
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
type UnimplementedQueryServer struct {
}
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
}
func (UnimplementedQueryServer) Records(context.Context, *QueryRecordsRequest) (*QueryRecordsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Records not implemented")
}
func (UnimplementedQueryServer) GetRecord(context.Context, *QueryGetRecordRequest) (*QueryGetRecordResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRecord not implemented")
}
func (UnimplementedQueryServer) GetRecordsByBondId(context.Context, *QueryGetRecordsByBondIdRequest) (*QueryGetRecordsByBondIdResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRecordsByBondId not implemented")
}
func (UnimplementedQueryServer) NameRecords(context.Context, *QueryNameRecordsRequest) (*QueryNameRecordsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NameRecords not implemented")
}
func (UnimplementedQueryServer) Whois(context.Context, *QueryWhoisRequest) (*QueryWhoisResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Whois not implemented")
}
func (UnimplementedQueryServer) LookupLrn(context.Context, *QueryLookupLrnRequest) (*QueryLookupLrnResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method LookupLrn not implemented")
}
func (UnimplementedQueryServer) ResolveLrn(context.Context, *QueryResolveLrnRequest) (*QueryResolveLrnResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ResolveLrn not implemented")
}
func (UnimplementedQueryServer) GetRegistryModuleBalance(context.Context, *QueryGetRegistryModuleBalanceRequest) (*QueryGetRegistryModuleBalanceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRegistryModuleBalance not implemented")
}
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)
}
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)
}
func _Query_Records_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryRecordsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Records(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Records_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Records(ctx, req.(*QueryRecordsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_GetRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryGetRecordRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).GetRecord(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_GetRecord_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).GetRecord(ctx, req.(*QueryGetRecordRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_GetRecordsByBondId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryGetRecordsByBondIdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).GetRecordsByBondId(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_GetRecordsByBondId_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).GetRecordsByBondId(ctx, req.(*QueryGetRecordsByBondIdRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_NameRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryNameRecordsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).NameRecords(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_NameRecords_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).NameRecords(ctx, req.(*QueryNameRecordsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Whois_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryWhoisRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Whois(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Whois_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Whois(ctx, req.(*QueryWhoisRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_LookupLrn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryLookupLrnRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).LookupLrn(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_LookupLrn_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).LookupLrn(ctx, req.(*QueryLookupLrnRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_ResolveLrn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryResolveLrnRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).ResolveLrn(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_ResolveLrn_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).ResolveLrn(ctx, req.(*QueryResolveLrnRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_GetRegistryModuleBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryGetRegistryModuleBalanceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).GetRegistryModuleBalance(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_GetRegistryModuleBalance_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).GetRegistryModuleBalance(ctx, req.(*QueryGetRegistryModuleBalanceRequest))
}
return interceptor(ctx, in, info, handler)
}
// 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.registry.v1.Query",
HandlerType: (*QueryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Params",
Handler: _Query_Params_Handler,
},
{
MethodName: "Records",
Handler: _Query_Records_Handler,
},
{
MethodName: "GetRecord",
Handler: _Query_GetRecord_Handler,
},
{
MethodName: "GetRecordsByBondId",
Handler: _Query_GetRecordsByBondId_Handler,
},
{
MethodName: "NameRecords",
Handler: _Query_NameRecords_Handler,
},
{
MethodName: "Whois",
Handler: _Query_Whois_Handler,
},
{
MethodName: "LookupLrn",
Handler: _Query_LookupLrn_Handler,
},
{
MethodName: "ResolveLrn",
Handler: _Query_ResolveLrn_Handler,
},
{
MethodName: "GetRegistryModuleBalance",
Handler: _Query_GetRegistryModuleBalance_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cerc/registry/v1/query.proto",
}