v2types

package
v20.0.0-...-e580147 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package v2types 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 QueryClient

type QueryClient interface {
	// Deprecated: please use alternate in x/poolmanager
	SpotPrice(ctx context.Context, in *QuerySpotPriceRequest, opts ...grpc.CallOption) (*QuerySpotPriceResponse, 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 {
	// Deprecated: please use alternate in x/poolmanager
	SpotPrice(context.Context, *QuerySpotPriceRequest) (*QuerySpotPriceResponse, error)
}

QueryServer is the server API for Query service.

type QuerySpotPriceRequest deprecated

type QuerySpotPriceRequest 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 */
}

Deprecated: please use alternate in x/poolmanager

Deprecated: Do not use.

func (*QuerySpotPriceRequest) Descriptor

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

func (*QuerySpotPriceRequest) GetBaseAssetDenom

func (m *QuerySpotPriceRequest) GetBaseAssetDenom() string

func (*QuerySpotPriceRequest) GetPoolId

func (m *QuerySpotPriceRequest) GetPoolId() uint64

func (*QuerySpotPriceRequest) GetQuoteAssetDenom

func (m *QuerySpotPriceRequest) GetQuoteAssetDenom() string

func (*QuerySpotPriceRequest) Marshal

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

func (*QuerySpotPriceRequest) MarshalTo

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

func (*QuerySpotPriceRequest) MarshalToSizedBuffer

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

func (*QuerySpotPriceRequest) ProtoMessage

func (*QuerySpotPriceRequest) ProtoMessage()

func (*QuerySpotPriceRequest) Reset

func (m *QuerySpotPriceRequest) Reset()

func (*QuerySpotPriceRequest) Size

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

func (*QuerySpotPriceRequest) String

func (m *QuerySpotPriceRequest) String() string

func (*QuerySpotPriceRequest) Unmarshal

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

func (*QuerySpotPriceRequest) XXX_DiscardUnknown

func (m *QuerySpotPriceRequest) XXX_DiscardUnknown()

func (*QuerySpotPriceRequest) XXX_Marshal

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

func (*QuerySpotPriceRequest) XXX_Merge

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

func (*QuerySpotPriceRequest) XXX_Size

func (m *QuerySpotPriceRequest) XXX_Size() int

func (*QuerySpotPriceRequest) XXX_Unmarshal

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

type QuerySpotPriceResponse deprecated

type QuerySpotPriceResponse struct {
	// String of the Dec. Ex) 10.203uatom
	SpotPrice string `protobuf:"bytes,1,opt,name=spot_price,json=spotPrice,proto3" json:"spot_price,omitempty" yaml:"spot_price"`
}

Depreacted: please use alternate in x/poolmanager

Deprecated: Do not use.

func (*QuerySpotPriceResponse) Descriptor

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

func (*QuerySpotPriceResponse) GetSpotPrice

func (m *QuerySpotPriceResponse) GetSpotPrice() string

func (*QuerySpotPriceResponse) Marshal

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

func (*QuerySpotPriceResponse) MarshalTo

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

func (*QuerySpotPriceResponse) MarshalToSizedBuffer

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

func (*QuerySpotPriceResponse) ProtoMessage

func (*QuerySpotPriceResponse) ProtoMessage()

func (*QuerySpotPriceResponse) Reset

func (m *QuerySpotPriceResponse) Reset()

func (*QuerySpotPriceResponse) Size

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

func (*QuerySpotPriceResponse) String

func (m *QuerySpotPriceResponse) String() string

func (*QuerySpotPriceResponse) Unmarshal

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

func (*QuerySpotPriceResponse) XXX_DiscardUnknown

func (m *QuerySpotPriceResponse) XXX_DiscardUnknown()

func (*QuerySpotPriceResponse) XXX_Marshal

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

func (*QuerySpotPriceResponse) XXX_Merge

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

func (*QuerySpotPriceResponse) XXX_Size

func (m *QuerySpotPriceResponse) XXX_Size() int

func (*QuerySpotPriceResponse) XXX_Unmarshal

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

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) SpotPrice

Jump to

Keyboard shortcuts

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