queryproto

package
v16.0.0-...-9a9376b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package queryproto is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

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. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type ContractInfoByPoolIdRequest

type ContractInfoByPoolIdRequest struct {
	// pool_id is the pool id of the requested pool.
	PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"`
}

=============================== ContractInfoByPoolId

func (*ContractInfoByPoolIdRequest) Descriptor

func (*ContractInfoByPoolIdRequest) Descriptor() ([]byte, []int)

func (*ContractInfoByPoolIdRequest) GetPoolId

func (m *ContractInfoByPoolIdRequest) GetPoolId() uint64

func (*ContractInfoByPoolIdRequest) Marshal

func (m *ContractInfoByPoolIdRequest) Marshal() (dAtA []byte, err error)

func (*ContractInfoByPoolIdRequest) MarshalTo

func (m *ContractInfoByPoolIdRequest) MarshalTo(dAtA []byte) (int, error)

func (*ContractInfoByPoolIdRequest) MarshalToSizedBuffer

func (m *ContractInfoByPoolIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ContractInfoByPoolIdRequest) ProtoMessage

func (*ContractInfoByPoolIdRequest) ProtoMessage()

func (*ContractInfoByPoolIdRequest) Reset

func (m *ContractInfoByPoolIdRequest) Reset()

func (*ContractInfoByPoolIdRequest) Size

func (m *ContractInfoByPoolIdRequest) Size() (n int)

func (*ContractInfoByPoolIdRequest) String

func (m *ContractInfoByPoolIdRequest) String() string

func (*ContractInfoByPoolIdRequest) Unmarshal

func (m *ContractInfoByPoolIdRequest) Unmarshal(dAtA []byte) error

func (*ContractInfoByPoolIdRequest) XXX_DiscardUnknown

func (m *ContractInfoByPoolIdRequest) XXX_DiscardUnknown()

func (*ContractInfoByPoolIdRequest) XXX_Marshal

func (m *ContractInfoByPoolIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ContractInfoByPoolIdRequest) XXX_Merge

func (m *ContractInfoByPoolIdRequest) XXX_Merge(src proto.Message)

func (*ContractInfoByPoolIdRequest) XXX_Size

func (m *ContractInfoByPoolIdRequest) XXX_Size() int

func (*ContractInfoByPoolIdRequest) XXX_Unmarshal

func (m *ContractInfoByPoolIdRequest) XXX_Unmarshal(b []byte) error

type ContractInfoByPoolIdResponse

type ContractInfoByPoolIdResponse struct {
	// contract_address is the pool address and contract address
	// of the requested pool id.
	ContractAddress string `` /* 130-byte string literal not displayed */
	// code_id is the code id of the requested pool id.
	CodeId uint64 `protobuf:"varint,2,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty" yaml:"code_id"`
}

func (*ContractInfoByPoolIdResponse) Descriptor

func (*ContractInfoByPoolIdResponse) Descriptor() ([]byte, []int)

func (*ContractInfoByPoolIdResponse) GetCodeId

func (m *ContractInfoByPoolIdResponse) GetCodeId() uint64

func (*ContractInfoByPoolIdResponse) GetContractAddress

func (m *ContractInfoByPoolIdResponse) GetContractAddress() string

func (*ContractInfoByPoolIdResponse) Marshal

func (m *ContractInfoByPoolIdResponse) Marshal() (dAtA []byte, err error)

func (*ContractInfoByPoolIdResponse) MarshalTo

func (m *ContractInfoByPoolIdResponse) MarshalTo(dAtA []byte) (int, error)

func (*ContractInfoByPoolIdResponse) MarshalToSizedBuffer

func (m *ContractInfoByPoolIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ContractInfoByPoolIdResponse) ProtoMessage

func (*ContractInfoByPoolIdResponse) ProtoMessage()

func (*ContractInfoByPoolIdResponse) Reset

func (m *ContractInfoByPoolIdResponse) Reset()

func (*ContractInfoByPoolIdResponse) Size

func (m *ContractInfoByPoolIdResponse) Size() (n int)

func (*ContractInfoByPoolIdResponse) String

func (*ContractInfoByPoolIdResponse) Unmarshal

func (m *ContractInfoByPoolIdResponse) Unmarshal(dAtA []byte) error

func (*ContractInfoByPoolIdResponse) XXX_DiscardUnknown

func (m *ContractInfoByPoolIdResponse) XXX_DiscardUnknown()

func (*ContractInfoByPoolIdResponse) XXX_Marshal

func (m *ContractInfoByPoolIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ContractInfoByPoolIdResponse) XXX_Merge

func (m *ContractInfoByPoolIdResponse) XXX_Merge(src proto.Message)

func (*ContractInfoByPoolIdResponse) XXX_Size

func (m *ContractInfoByPoolIdResponse) XXX_Size() int

func (*ContractInfoByPoolIdResponse) XXX_Unmarshal

func (m *ContractInfoByPoolIdResponse) XXX_Unmarshal(b []byte) error

type ParamsRequest

type ParamsRequest struct {
}

=============================== ContractInfoByPoolId

func (*ParamsRequest) Descriptor

func (*ParamsRequest) Descriptor() ([]byte, []int)

func (*ParamsRequest) Marshal

func (m *ParamsRequest) Marshal() (dAtA []byte, err error)

func (*ParamsRequest) MarshalTo

func (m *ParamsRequest) MarshalTo(dAtA []byte) (int, error)

func (*ParamsRequest) MarshalToSizedBuffer

func (m *ParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ParamsRequest) ProtoMessage

func (*ParamsRequest) ProtoMessage()

func (*ParamsRequest) Reset

func (m *ParamsRequest) Reset()

func (*ParamsRequest) Size

func (m *ParamsRequest) Size() (n int)

func (*ParamsRequest) String

func (m *ParamsRequest) String() string

func (*ParamsRequest) Unmarshal

func (m *ParamsRequest) Unmarshal(dAtA []byte) error

func (*ParamsRequest) XXX_DiscardUnknown

func (m *ParamsRequest) XXX_DiscardUnknown()

func (*ParamsRequest) XXX_Marshal

func (m *ParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParamsRequest) XXX_Merge

func (m *ParamsRequest) XXX_Merge(src proto.Message)

func (*ParamsRequest) XXX_Size

func (m *ParamsRequest) XXX_Size() int

func (*ParamsRequest) XXX_Unmarshal

func (m *ParamsRequest) XXX_Unmarshal(b []byte) error

type ParamsResponse

type ParamsResponse struct {
	Params types.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

func (*ParamsResponse) Descriptor

func (*ParamsResponse) Descriptor() ([]byte, []int)

func (*ParamsResponse) GetParams

func (m *ParamsResponse) GetParams() types.Params

func (*ParamsResponse) Marshal

func (m *ParamsResponse) Marshal() (dAtA []byte, err error)

func (*ParamsResponse) MarshalTo

func (m *ParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*ParamsResponse) MarshalToSizedBuffer

func (m *ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ParamsResponse) ProtoMessage

func (*ParamsResponse) ProtoMessage()

func (*ParamsResponse) Reset

func (m *ParamsResponse) Reset()

func (*ParamsResponse) Size

func (m *ParamsResponse) Size() (n int)

func (*ParamsResponse) String

func (m *ParamsResponse) String() string

func (*ParamsResponse) Unmarshal

func (m *ParamsResponse) Unmarshal(dAtA []byte) error

func (*ParamsResponse) XXX_DiscardUnknown

func (m *ParamsResponse) XXX_DiscardUnknown()

func (*ParamsResponse) XXX_Marshal

func (m *ParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParamsResponse) XXX_Merge

func (m *ParamsResponse) XXX_Merge(src proto.Message)

func (*ParamsResponse) XXX_Size

func (m *ParamsResponse) XXX_Size() int

func (*ParamsResponse) XXX_Unmarshal

func (m *ParamsResponse) XXX_Unmarshal(b []byte) error

type PoolsRequest

type PoolsRequest struct {
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

=============================== Pools

func (*PoolsRequest) Descriptor

func (*PoolsRequest) Descriptor() ([]byte, []int)

func (*PoolsRequest) GetPagination

func (m *PoolsRequest) GetPagination() *query.PageRequest

func (*PoolsRequest) Marshal

func (m *PoolsRequest) Marshal() (dAtA []byte, err error)

func (*PoolsRequest) MarshalTo

func (m *PoolsRequest) MarshalTo(dAtA []byte) (int, error)

func (*PoolsRequest) MarshalToSizedBuffer

func (m *PoolsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PoolsRequest) ProtoMessage

func (*PoolsRequest) ProtoMessage()

func (*PoolsRequest) Reset

func (m *PoolsRequest) Reset()

func (*PoolsRequest) Size

func (m *PoolsRequest) Size() (n int)

func (*PoolsRequest) String

func (m *PoolsRequest) String() string

func (*PoolsRequest) Unmarshal

func (m *PoolsRequest) Unmarshal(dAtA []byte) error

func (*PoolsRequest) XXX_DiscardUnknown

func (m *PoolsRequest) XXX_DiscardUnknown()

func (*PoolsRequest) XXX_Marshal

func (m *PoolsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PoolsRequest) XXX_Merge

func (m *PoolsRequest) XXX_Merge(src proto.Message)

func (*PoolsRequest) XXX_Size

func (m *PoolsRequest) XXX_Size() int

func (*PoolsRequest) XXX_Unmarshal

func (m *PoolsRequest) XXX_Unmarshal(b []byte) error

type PoolsResponse

type PoolsResponse struct {
	Pools []*types1.Any `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*PoolsResponse) Descriptor

func (*PoolsResponse) Descriptor() ([]byte, []int)

func (*PoolsResponse) GetPagination

func (m *PoolsResponse) GetPagination() *query.PageResponse

func (*PoolsResponse) GetPools

func (m *PoolsResponse) GetPools() []*types1.Any

func (*PoolsResponse) Marshal

func (m *PoolsResponse) Marshal() (dAtA []byte, err error)

func (*PoolsResponse) MarshalTo

func (m *PoolsResponse) MarshalTo(dAtA []byte) (int, error)

func (*PoolsResponse) MarshalToSizedBuffer

func (m *PoolsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PoolsResponse) ProtoMessage

func (*PoolsResponse) ProtoMessage()

func (*PoolsResponse) Reset

func (m *PoolsResponse) Reset()

func (*PoolsResponse) Size

func (m *PoolsResponse) Size() (n int)

func (*PoolsResponse) String

func (m *PoolsResponse) String() string

func (*PoolsResponse) Unmarshal

func (m *PoolsResponse) Unmarshal(dAtA []byte) error

func (*PoolsResponse) XXX_DiscardUnknown

func (m *PoolsResponse) XXX_DiscardUnknown()

func (*PoolsResponse) XXX_Marshal

func (m *PoolsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PoolsResponse) XXX_Merge

func (m *PoolsResponse) XXX_Merge(src proto.Message)

func (*PoolsResponse) XXX_Size

func (m *PoolsResponse) XXX_Size() int

func (*PoolsResponse) XXX_Unmarshal

func (m *PoolsResponse) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// Pools returns all cosmwasm pools
	Pools(ctx context.Context, in *PoolsRequest, opts ...grpc.CallOption) (*PoolsResponse, error)
	// Params returns the parameters of the x/cosmwasmpool module.
	Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error)
	ContractInfoByPoolId(ctx context.Context, in *ContractInfoByPoolIdRequest, opts ...grpc.CallOption) (*ContractInfoByPoolIdResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryServer

type QueryServer interface {
	// Pools returns all cosmwasm pools
	Pools(context.Context, *PoolsRequest) (*PoolsResponse, error)
	// Params returns the parameters of the x/cosmwasmpool module.
	Params(context.Context, *ParamsRequest) (*ParamsResponse, error)
	ContractInfoByPoolId(context.Context, *ContractInfoByPoolIdRequest) (*ContractInfoByPoolIdResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) ContractInfoByPoolId

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Pools

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL