Documentation ¶
Overview ¶
Package queryprotov2 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type QueryClient
- type QueryServer
- type SpotPriceRequest
- func (*SpotPriceRequest) Descriptor() ([]byte, []int)
- func (m *SpotPriceRequest) GetBaseAssetDenom() string
- func (m *SpotPriceRequest) GetPoolId() uint64
- func (m *SpotPriceRequest) GetQuoteAssetDenom() string
- func (m *SpotPriceRequest) Marshal() (dAtA []byte, err error)
- func (m *SpotPriceRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *SpotPriceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SpotPriceRequest) ProtoMessage()
- func (m *SpotPriceRequest) Reset()
- func (m *SpotPriceRequest) Size() (n int)
- func (m *SpotPriceRequest) String() string
- func (m *SpotPriceRequest) Unmarshal(dAtA []byte) error
- func (m *SpotPriceRequest) XXX_DiscardUnknown()
- func (m *SpotPriceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SpotPriceRequest) XXX_Merge(src proto.Message)
- func (m *SpotPriceRequest) XXX_Size() int
- func (m *SpotPriceRequest) XXX_Unmarshal(b []byte) error
- type SpotPriceResponse
- func (*SpotPriceResponse) Descriptor() ([]byte, []int)
- func (m *SpotPriceResponse) Marshal() (dAtA []byte, err error)
- func (m *SpotPriceResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *SpotPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SpotPriceResponse) ProtoMessage()
- func (m *SpotPriceResponse) Reset()
- func (m *SpotPriceResponse) Size() (n int)
- func (m *SpotPriceResponse) String() string
- func (m *SpotPriceResponse) Unmarshal(dAtA []byte) error
- func (m *SpotPriceResponse) XXX_DiscardUnknown()
- func (m *SpotPriceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SpotPriceResponse) XXX_Merge(src proto.Message)
- func (m *SpotPriceResponse) XXX_Size() int
- func (m *SpotPriceResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedQueryServer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterQueryHandler ¶
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 QueryClient ¶
type QueryClient interface { // SpotPriceV2 defines a gRPC query handler that returns the spot price given // a base denomination and a quote denomination. // The returned spot price has 36 decimal places. However, some of // modules perform sig fig rounding so most of the rightmost decimals can be // zeroes. SpotPriceV2(ctx context.Context, in *SpotPriceRequest, opts ...grpc.CallOption) (*SpotPriceResponse, 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 { // SpotPriceV2 defines a gRPC query handler that returns the spot price given // a base denomination and a quote denomination. // The returned spot price has 36 decimal places. However, some of // modules perform sig fig rounding so most of the rightmost decimals can be // zeroes. SpotPriceV2(context.Context, *SpotPriceRequest) (*SpotPriceResponse, error) }
QueryServer is the server API for Query service.
type SpotPriceRequest ¶
type SpotPriceRequest struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` BaseAssetDenom string `` /* 129-byte string literal not displayed */ QuoteAssetDenom string `` /* 133-byte string literal not displayed */ }
SpotPriceRequest defines the gRPC request structure for a SpotPrice query.
func (*SpotPriceRequest) Descriptor ¶
func (*SpotPriceRequest) Descriptor() ([]byte, []int)
func (*SpotPriceRequest) GetBaseAssetDenom ¶
func (m *SpotPriceRequest) GetBaseAssetDenom() string
func (*SpotPriceRequest) GetPoolId ¶
func (m *SpotPriceRequest) GetPoolId() uint64
func (*SpotPriceRequest) GetQuoteAssetDenom ¶
func (m *SpotPriceRequest) GetQuoteAssetDenom() string
func (*SpotPriceRequest) Marshal ¶
func (m *SpotPriceRequest) Marshal() (dAtA []byte, err error)
func (*SpotPriceRequest) MarshalToSizedBuffer ¶
func (m *SpotPriceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SpotPriceRequest) ProtoMessage ¶
func (*SpotPriceRequest) ProtoMessage()
func (*SpotPriceRequest) Reset ¶
func (m *SpotPriceRequest) Reset()
func (*SpotPriceRequest) Size ¶
func (m *SpotPriceRequest) Size() (n int)
func (*SpotPriceRequest) String ¶
func (m *SpotPriceRequest) String() string
func (*SpotPriceRequest) Unmarshal ¶
func (m *SpotPriceRequest) Unmarshal(dAtA []byte) error
func (*SpotPriceRequest) XXX_DiscardUnknown ¶
func (m *SpotPriceRequest) XXX_DiscardUnknown()
func (*SpotPriceRequest) XXX_Marshal ¶
func (m *SpotPriceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SpotPriceRequest) XXX_Merge ¶
func (m *SpotPriceRequest) XXX_Merge(src proto.Message)
func (*SpotPriceRequest) XXX_Size ¶
func (m *SpotPriceRequest) XXX_Size() int
func (*SpotPriceRequest) XXX_Unmarshal ¶
func (m *SpotPriceRequest) XXX_Unmarshal(b []byte) error
type SpotPriceResponse ¶
type SpotPriceResponse struct { // String of the BigDec. Ex) 10.203uatom SpotPrice github_com_furya_labs_furya_furymath.BigDec `` /* 155-byte string literal not displayed */ }
SpotPriceResponse defines the gRPC response structure for a SpotPrice query.
func (*SpotPriceResponse) Descriptor ¶
func (*SpotPriceResponse) Descriptor() ([]byte, []int)
func (*SpotPriceResponse) Marshal ¶
func (m *SpotPriceResponse) Marshal() (dAtA []byte, err error)
func (*SpotPriceResponse) MarshalTo ¶
func (m *SpotPriceResponse) MarshalTo(dAtA []byte) (int, error)
func (*SpotPriceResponse) MarshalToSizedBuffer ¶
func (m *SpotPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SpotPriceResponse) ProtoMessage ¶
func (*SpotPriceResponse) ProtoMessage()
func (*SpotPriceResponse) Reset ¶
func (m *SpotPriceResponse) Reset()
func (*SpotPriceResponse) Size ¶
func (m *SpotPriceResponse) Size() (n int)
func (*SpotPriceResponse) String ¶
func (m *SpotPriceResponse) String() string
func (*SpotPriceResponse) Unmarshal ¶
func (m *SpotPriceResponse) Unmarshal(dAtA []byte) error
func (*SpotPriceResponse) XXX_DiscardUnknown ¶
func (m *SpotPriceResponse) XXX_DiscardUnknown()
func (*SpotPriceResponse) XXX_Marshal ¶
func (m *SpotPriceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SpotPriceResponse) XXX_Merge ¶
func (m *SpotPriceResponse) XXX_Merge(src proto.Message)
func (*SpotPriceResponse) XXX_Size ¶
func (m *SpotPriceResponse) XXX_Size() int
func (*SpotPriceResponse) XXX_Unmarshal ¶
func (m *SpotPriceResponse) XXX_Unmarshal(b []byte) error
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) SpotPriceV2 ¶
func (*UnimplementedQueryServer) SpotPriceV2(ctx context.Context, req *SpotPriceRequest) (*SpotPriceResponse, error)