diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 7898df2..3e96419 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -20305,6 +20305,43 @@ paths: type: string tags: - Query + '/cosmos-test/cosmostest/auction_bids/{index}': + get: + summary: Queries a list of AuctionBids items. + operationId: CosmostestCosmostestAuctionBids + responses: + '200': + description: A successful response. + schema: + type: object + properties: + bids: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: index + in: path + required: true + type: string + tags: + - Query /cosmos-test/cosmostest/next_auction: get: summary: Queries a NextAuction by index. @@ -47482,6 +47519,11 @@ definitions: repeated Bar results = 1; PageResponse page = 2; } + cosmostest.cosmostest.QueryAuctionBidsResponse: + type: object + properties: + bids: + type: string cosmostest.cosmostest.QueryGetAuctionResponse: type: object properties: diff --git a/go.mod b/go.mod index 716b5ec..95dbda5 100644 --- a/go.mod +++ b/go.mod @@ -86,7 +86,6 @@ require ( github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect diff --git a/go.sum b/go.sum index ad897ba..07b1083 100644 --- a/go.sum +++ b/go.sum @@ -734,8 +734,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjdKDqyr/2L+f6U12Fk= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= diff --git a/proto/cosmostest/query.proto b/proto/cosmostest/query.proto index 9231298..82015e1 100644 --- a/proto/cosmostest/query.proto +++ b/proto/cosmostest/query.proto @@ -31,6 +31,11 @@ service Query { option (google.api.http).get = "/cosmos-test/cosmostest/auction"; } +// Queries a list of AuctionBids items. + rpc AuctionBids(QueryAuctionBidsRequest) returns (QueryAuctionBidsResponse) { + option (google.api.http).get = "/cosmos-test/cosmostest/auction_bids/{index}"; + } + // this line is used by starport scaffolding # 2 } @@ -66,4 +71,12 @@ message QueryAllAuctionResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } +message QueryAuctionBidsRequest { + string index = 1; +} + +message QueryAuctionBidsResponse { + string bids = 1; +} + // this line is used by starport scaffolding # 3 diff --git a/x/cosmostest/client/cli/query.go b/x/cosmostest/client/cli/query.go index 4222d68..a29b8b6 100644 --- a/x/cosmostest/client/cli/query.go +++ b/x/cosmostest/client/cli/query.go @@ -28,6 +28,8 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdShowNextAuction()) cmd.AddCommand(CmdListAuction()) cmd.AddCommand(CmdShowAuction()) + cmd.AddCommand(CmdAuctionBids()) + // this line is used by starport scaffolding # 1 return cmd diff --git a/x/cosmostest/client/cli/query_auction_bids.go b/x/cosmostest/client/cli/query_auction_bids.go new file mode 100644 index 0000000..fc10ddd --- /dev/null +++ b/x/cosmostest/client/cli/query_auction_bids.go @@ -0,0 +1,46 @@ +package cli + +import ( + "strconv" + + "cosmos-test/x/cosmostest/types" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" +) + +var _ = strconv.Itoa(0) + +func CmdAuctionBids() *cobra.Command { + cmd := &cobra.Command{ + Use: "auction-bids [index]", + Short: "Query auctionBids", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + reqIndex := args[0] + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryAuctionBidsRequest{ + + Index: reqIndex, + } + + res, err := queryClient.AuctionBids(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/cosmostest/keeper/grpc_query_auction_bids.go b/x/cosmostest/keeper/grpc_query_auction_bids.go new file mode 100644 index 0000000..37138e9 --- /dev/null +++ b/x/cosmostest/keeper/grpc_query_auction_bids.go @@ -0,0 +1,23 @@ +package keeper + +import ( + "context" + + "cosmos-test/x/cosmostest/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) AuctionBids(goCtx context.Context, req *types.QueryAuctionBidsRequest) (*types.QueryAuctionBidsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + // TODO: Process the query + _ = ctx + + return &types.QueryAuctionBidsResponse{}, nil +} diff --git a/x/cosmostest/types/query.pb.go b/x/cosmostest/types/query.pb.go index 1de0452..98bc8e9 100644 --- a/x/cosmostest/types/query.pb.go +++ b/x/cosmostest/types/query.pb.go @@ -377,6 +377,94 @@ func (m *QueryAllAuctionResponse) GetPagination() *query.PageResponse { return nil } +type QueryAuctionBidsRequest struct { + Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` +} + +func (m *QueryAuctionBidsRequest) Reset() { *m = QueryAuctionBidsRequest{} } +func (m *QueryAuctionBidsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAuctionBidsRequest) ProtoMessage() {} +func (*QueryAuctionBidsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_540d26b2788a5d10, []int{8} +} +func (m *QueryAuctionBidsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAuctionBidsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAuctionBidsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAuctionBidsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAuctionBidsRequest.Merge(m, src) +} +func (m *QueryAuctionBidsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAuctionBidsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAuctionBidsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAuctionBidsRequest proto.InternalMessageInfo + +func (m *QueryAuctionBidsRequest) GetIndex() string { + if m != nil { + return m.Index + } + return "" +} + +type QueryAuctionBidsResponse struct { + Bids string `protobuf:"bytes,1,opt,name=bids,proto3" json:"bids,omitempty"` +} + +func (m *QueryAuctionBidsResponse) Reset() { *m = QueryAuctionBidsResponse{} } +func (m *QueryAuctionBidsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAuctionBidsResponse) ProtoMessage() {} +func (*QueryAuctionBidsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_540d26b2788a5d10, []int{9} +} +func (m *QueryAuctionBidsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAuctionBidsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAuctionBidsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAuctionBidsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAuctionBidsResponse.Merge(m, src) +} +func (m *QueryAuctionBidsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAuctionBidsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAuctionBidsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAuctionBidsResponse proto.InternalMessageInfo + +func (m *QueryAuctionBidsResponse) GetBids() string { + if m != nil { + return m.Bids + } + return "" +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "cosmostest.cosmostest.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "cosmostest.cosmostest.QueryParamsResponse") @@ -386,46 +474,52 @@ func init() { proto.RegisterType((*QueryGetAuctionResponse)(nil), "cosmostest.cosmostest.QueryGetAuctionResponse") proto.RegisterType((*QueryAllAuctionRequest)(nil), "cosmostest.cosmostest.QueryAllAuctionRequest") proto.RegisterType((*QueryAllAuctionResponse)(nil), "cosmostest.cosmostest.QueryAllAuctionResponse") + proto.RegisterType((*QueryAuctionBidsRequest)(nil), "cosmostest.cosmostest.QueryAuctionBidsRequest") + proto.RegisterType((*QueryAuctionBidsResponse)(nil), "cosmostest.cosmostest.QueryAuctionBidsResponse") } func init() { proto.RegisterFile("cosmostest/query.proto", fileDescriptor_540d26b2788a5d10) } var fileDescriptor_540d26b2788a5d10 = []byte{ - // 536 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x3f, 0x6f, 0x13, 0x31, - 0x18, 0xc6, 0xe3, 0xd2, 0x3f, 0xe2, 0xed, 0x66, 0x42, 0x5b, 0x1d, 0xed, 0xb5, 0x58, 0x28, 0xa1, - 0x15, 0x3d, 0x2b, 0x61, 0x41, 0x42, 0x42, 0x4a, 0x07, 0x2a, 0x31, 0xa0, 0x72, 0x1b, 0x2c, 0xe0, - 0x14, 0xeb, 0x74, 0xd2, 0xf5, 0x7c, 0x8d, 0x1d, 0x94, 0x0a, 0xb1, 0xb0, 0xb0, 0x22, 0xc1, 0xc2, - 0xda, 0x4f, 0xd3, 0xb1, 0x12, 0x0b, 0x13, 0x42, 0x09, 0x0b, 0xdf, 0x02, 0xc5, 0xf6, 0x29, 0xbe, - 0x5e, 0x2e, 0x69, 0x37, 0xc7, 0xef, 0xf3, 0xbc, 0xcf, 0x4f, 0xc9, 0xe3, 0xc0, 0xda, 0xb1, 0x90, - 0x27, 0x42, 0x2a, 0x2e, 0x15, 0x3d, 0xed, 0xf3, 0xde, 0x59, 0x90, 0xf5, 0x84, 0x12, 0xf8, 0xee, - 0xe4, 0x3e, 0x98, 0x1c, 0xbd, 0x7a, 0x24, 0x22, 0xa1, 0x15, 0x74, 0x7c, 0x32, 0x62, 0x6f, 0x33, - 0x12, 0x22, 0x4a, 0x38, 0x65, 0x59, 0x4c, 0x59, 0x9a, 0x0a, 0xc5, 0x54, 0x2c, 0x52, 0x69, 0xa7, - 0x7b, 0xc6, 0x4f, 0xbb, 0x4c, 0x72, 0x93, 0x41, 0x3f, 0xb4, 0xba, 0x5c, 0xb1, 0x16, 0xcd, 0x58, - 0x14, 0xa7, 0x5a, 0x6c, 0xb5, 0xeb, 0x0e, 0x4e, 0xc6, 0x7a, 0xec, 0x24, 0x5f, 0xb2, 0xe5, 0x0c, - 0x52, 0x3e, 0x50, 0x6f, 0x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42, 0xb6, 0xff, 0x2d, 0xc2, - 0x92, 0x86, 0xc4, 0x5f, 0x10, 0x2c, 0x9b, 0xf6, 0xe0, 0xdd, 0x0a, 0x98, 0x72, 0x5d, 0xbd, 0xbd, - 0xeb, 0x48, 0x4d, 0x2e, 0x69, 0x7c, 0xfe, 0xf9, 0xf7, 0xdb, 0xc2, 0x0e, 0xf6, 0xa9, 0x11, 0xee, - 0xeb, 0x47, 0x51, 0x7a, 0x57, 0xf8, 0x1c, 0x15, 0x2a, 0x87, 0x5b, 0xb3, 0x32, 0xa6, 0x76, 0xda, - 0x6b, 0xdf, 0xc4, 0x62, 0xf1, 0x1e, 0x69, 0xbc, 0x06, 0x7e, 0x50, 0x85, 0xe7, 0xbe, 0x6e, 0xfc, - 0x03, 0xc1, 0x4a, 0x0e, 0xb8, 0x3f, 0x27, 0xed, 0x0a, 0x5c, 0x70, 0x5d, 0xb9, 0x05, 0xa3, 0x1a, - 0x6c, 0x17, 0x37, 0xab, 0xc0, 0x2c, 0x13, 0xfd, 0xa8, 0x5f, 0xcd, 0x27, 0xfc, 0x1d, 0x01, 0xd8, - 0x25, 0x9d, 0x24, 0x99, 0x8d, 0x57, 0xea, 0xff, 0x6c, 0xbc, 0x72, 0x97, 0x49, 0x53, 0xe3, 0xdd, - 0xc7, 0xdb, 0x73, 0xf0, 0x0e, 0x9e, 0x5c, 0x0c, 0x7d, 0x74, 0x39, 0xf4, 0xd1, 0x9f, 0xa1, 0x8f, - 0xbe, 0x8e, 0xfc, 0xda, 0xe5, 0xc8, 0xaf, 0xfd, 0x1a, 0xf9, 0xb5, 0x37, 0xbe, 0xeb, 0x1c, 0xb8, - 0x5e, 0x75, 0x96, 0x71, 0xd9, 0x5d, 0xd6, 0xff, 0x98, 0x8f, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, - 0xf7, 0x94, 0x2a, 0x39, 0x14, 0x06, 0x00, 0x00, + // 593 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00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 0xcf, 0xc0, 0x47, 0x97, 0x43, 0xbf, 0x70, 0x33, 0xf4, 0x0b, + 0xbf, 0x86, 0x7e, 0xe1, 0x9d, 0xef, 0xb6, 0xe9, 0xbb, 0x8d, 0xf4, 0x45, 0x22, 0x54, 0xab, 0x68, + 0x7e, 0x39, 0x9e, 0xfc, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x95, 0x2a, 0x26, 0x1c, 0x07, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -448,6 +542,8 @@ type QueryClient interface { Auction(ctx context.Context, in *QueryGetAuctionRequest, opts ...grpc.CallOption) (*QueryGetAuctionResponse, error) // Queries a list of Auction items. AuctionAll(ctx context.Context, in *QueryAllAuctionRequest, opts ...grpc.CallOption) (*QueryAllAuctionResponse, error) + // Queries a list of AuctionBids items. + AuctionBids(ctx context.Context, in *QueryAuctionBidsRequest, opts ...grpc.CallOption) (*QueryAuctionBidsResponse, error) } type queryClient struct { @@ -494,6 +590,15 @@ func (c *queryClient) AuctionAll(ctx context.Context, in *QueryAllAuctionRequest return out, nil } +func (c *queryClient) AuctionBids(ctx context.Context, in *QueryAuctionBidsRequest, opts ...grpc.CallOption) (*QueryAuctionBidsResponse, error) { + out := new(QueryAuctionBidsResponse) + err := c.cc.Invoke(ctx, "/cosmostest.cosmostest.Query/AuctionBids", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -504,6 +609,8 @@ type QueryServer interface { Auction(context.Context, *QueryGetAuctionRequest) (*QueryGetAuctionResponse, error) // Queries a list of Auction items. AuctionAll(context.Context, *QueryAllAuctionRequest) (*QueryAllAuctionResponse, error) + // Queries a list of AuctionBids items. + AuctionBids(context.Context, *QueryAuctionBidsRequest) (*QueryAuctionBidsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -522,6 +629,9 @@ func (*UnimplementedQueryServer) Auction(ctx context.Context, req *QueryGetAucti func (*UnimplementedQueryServer) AuctionAll(ctx context.Context, req *QueryAllAuctionRequest) (*QueryAllAuctionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AuctionAll not implemented") } +func (*UnimplementedQueryServer) AuctionBids(ctx context.Context, req *QueryAuctionBidsRequest) (*QueryAuctionBidsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AuctionBids not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -599,6 +709,24 @@ func _Query_AuctionAll_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Query_AuctionBids_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAuctionBidsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AuctionBids(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmostest.cosmostest.Query/AuctionBids", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AuctionBids(ctx, req.(*QueryAuctionBidsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmostest.cosmostest.Query", HandlerType: (*QueryServer)(nil), @@ -619,6 +747,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "AuctionAll", Handler: _Query_AuctionAll_Handler, }, + { + MethodName: "AuctionBids", + Handler: _Query_AuctionBids_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmostest/query.proto", @@ -883,6 +1015,66 @@ func (m *QueryAllAuctionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *QueryAuctionBidsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAuctionBidsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAuctionBidsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAuctionBidsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAuctionBidsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAuctionBidsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Bids) > 0 { + i -= len(m.Bids) + copy(dAtA[i:], m.Bids) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Bids))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -990,6 +1182,32 @@ func (m *QueryAllAuctionResponse) Size() (n int) { return n } +func (m *QueryAuctionBidsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Index) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAuctionBidsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Bids) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1633,6 +1851,170 @@ func (m *QueryAllAuctionResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryAuctionBidsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAuctionBidsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAuctionBidsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Index = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAuctionBidsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAuctionBidsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAuctionBidsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bids = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/cosmostest/types/query.pb.gw.go b/x/cosmostest/types/query.pb.gw.go index 4902bba..511d6b6 100644 --- a/x/cosmostest/types/query.pb.gw.go +++ b/x/cosmostest/types/query.pb.gw.go @@ -159,6 +159,60 @@ func local_request_Query_AuctionAll_0(ctx context.Context, marshaler runtime.Mar } +func request_Query_AuctionBids_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAuctionBidsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["index"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "index") + } + + protoReq.Index, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "index", err) + } + + msg, err := client.AuctionBids(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AuctionBids_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAuctionBidsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["index"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "index") + } + + protoReq.Index, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "index", err) + } + + msg, err := server.AuctionBids(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -257,6 +311,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_AuctionBids_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AuctionBids_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AuctionBids_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -378,6 +455,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_AuctionBids_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AuctionBids_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AuctionBids_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -389,6 +486,8 @@ var ( pattern_Query_Auction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"cosmos-test", "cosmostest", "auction", "index"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_AuctionAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"cosmos-test", "cosmostest", "auction"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_AuctionBids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"cosmos-test", "cosmostest", "auction_bids", "index"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -399,4 +498,6 @@ var ( forward_Query_Auction_0 = runtime.ForwardResponseMessage forward_Query_AuctionAll_0 = runtime.ForwardResponseMessage + + forward_Query_AuctionBids_0 = runtime.ForwardResponseMessage )