scaffold locked-funds query

master
michael 2022-09-08 21:52:01 +00:00
parent 04795f8e9e
commit f048bfac01
7 changed files with 604 additions and 44 deletions

View File

@ -4,6 +4,40 @@ info:
name: '' name: ''
description: '' description: ''
paths: paths:
'/colinear/colinearcore/locked_funds/{owner}':
get:
summary: Queries a list of LockedFunds items.
operationId: ColinearColinearcoreLockedFunds
responses:
'200':
description: A successful response.
schema:
type: object
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: owner
in: path
required: true
type: string
tags:
- Query
/colinear/colinearcore/locked_users: /colinear/colinearcore/locked_users:
get: get:
summary: Queries a LockedUsers by index. summary: Queries a LockedUsers by index.
@ -178,6 +212,16 @@ paths:
in: query in: query
required: false required: false
type: boolean type: boolean
- name: pagination.reverse
description: >-
reverse is set to true if results are to be returned in the
descending order.
Since: cosmos-sdk 0.43
in: query
required: false
type: boolean
tags: tags:
- Query - Query
'/colinearcore/colinearcore/auction/{index}': '/colinearcore/colinearcore/auction/{index}':
@ -30930,6 +30974,8 @@ definitions:
auctionId: auctionId:
type: string type: string
format: uint64 format: uint64
colinear.colinearcore.QueryLockedFundsResponse:
type: object
colinear.colinearcore.QueryParamsResponse: colinear.colinearcore.QueryParamsResponse:
type: object type: object
properties: properties:

View File

@ -42,6 +42,11 @@ service Query {
rpc LockedUsers(QueryGetLockedUsersRequest) returns (QueryGetLockedUsersResponse) { rpc LockedUsers(QueryGetLockedUsersRequest) returns (QueryGetLockedUsersResponse) {
option (google.api.http).get = "/colinear/colinearcore/locked_users"; option (google.api.http).get = "/colinear/colinearcore/locked_users";
} }
// Queries a list of LockedFunds items.
rpc LockedFunds(QueryLockedFundsRequest) returns (QueryLockedFundsResponse) {
option (google.api.http).get = "/colinear/colinearcore/locked_funds/{owner}";
}
// this line is used by starport scaffolding # 2 // this line is used by starport scaffolding # 2
} }
@ -90,4 +95,11 @@ message QueryGetLockedUsersRequest {}
message QueryGetLockedUsersResponse { message QueryGetLockedUsersResponse {
LockedUsers LockedUsers = 1 [(gogoproto.nullable) = false]; LockedUsers LockedUsers = 1 [(gogoproto.nullable) = false];
} }
message QueryLockedFundsRequest {
string owner = 1;
}
message QueryLockedFundsResponse {
}
// this line is used by starport scaffolding # 3 // this line is used by starport scaffolding # 3

View File

@ -31,6 +31,8 @@ func GetQueryCmd(queryRoute string) *cobra.Command {
cmd.AddCommand(CmdAuctionBids()) cmd.AddCommand(CmdAuctionBids())
cmd.AddCommand(CmdShowLockedUsers()) cmd.AddCommand(CmdShowLockedUsers())
cmd.AddCommand(CmdLockedFunds())
// this line is used by starport scaffolding # 1 // this line is used by starport scaffolding # 1
return cmd return cmd

View File

@ -0,0 +1,46 @@
package cli
import (
"strconv"
"colinear/x/colinearcore/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/spf13/cobra"
)
var _ = strconv.Itoa(0)
func CmdLockedFunds() *cobra.Command {
cmd := &cobra.Command{
Use: "locked-funds [owner]",
Short: "Query lockedFunds",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {
reqOwner := args[0]
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return err
}
queryClient := types.NewQueryClient(clientCtx)
params := &types.QueryLockedFundsRequest{
Owner: reqOwner,
}
res, err := queryClient.LockedFunds(cmd.Context(), params)
if err != nil {
return err
}
return clientCtx.PrintProto(res)
},
}
flags.AddQueryFlagsToCmd(cmd)
return cmd
}

View File

@ -0,0 +1,23 @@
package keeper
import (
"context"
"colinear/x/colinearcore/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
func (k Keeper) LockedFunds(goCtx context.Context, req *types.QueryLockedFundsRequest) (*types.QueryLockedFundsResponse, error) {
if req == nil {
return nil, status.Error(codes.InvalidArgument, "invalid request")
}
ctx := sdk.UnwrapSDKContext(goCtx)
// TODO: Process the query
_ = ctx
return &types.QueryLockedFundsResponse{}, nil
}

View File

@ -545,6 +545,86 @@ func (m *QueryGetLockedUsersResponse) GetLockedUsers() LockedUsers {
return LockedUsers{} return LockedUsers{}
} }
type QueryLockedFundsRequest struct {
Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
}
func (m *QueryLockedFundsRequest) Reset() { *m = QueryLockedFundsRequest{} }
func (m *QueryLockedFundsRequest) String() string { return proto.CompactTextString(m) }
func (*QueryLockedFundsRequest) ProtoMessage() {}
func (*QueryLockedFundsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_7b40a5389bf6a896, []int{12}
}
func (m *QueryLockedFundsRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryLockedFundsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryLockedFundsRequest.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 *QueryLockedFundsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryLockedFundsRequest.Merge(m, src)
}
func (m *QueryLockedFundsRequest) XXX_Size() int {
return m.Size()
}
func (m *QueryLockedFundsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryLockedFundsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QueryLockedFundsRequest proto.InternalMessageInfo
func (m *QueryLockedFundsRequest) GetOwner() string {
if m != nil {
return m.Owner
}
return ""
}
type QueryLockedFundsResponse struct {
}
func (m *QueryLockedFundsResponse) Reset() { *m = QueryLockedFundsResponse{} }
func (m *QueryLockedFundsResponse) String() string { return proto.CompactTextString(m) }
func (*QueryLockedFundsResponse) ProtoMessage() {}
func (*QueryLockedFundsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_7b40a5389bf6a896, []int{13}
}
func (m *QueryLockedFundsResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryLockedFundsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryLockedFundsResponse.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 *QueryLockedFundsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryLockedFundsResponse.Merge(m, src)
}
func (m *QueryLockedFundsResponse) XXX_Size() int {
return m.Size()
}
func (m *QueryLockedFundsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryLockedFundsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryLockedFundsResponse proto.InternalMessageInfo
func init() { func init() {
proto.RegisterType((*QueryParamsRequest)(nil), "colinear.colinearcore.QueryParamsRequest") proto.RegisterType((*QueryParamsRequest)(nil), "colinear.colinearcore.QueryParamsRequest")
proto.RegisterType((*QueryParamsResponse)(nil), "colinear.colinearcore.QueryParamsResponse") proto.RegisterType((*QueryParamsResponse)(nil), "colinear.colinearcore.QueryParamsResponse")
@ -558,55 +638,60 @@ func init() {
proto.RegisterType((*QueryAuctionBidsResponse)(nil), "colinear.colinearcore.QueryAuctionBidsResponse") proto.RegisterType((*QueryAuctionBidsResponse)(nil), "colinear.colinearcore.QueryAuctionBidsResponse")
proto.RegisterType((*QueryGetLockedUsersRequest)(nil), "colinear.colinearcore.QueryGetLockedUsersRequest") proto.RegisterType((*QueryGetLockedUsersRequest)(nil), "colinear.colinearcore.QueryGetLockedUsersRequest")
proto.RegisterType((*QueryGetLockedUsersResponse)(nil), "colinear.colinearcore.QueryGetLockedUsersResponse") proto.RegisterType((*QueryGetLockedUsersResponse)(nil), "colinear.colinearcore.QueryGetLockedUsersResponse")
proto.RegisterType((*QueryLockedFundsRequest)(nil), "colinear.colinearcore.QueryLockedFundsRequest")
proto.RegisterType((*QueryLockedFundsResponse)(nil), "colinear.colinearcore.QueryLockedFundsResponse")
} }
func init() { proto.RegisterFile("colinearcore/query.proto", fileDescriptor_7b40a5389bf6a896) } func init() { proto.RegisterFile("colinearcore/query.proto", fileDescriptor_7b40a5389bf6a896) }
var fileDescriptor_7b40a5389bf6a896 = []byte{ var fileDescriptor_7b40a5389bf6a896 = []byte{
// 675 bytes of a gzipped FileDescriptorProto // 735 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x95, 0x3d, 0x6f, 0xd3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x96, 0xcf, 0x4f, 0xd4, 0x40,
0x1c, 0xc6, 0x73, 0xa5, 0x2f, 0xe2, 0xba, 0x1d, 0xa5, 0x14, 0xd3, 0xba, 0x70, 0x05, 0x4a, 0x03, 0x14, 0xc7, 0x77, 0x90, 0x1f, 0x3a, 0xdc, 0x46, 0x44, 0xac, 0x50, 0x74, 0x50, 0x91, 0x45, 0x3a,
0xf8, 0x94, 0x30, 0x74, 0x40, 0x42, 0x6a, 0x06, 0x2a, 0x55, 0x08, 0x15, 0x4b, 0x0c, 0xb0, 0x84, 0xd9, 0xe5, 0xc0, 0xc1, 0xc4, 0x04, 0x0e, 0x90, 0x10, 0x63, 0x70, 0x13, 0x0f, 0x7a, 0xc1, 0xd9,
0x4b, 0x7c, 0xb2, 0x2c, 0x5c, 0x9f, 0x6b, 0x3b, 0x28, 0x15, 0x62, 0x61, 0x64, 0x42, 0x62, 0x60, 0xdd, 0x71, 0xd3, 0x58, 0x3a, 0xa5, 0xed, 0xea, 0x12, 0xc2, 0xc5, 0xa3, 0x27, 0x13, 0x0f, 0x5e,
0x61, 0x01, 0x09, 0xf1, 0x41, 0x58, 0x3a, 0x56, 0x62, 0x61, 0x42, 0x28, 0xe1, 0x83, 0xa0, 0x9c, 0xbc, 0xa8, 0x31, 0xfe, 0x2b, 0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 0xb3, 0x76, 0x32, 0x34, 0xbf, 0x00, 0x63, 0x76, 0x4b, 0xad, 0x98, 0x5d, 0x0e, 0xa5, 0x56, 0xcc, 0xd9, 0x18, 0x78, 0x51,
0x6b, 0xbf, 0x87, 0x66, 0xed, 0xe5, 0xda, 0x78, 0xba, 0xaf, 0xcf, 0x27, 0x47, 0x21, 0x8b, 0x3b, 0xf0, 0xde, 0x45, 0x73, 0x7d, 0x44, 0x32, 0xf0, 0x37, 0x1a, 0x7d, 0xeb, 0x33, 0x8a, 0xe9, 0x2e,
0xf3, 0xe2, 0x83, 0xfc, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd1, 0xf1, 0xb6, 0x7a, 0xb4, 0xee, 0x66, 0x76, 0x6f, 0x14, 0x77, 0x33, 0x67, 0x6d, 0xe0, 0x65, 0x41, 0xb7, 0x84, 0x16, 0x8b,
0x08, 0x00, 0x00, 0xe9, 0x5e, 0x25, 0x49, 0x64, 0x5f, 0xac, 0xa1, 0x83, 0xb5, 0x95, 0xc3, 0x63, 0x1b, 0x1c, 0x1d,
0xdb, 0xe0, 0xcf, 0xb1, 0x0d, 0x3e, 0x9c, 0xd8, 0x95, 0xa3, 0x13, 0xbb, 0xf2, 0xeb, 0xc4, 0xae,
0xbc, 0x98, 0xe9, 0x57, 0xe9, 0x99, 0x75, 0xe2, 0xbd, 0x80, 0x45, 0xcd, 0x51, 0xf1, 0x1f, 0x64,
0xf9, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x24, 0x22, 0xec, 0xa7, 0x09, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -633,6 +718,8 @@ type QueryClient interface {
AuctionBids(ctx context.Context, in *QueryAuctionBidsRequest, opts ...grpc.CallOption) (*QueryAuctionBidsResponse, error) AuctionBids(ctx context.Context, in *QueryAuctionBidsRequest, opts ...grpc.CallOption) (*QueryAuctionBidsResponse, error)
// Queries a LockedUsers by index. // Queries a LockedUsers by index.
LockedUsers(ctx context.Context, in *QueryGetLockedUsersRequest, opts ...grpc.CallOption) (*QueryGetLockedUsersResponse, error) LockedUsers(ctx context.Context, in *QueryGetLockedUsersRequest, opts ...grpc.CallOption) (*QueryGetLockedUsersResponse, error)
// Queries a list of LockedFunds items.
LockedFunds(ctx context.Context, in *QueryLockedFundsRequest, opts ...grpc.CallOption) (*QueryLockedFundsResponse, error)
} }
type queryClient struct { type queryClient struct {
@ -697,6 +784,15 @@ func (c *queryClient) LockedUsers(ctx context.Context, in *QueryGetLockedUsersRe
return out, nil return out, nil
} }
func (c *queryClient) LockedFunds(ctx context.Context, in *QueryLockedFundsRequest, opts ...grpc.CallOption) (*QueryLockedFundsResponse, error) {
out := new(QueryLockedFundsResponse)
err := c.cc.Invoke(ctx, "/colinear.colinearcore.Query/LockedFunds", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service. // QueryServer is the server API for Query service.
type QueryServer interface { type QueryServer interface {
// Parameters queries the parameters of the module. // Parameters queries the parameters of the module.
@ -711,6 +807,8 @@ type QueryServer interface {
AuctionBids(context.Context, *QueryAuctionBidsRequest) (*QueryAuctionBidsResponse, error) AuctionBids(context.Context, *QueryAuctionBidsRequest) (*QueryAuctionBidsResponse, error)
// Queries a LockedUsers by index. // Queries a LockedUsers by index.
LockedUsers(context.Context, *QueryGetLockedUsersRequest) (*QueryGetLockedUsersResponse, error) LockedUsers(context.Context, *QueryGetLockedUsersRequest) (*QueryGetLockedUsersResponse, error)
// Queries a list of LockedFunds items.
LockedFunds(context.Context, *QueryLockedFundsRequest) (*QueryLockedFundsResponse, error)
} }
// UnimplementedQueryServer can be embedded to have forward compatible implementations. // UnimplementedQueryServer can be embedded to have forward compatible implementations.
@ -735,6 +833,9 @@ func (*UnimplementedQueryServer) AuctionBids(ctx context.Context, req *QueryAuct
func (*UnimplementedQueryServer) LockedUsers(ctx context.Context, req *QueryGetLockedUsersRequest) (*QueryGetLockedUsersResponse, error) { func (*UnimplementedQueryServer) LockedUsers(ctx context.Context, req *QueryGetLockedUsersRequest) (*QueryGetLockedUsersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method LockedUsers not implemented") return nil, status.Errorf(codes.Unimplemented, "method LockedUsers not implemented")
} }
func (*UnimplementedQueryServer) LockedFunds(ctx context.Context, req *QueryLockedFundsRequest) (*QueryLockedFundsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method LockedFunds not implemented")
}
func RegisterQueryServer(s grpc1.Server, srv QueryServer) { func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
s.RegisterService(&_Query_serviceDesc, srv) s.RegisterService(&_Query_serviceDesc, srv)
@ -848,6 +949,24 @@ func _Query_LockedUsers_Handler(srv interface{}, ctx context.Context, dec func(i
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Query_LockedFunds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryLockedFundsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).LockedFunds(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/colinear.colinearcore.Query/LockedFunds",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).LockedFunds(ctx, req.(*QueryLockedFundsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Query_serviceDesc = grpc.ServiceDesc{ var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "colinear.colinearcore.Query", ServiceName: "colinear.colinearcore.Query",
HandlerType: (*QueryServer)(nil), HandlerType: (*QueryServer)(nil),
@ -876,6 +995,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{
MethodName: "LockedUsers", MethodName: "LockedUsers",
Handler: _Query_LockedUsers_Handler, Handler: _Query_LockedUsers_Handler,
}, },
{
MethodName: "LockedFunds",
Handler: _Query_LockedFunds_Handler,
},
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "colinearcore/query.proto", Metadata: "colinearcore/query.proto",
@ -1263,6 +1386,59 @@ func (m *QueryGetLockedUsersResponse) MarshalToSizedBuffer(dAtA []byte) (int, er
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func (m *QueryLockedFundsRequest) 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 *QueryLockedFundsRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryLockedFundsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Owner) > 0 {
i -= len(m.Owner)
copy(dAtA[i:], m.Owner)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *QueryLockedFundsResponse) 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 *QueryLockedFundsResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryLockedFundsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
offset -= sovQuery(v) offset -= sovQuery(v)
base := offset base := offset
@ -1418,6 +1594,28 @@ func (m *QueryGetLockedUsersResponse) Size() (n int) {
return n return n
} }
func (m *QueryLockedFundsRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Owner)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *QueryLockedFundsResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func sovQuery(x uint64) (n int) { func sovQuery(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7 return (math_bits.Len64(x|1) + 6) / 7
} }
@ -2360,6 +2558,138 @@ func (m *QueryGetLockedUsersResponse) Unmarshal(dAtA []byte) error {
} }
return nil return nil
} }
func (m *QueryLockedFundsRequest) 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: QueryLockedFundsRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryLockedFundsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = 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 *QueryLockedFundsResponse) 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: QueryLockedFundsResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryLockedFundsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
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) { func skipQuery(dAtA []byte) (n int, err error) {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0

View File

@ -231,6 +231,60 @@ func local_request_Query_LockedUsers_0(ctx context.Context, marshaler runtime.Ma
} }
func request_Query_LockedFunds_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryLockedFundsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["owner"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner")
}
protoReq.Owner, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err)
}
msg, err := client.LockedFunds(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Query_LockedFunds_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryLockedFundsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["owner"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner")
}
protoReq.Owner, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err)
}
msg, err := server.LockedFunds(ctx, &protoReq)
return msg, metadata, err
}
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
// UnaryRPC :call QueryServer directly. // UnaryRPC :call QueryServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@ -375,6 +429,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
}) })
mux.Handle("GET", pattern_Query_LockedFunds_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_LockedFunds_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_LockedFunds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil return nil
} }
@ -536,6 +613,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
}) })
mux.Handle("GET", pattern_Query_LockedFunds_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_LockedFunds_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_LockedFunds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil return nil
} }
@ -551,6 +648,8 @@ var (
pattern_Query_AuctionBids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"colinearcore", "auction_bids", "index"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_AuctionBids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"colinearcore", "auction_bids", "index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_LockedUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"colinear", "colinearcore", "locked_users"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_LockedUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"colinear", "colinearcore", "locked_users"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_LockedFunds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"colinear", "colinearcore", "locked_funds", "owner"}, "", runtime.AssumeColonVerbOpt(true)))
) )
var ( var (
@ -565,4 +664,6 @@ var (
forward_Query_AuctionBids_0 = runtime.ForwardResponseMessage forward_Query_AuctionBids_0 = runtime.ForwardResponseMessage
forward_Query_LockedUsers_0 = runtime.ForwardResponseMessage forward_Query_LockedUsers_0 = runtime.ForwardResponseMessage
forward_Query_LockedFunds_0 = runtime.ForwardResponseMessage
) )