385 lines
15 KiB
Go
385 lines
15 KiB
Go
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||
|
// versions:
|
||
|
// - protoc-gen-go-grpc v1.3.0
|
||
|
// - protoc (unknown)
|
||
|
// source: cerc/auction/v1/query.proto
|
||
|
|
||
|
package auctionv1
|
||
|
|
||
|
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.auction.v1.Query/Params"
|
||
|
Query_Auctions_FullMethodName = "/cerc.auction.v1.Query/Auctions"
|
||
|
Query_GetAuction_FullMethodName = "/cerc.auction.v1.Query/GetAuction"
|
||
|
Query_GetBid_FullMethodName = "/cerc.auction.v1.Query/GetBid"
|
||
|
Query_GetBids_FullMethodName = "/cerc.auction.v1.Query/GetBids"
|
||
|
Query_AuctionsByBidder_FullMethodName = "/cerc.auction.v1.Query/AuctionsByBidder"
|
||
|
Query_AuctionsByOwner_FullMethodName = "/cerc.auction.v1.Query/AuctionsByOwner"
|
||
|
Query_GetAuctionModuleBalance_FullMethodName = "/cerc.auction.v1.Query/GetAuctionModuleBalance"
|
||
|
)
|
||
|
|
||
|
// 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 auction module params
|
||
|
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||
|
// Auctions queries all auctions
|
||
|
Auctions(ctx context.Context, in *QueryAuctionsRequest, opts ...grpc.CallOption) (*QueryAuctionsResponse, error)
|
||
|
// GetAuction queries an auction
|
||
|
GetAuction(ctx context.Context, in *QueryAuctionRequest, opts ...grpc.CallOption) (*QueryAuctionResponse, error)
|
||
|
// GetBid queries an auction bid
|
||
|
GetBid(ctx context.Context, in *QueryBidRequest, opts ...grpc.CallOption) (*QueryBidResponse, error)
|
||
|
// GetBids queries all auction bids
|
||
|
GetBids(ctx context.Context, in *QueryBidsRequest, opts ...grpc.CallOption) (*QueryBidsResponse, error)
|
||
|
// AuctionsByBidder queries auctions by bidder
|
||
|
AuctionsByBidder(ctx context.Context, in *QueryAuctionsByBidderRequest, opts ...grpc.CallOption) (*QueryAuctionsByBidderResponse, error)
|
||
|
// AuctionsByOwner queries auctions by owner
|
||
|
AuctionsByOwner(ctx context.Context, in *QueryAuctionsByOwnerRequest, opts ...grpc.CallOption) (*QueryAuctionsByOwnerResponse, error)
|
||
|
// GetAuctionModuleBalance queries the auction module account balance
|
||
|
GetAuctionModuleBalance(ctx context.Context, in *QueryGetAuctionModuleBalanceRequest, opts ...grpc.CallOption) (*QueryGetAuctionModuleBalanceResponse, 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) Auctions(ctx context.Context, in *QueryAuctionsRequest, opts ...grpc.CallOption) (*QueryAuctionsResponse, error) {
|
||
|
out := new(QueryAuctionsResponse)
|
||
|
err := c.cc.Invoke(ctx, Query_Auctions_FullMethodName, in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *queryClient) GetAuction(ctx context.Context, in *QueryAuctionRequest, opts ...grpc.CallOption) (*QueryAuctionResponse, error) {
|
||
|
out := new(QueryAuctionResponse)
|
||
|
err := c.cc.Invoke(ctx, Query_GetAuction_FullMethodName, in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *queryClient) GetBid(ctx context.Context, in *QueryBidRequest, opts ...grpc.CallOption) (*QueryBidResponse, error) {
|
||
|
out := new(QueryBidResponse)
|
||
|
err := c.cc.Invoke(ctx, Query_GetBid_FullMethodName, in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *queryClient) GetBids(ctx context.Context, in *QueryBidsRequest, opts ...grpc.CallOption) (*QueryBidsResponse, error) {
|
||
|
out := new(QueryBidsResponse)
|
||
|
err := c.cc.Invoke(ctx, Query_GetBids_FullMethodName, in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *queryClient) AuctionsByBidder(ctx context.Context, in *QueryAuctionsByBidderRequest, opts ...grpc.CallOption) (*QueryAuctionsByBidderResponse, error) {
|
||
|
out := new(QueryAuctionsByBidderResponse)
|
||
|
err := c.cc.Invoke(ctx, Query_AuctionsByBidder_FullMethodName, in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *queryClient) AuctionsByOwner(ctx context.Context, in *QueryAuctionsByOwnerRequest, opts ...grpc.CallOption) (*QueryAuctionsByOwnerResponse, error) {
|
||
|
out := new(QueryAuctionsByOwnerResponse)
|
||
|
err := c.cc.Invoke(ctx, Query_AuctionsByOwner_FullMethodName, in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *queryClient) GetAuctionModuleBalance(ctx context.Context, in *QueryGetAuctionModuleBalanceRequest, opts ...grpc.CallOption) (*QueryGetAuctionModuleBalanceResponse, error) {
|
||
|
out := new(QueryGetAuctionModuleBalanceResponse)
|
||
|
err := c.cc.Invoke(ctx, Query_GetAuctionModuleBalance_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 auction module params
|
||
|
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
|
||
|
// Auctions queries all auctions
|
||
|
Auctions(context.Context, *QueryAuctionsRequest) (*QueryAuctionsResponse, error)
|
||
|
// GetAuction queries an auction
|
||
|
GetAuction(context.Context, *QueryAuctionRequest) (*QueryAuctionResponse, error)
|
||
|
// GetBid queries an auction bid
|
||
|
GetBid(context.Context, *QueryBidRequest) (*QueryBidResponse, error)
|
||
|
// GetBids queries all auction bids
|
||
|
GetBids(context.Context, *QueryBidsRequest) (*QueryBidsResponse, error)
|
||
|
// AuctionsByBidder queries auctions by bidder
|
||
|
AuctionsByBidder(context.Context, *QueryAuctionsByBidderRequest) (*QueryAuctionsByBidderResponse, error)
|
||
|
// AuctionsByOwner queries auctions by owner
|
||
|
AuctionsByOwner(context.Context, *QueryAuctionsByOwnerRequest) (*QueryAuctionsByOwnerResponse, error)
|
||
|
// GetAuctionModuleBalance queries the auction module account balance
|
||
|
GetAuctionModuleBalance(context.Context, *QueryGetAuctionModuleBalanceRequest) (*QueryGetAuctionModuleBalanceResponse, 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) Auctions(context.Context, *QueryAuctionsRequest) (*QueryAuctionsResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method Auctions not implemented")
|
||
|
}
|
||
|
func (UnimplementedQueryServer) GetAuction(context.Context, *QueryAuctionRequest) (*QueryAuctionResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetAuction not implemented")
|
||
|
}
|
||
|
func (UnimplementedQueryServer) GetBid(context.Context, *QueryBidRequest) (*QueryBidResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetBid not implemented")
|
||
|
}
|
||
|
func (UnimplementedQueryServer) GetBids(context.Context, *QueryBidsRequest) (*QueryBidsResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetBids not implemented")
|
||
|
}
|
||
|
func (UnimplementedQueryServer) AuctionsByBidder(context.Context, *QueryAuctionsByBidderRequest) (*QueryAuctionsByBidderResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method AuctionsByBidder not implemented")
|
||
|
}
|
||
|
func (UnimplementedQueryServer) AuctionsByOwner(context.Context, *QueryAuctionsByOwnerRequest) (*QueryAuctionsByOwnerResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method AuctionsByOwner not implemented")
|
||
|
}
|
||
|
func (UnimplementedQueryServer) GetAuctionModuleBalance(context.Context, *QueryGetAuctionModuleBalanceRequest) (*QueryGetAuctionModuleBalanceResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetAuctionModuleBalance 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_Auctions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(QueryAuctionsRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(QueryServer).Auctions(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: Query_Auctions_FullMethodName,
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(QueryServer).Auctions(ctx, req.(*QueryAuctionsRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _Query_GetAuction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(QueryAuctionRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(QueryServer).GetAuction(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: Query_GetAuction_FullMethodName,
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(QueryServer).GetAuction(ctx, req.(*QueryAuctionRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _Query_GetBid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(QueryBidRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(QueryServer).GetBid(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: Query_GetBid_FullMethodName,
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(QueryServer).GetBid(ctx, req.(*QueryBidRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _Query_GetBids_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(QueryBidsRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(QueryServer).GetBids(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: Query_GetBids_FullMethodName,
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(QueryServer).GetBids(ctx, req.(*QueryBidsRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _Query_AuctionsByBidder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(QueryAuctionsByBidderRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(QueryServer).AuctionsByBidder(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: Query_AuctionsByBidder_FullMethodName,
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(QueryServer).AuctionsByBidder(ctx, req.(*QueryAuctionsByBidderRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _Query_AuctionsByOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(QueryAuctionsByOwnerRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(QueryServer).AuctionsByOwner(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: Query_AuctionsByOwner_FullMethodName,
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(QueryServer).AuctionsByOwner(ctx, req.(*QueryAuctionsByOwnerRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _Query_GetAuctionModuleBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(QueryGetAuctionModuleBalanceRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(QueryServer).GetAuctionModuleBalance(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: Query_GetAuctionModuleBalance_FullMethodName,
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(QueryServer).GetAuctionModuleBalance(ctx, req.(*QueryGetAuctionModuleBalanceRequest))
|
||
|
}
|
||
|
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.auction.v1.Query",
|
||
|
HandlerType: (*QueryServer)(nil),
|
||
|
Methods: []grpc.MethodDesc{
|
||
|
{
|
||
|
MethodName: "Params",
|
||
|
Handler: _Query_Params_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "Auctions",
|
||
|
Handler: _Query_Auctions_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "GetAuction",
|
||
|
Handler: _Query_GetAuction_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "GetBid",
|
||
|
Handler: _Query_GetBid_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "GetBids",
|
||
|
Handler: _Query_GetBids_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "AuctionsByBidder",
|
||
|
Handler: _Query_AuctionsByBidder_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "AuctionsByOwner",
|
||
|
Handler: _Query_AuctionsByOwner_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "GetAuctionModuleBalance",
|
||
|
Handler: _Query_GetAuctionModuleBalance_Handler,
|
||
|
},
|
||
|
},
|
||
|
Streams: []grpc.StreamDesc{},
|
||
|
Metadata: "cerc/auction/v1/query.proto",
|
||
|
}
|