queryproto

package
v11.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 26 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 GetArithmeticTwapRequest

type GetArithmeticTwapRequest struct {
	PoolId     uint64     `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	BaseAsset  string     `protobuf:"bytes,2,opt,name=base_asset,json=baseAsset,proto3" json:"base_asset,omitempty"`
	QuoteAsset string     `protobuf:"bytes,3,opt,name=quote_asset,json=quoteAsset,proto3" json:"quote_asset,omitempty"`
	StartTime  time.Time  `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"start_time"`
	EndTime    *time.Time `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time,omitempty" yaml:"end_time"`
}

func (*GetArithmeticTwapRequest) Descriptor

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

func (*GetArithmeticTwapRequest) GetBaseAsset

func (m *GetArithmeticTwapRequest) GetBaseAsset() string

func (*GetArithmeticTwapRequest) GetEndTime

func (m *GetArithmeticTwapRequest) GetEndTime() *time.Time

func (*GetArithmeticTwapRequest) GetPoolId

func (m *GetArithmeticTwapRequest) GetPoolId() uint64

func (*GetArithmeticTwapRequest) GetQuoteAsset

func (m *GetArithmeticTwapRequest) GetQuoteAsset() string

func (*GetArithmeticTwapRequest) GetStartTime

func (m *GetArithmeticTwapRequest) GetStartTime() time.Time

func (*GetArithmeticTwapRequest) Marshal

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

func (*GetArithmeticTwapRequest) MarshalTo

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

func (*GetArithmeticTwapRequest) MarshalToSizedBuffer

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

func (*GetArithmeticTwapRequest) ProtoMessage

func (*GetArithmeticTwapRequest) ProtoMessage()

func (*GetArithmeticTwapRequest) Reset

func (m *GetArithmeticTwapRequest) Reset()

func (*GetArithmeticTwapRequest) Size

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

func (*GetArithmeticTwapRequest) String

func (m *GetArithmeticTwapRequest) String() string

func (*GetArithmeticTwapRequest) Unmarshal

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

func (*GetArithmeticTwapRequest) XXX_DiscardUnknown

func (m *GetArithmeticTwapRequest) XXX_DiscardUnknown()

func (*GetArithmeticTwapRequest) XXX_Marshal

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

func (*GetArithmeticTwapRequest) XXX_Merge

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

func (*GetArithmeticTwapRequest) XXX_Size

func (m *GetArithmeticTwapRequest) XXX_Size() int

func (*GetArithmeticTwapRequest) XXX_Unmarshal

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

type GetArithmeticTwapResponse

type GetArithmeticTwapResponse struct {
	ArithmeticTwap github_com_cosmos_cosmos_sdk_types.Dec `` /* 166-byte string literal not displayed */
}

func (*GetArithmeticTwapResponse) Descriptor

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

func (*GetArithmeticTwapResponse) Marshal

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

func (*GetArithmeticTwapResponse) MarshalTo

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

func (*GetArithmeticTwapResponse) MarshalToSizedBuffer

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

func (*GetArithmeticTwapResponse) ProtoMessage

func (*GetArithmeticTwapResponse) ProtoMessage()

func (*GetArithmeticTwapResponse) Reset

func (m *GetArithmeticTwapResponse) Reset()

func (*GetArithmeticTwapResponse) Size

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

func (*GetArithmeticTwapResponse) String

func (m *GetArithmeticTwapResponse) String() string

func (*GetArithmeticTwapResponse) Unmarshal

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

func (*GetArithmeticTwapResponse) XXX_DiscardUnknown

func (m *GetArithmeticTwapResponse) XXX_DiscardUnknown()

func (*GetArithmeticTwapResponse) XXX_Marshal

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

func (*GetArithmeticTwapResponse) XXX_Merge

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

func (*GetArithmeticTwapResponse) XXX_Size

func (m *GetArithmeticTwapResponse) XXX_Size() int

func (*GetArithmeticTwapResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	GetArithmeticTwap(ctx context.Context, in *GetArithmeticTwapRequest, opts ...grpc.CallOption) (*GetArithmeticTwapResponse, 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 {
	GetArithmeticTwap(context.Context, *GetArithmeticTwapRequest) (*GetArithmeticTwapResponse, 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) GetArithmeticTwap

Jump to

Keyboard shortcuts

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