Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func KeyPrefix(p string) []byte
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error
- func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryServiceClient) error
- func RegisterQueryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServiceServer) error
- func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer)
- type DataPoint
- func (*DataPoint) Descriptor() ([]byte, []int)
- func (m *DataPoint) GetId() string
- func (m *DataPoint) GetValue() []byte
- func (m *DataPoint) Marshal() (dAtA []byte, err error)
- func (m *DataPoint) MarshalTo(dAtA []byte) (int, error)
- func (m *DataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DataPoint) ProtoMessage()
- func (m *DataPoint) Reset()
- func (m *DataPoint) Size() (n int)
- func (m *DataPoint) String() string
- func (m *DataPoint) Unmarshal(dAtA []byte) error
- func (m *DataPoint) XXX_DiscardUnknown()
- func (m *DataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DataPoint) XXX_Merge(src proto.Message)
- func (m *DataPoint) XXX_Size() int
- func (m *DataPoint) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetQueries() []Query
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgServer
- type MsgSubmitQueryResponse
- func (*MsgSubmitQueryResponse) Descriptor() ([]byte, []int)
- func (msg MsgSubmitQueryResponse) GetSignBytes() []byte
- func (msg MsgSubmitQueryResponse) GetSigners() []sdk.AccAddress
- func (m *MsgSubmitQueryResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSubmitQueryResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSubmitQueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSubmitQueryResponse) ProtoMessage()
- func (m *MsgSubmitQueryResponse) Reset()
- func (msg MsgSubmitQueryResponse) Route() string
- func (m *MsgSubmitQueryResponse) Size() (n int)
- func (m *MsgSubmitQueryResponse) String() string
- func (msg MsgSubmitQueryResponse) Type() string
- func (m *MsgSubmitQueryResponse) Unmarshal(dAtA []byte) error
- func (msg MsgSubmitQueryResponse) ValidateBasic() error
- func (m *MsgSubmitQueryResponse) XXX_DiscardUnknown()
- func (m *MsgSubmitQueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSubmitQueryResponse) XXX_Merge(src proto.Message)
- func (m *MsgSubmitQueryResponse) XXX_Size() int
- func (m *MsgSubmitQueryResponse) XXX_Unmarshal(b []byte) error
- type MsgSubmitQueryResponseResponse
- func (*MsgSubmitQueryResponseResponse) Descriptor() ([]byte, []int)
- func (m *MsgSubmitQueryResponseResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSubmitQueryResponseResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSubmitQueryResponseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSubmitQueryResponseResponse) ProtoMessage()
- func (m *MsgSubmitQueryResponseResponse) Reset()
- func (m *MsgSubmitQueryResponseResponse) Size() (n int)
- func (m *MsgSubmitQueryResponseResponse) String() string
- func (m *MsgSubmitQueryResponseResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSubmitQueryResponseResponse) XXX_DiscardUnknown()
- func (m *MsgSubmitQueryResponseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSubmitQueryResponseResponse) XXX_Merge(src proto.Message)
- func (m *MsgSubmitQueryResponseResponse) XXX_Size() int
- func (m *MsgSubmitQueryResponseResponse) XXX_Unmarshal(b []byte) error
- type Query
- func (q Query) Description() string
- func (*Query) Descriptor() ([]byte, []int)
- func (m *Query) GetCallbackData() []byte
- func (m *Query) GetCallbackId() string
- func (m *Query) GetCallbackModule() string
- func (m *Query) GetChainId() string
- func (m *Query) GetConnectionId() string
- func (m *Query) GetId() string
- func (m *Query) GetQueryType() string
- func (m *Query) GetRequestData() []byte
- func (m *Query) GetRequestSent() bool
- func (m *Query) GetSubmissionHeight() uint64
- func (m *Query) GetTimeoutDuration() time.Duration
- func (m *Query) GetTimeoutPolicy() TimeoutPolicy
- func (m *Query) GetTimeoutTimestamp() uint64
- func (q Query) HasTimedOut(currentBlockTime time.Time) bool
- func (m *Query) Marshal() (dAtA []byte, err error)
- func (m *Query) MarshalTo(dAtA []byte) (int, error)
- func (m *Query) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Query) ProtoMessage()
- func (m *Query) Reset()
- func (m *Query) Size() (n int)
- func (m *Query) String() string
- func (m *Query) Unmarshal(dAtA []byte) error
- func (m *Query) XXX_DiscardUnknown()
- func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Query) XXX_Merge(src proto.Message)
- func (m *Query) XXX_Size() int
- func (m *Query) XXX_Unmarshal(b []byte) error
- type QueryCallbacks
- type QueryPendingQueriesRequest
- func (*QueryPendingQueriesRequest) Descriptor() ([]byte, []int)
- func (m *QueryPendingQueriesRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPendingQueriesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPendingQueriesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPendingQueriesRequest) ProtoMessage()
- func (m *QueryPendingQueriesRequest) Reset()
- func (m *QueryPendingQueriesRequest) Size() (n int)
- func (m *QueryPendingQueriesRequest) String() string
- func (m *QueryPendingQueriesRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPendingQueriesRequest) XXX_DiscardUnknown()
- func (m *QueryPendingQueriesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPendingQueriesRequest) XXX_Merge(src proto.Message)
- func (m *QueryPendingQueriesRequest) XXX_Size() int
- func (m *QueryPendingQueriesRequest) XXX_Unmarshal(b []byte) error
- type QueryPendingQueriesResponse
- func (*QueryPendingQueriesResponse) Descriptor() ([]byte, []int)
- func (m *QueryPendingQueriesResponse) GetPendingQueries() []Query
- func (m *QueryPendingQueriesResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPendingQueriesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPendingQueriesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPendingQueriesResponse) ProtoMessage()
- func (m *QueryPendingQueriesResponse) Reset()
- func (m *QueryPendingQueriesResponse) Size() (n int)
- func (m *QueryPendingQueriesResponse) String() string
- func (m *QueryPendingQueriesResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPendingQueriesResponse) XXX_DiscardUnknown()
- func (m *QueryPendingQueriesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPendingQueriesResponse) XXX_Merge(src proto.Message)
- func (m *QueryPendingQueriesResponse) XXX_Size() int
- func (m *QueryPendingQueriesResponse) XXX_Unmarshal(b []byte) error
- type QueryServiceClient
- type QueryServiceServer
- type TimeoutPolicy
- type UnimplementedMsgServer
- type UnimplementedQueryServiceServer
Constants ¶
const ( AttributeKeyQueryId = "query_id" AttributeKeyChainId = "chain_id" AttributeKeyConnectionId = "connection_id" AttributeKeyType = "type" AttributeKeyParams = "parameters" AttributeKeyRequest = "request" AttributeKeyHeight = "height" AttributeValueCategory = ModuleName AttributeValueQuery = "query" )
const ( // ModuleName defines the module name ModuleName = "interchainquery" // StoreKey defines the primary module store key StoreKey = ModuleName // RouterKey is the message route for slashing RouterKey = ModuleName // QuerierRoute defines the module's query routing key QuerierRoute = ModuleName )
const ( // The staking store is key'd by the validator's address STAKING_STORE_QUERY_WITH_PROOF = "store/staking/key" // The bank store is key'd by the account address BANK_STORE_QUERY_WITH_PROOF = "store/bank/key" )
const (
TypeMsgSubmitQueryResponse = "submitqueryresponse"
)
interchainquery message types
Variables ¶
var ( ErrAlreadyFulfilled = errors.New("query already fulfilled") ErrSucceededNoDelete = errors.New("query succeeded; do not not execute default behavior") ErrInvalidICQProof = errors.New("icq query response failed") ErrICQCallbackNotFound = errors.New("icq callback id not found") ErrInvalidConsensusState = errors.New("invalid consensus state") ErrInvalidICQRequest = errors.New("invalid interchain query request") ErrFailedToRetryQuery = errors.New("failed to retry query") )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( KeyPrefixData = []byte{prefixData} KeyPrefixQuery = []byte{prefixQuery} KeyQueryCounter = []byte{prefixQueryCounter} )
var ( ErrInvalidLengthMessages = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMessages = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMessages = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var (
ModuleCdc = codec.NewAminoCodec(amino)
)
var TimeoutPolicy_name = map[int32]string{
0: "REJECT_QUERY_RESPONSE",
1: "RETRY_QUERY_REQUEST",
2: "EXECUTE_QUERY_CALLBACK",
}
var TimeoutPolicy_value = map[string]int32{
"REJECT_QUERY_RESPONSE": 0,
"RETRY_QUERY_REQUEST": 1,
"EXECUTE_QUERY_CALLBACK": 2,
}
Functions ¶
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
func RegisterMsgHandler ¶
RegisterMsgHandler registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMsgHandlerClient ¶
RegisterMsgHandlerClient registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MsgClient" to call the correct interceptors.
func RegisterMsgHandlerFromEndpoint ¶
func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMsgHandlerServer ¶
RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". UnaryRPC :call MsgServer 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 RegisterMsgHandlerFromEndpoint instead.
func RegisterMsgServer ¶
func RegisterQueryServiceHandler ¶
func RegisterQueryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterQueryServiceHandler registers the http handlers for service QueryService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryServiceHandlerClient ¶
func RegisterQueryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryServiceClient) error
RegisterQueryServiceHandlerClient registers the http handlers for service QueryService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryServiceClient" to call the correct interceptors.
func RegisterQueryServiceHandlerFromEndpoint ¶
func RegisterQueryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryServiceHandlerFromEndpoint is same as RegisterQueryServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryServiceHandlerServer ¶
func RegisterQueryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServiceServer) error
RegisterQueryServiceHandlerServer registers the http handlers for service QueryService to "mux". UnaryRPC :call QueryServiceServer 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 RegisterQueryServiceHandlerFromEndpoint instead.
func RegisterQueryServiceServer ¶
func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer)
Types ¶
type DataPoint ¶
type DataPoint struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` RemoteHeight github_com_cosmos_cosmos_sdk_types.Int `` /* 137-byte string literal not displayed */ LocalHeight github_com_cosmos_cosmos_sdk_types.Int `` /* 134-byte string literal not displayed */ Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"result,omitempty"` }
func (*DataPoint) Descriptor ¶
func (*DataPoint) MarshalToSizedBuffer ¶
func (*DataPoint) ProtoMessage ¶
func (*DataPoint) ProtoMessage()
func (*DataPoint) XXX_DiscardUnknown ¶
func (m *DataPoint) XXX_DiscardUnknown()
func (*DataPoint) XXX_Marshal ¶
func (*DataPoint) XXX_Unmarshal ¶
type GenesisState ¶
type GenesisState struct {
Queries []Query `protobuf:"bytes,1,rep,name=queries,proto3" json:"queries"`
}
GenesisState defines the epochs module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default Capability genesis state
func NewGenesisState ¶
func NewGenesisState(queries []Query) *GenesisState
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetQueries ¶
func (m *GenesisState) GetQueries() []Query
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶
func (gs GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any failure.
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // SubmitQueryResponse defines a method for submit query responses. SubmitQueryResponse(ctx context.Context, in *MsgSubmitQueryResponse, opts ...grpc.CallOption) (*MsgSubmitQueryResponseResponse, error) }
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgServer ¶
type MsgServer interface { // SubmitQueryResponse defines a method for submit query responses. SubmitQueryResponse(context.Context, *MsgSubmitQueryResponse) (*MsgSubmitQueryResponseResponse, error) }
MsgServer is the server API for Msg service.
type MsgSubmitQueryResponse ¶
type MsgSubmitQueryResponse struct { ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" yaml:"chain_id"` QueryId string `protobuf:"bytes,2,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty" yaml:"query_id"` Result []byte `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty" yaml:"result"` ProofOps *crypto.ProofOps `protobuf:"bytes,4,opt,name=proof_ops,json=proofOps,proto3" json:"proof_ops,omitempty" yaml:"proof_ops"` Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty" yaml:"height"` FromAddress string `protobuf:"bytes,6,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` }
MsgSubmitQueryResponse represents a message type to fulfil a query request.
func (*MsgSubmitQueryResponse) Descriptor ¶
func (*MsgSubmitQueryResponse) Descriptor() ([]byte, []int)
func (MsgSubmitQueryResponse) GetSignBytes ¶
func (msg MsgSubmitQueryResponse) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgSubmitQueryResponse) GetSigners ¶
func (msg MsgSubmitQueryResponse) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (*MsgSubmitQueryResponse) Marshal ¶
func (m *MsgSubmitQueryResponse) Marshal() (dAtA []byte, err error)
func (*MsgSubmitQueryResponse) MarshalTo ¶
func (m *MsgSubmitQueryResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSubmitQueryResponse) MarshalToSizedBuffer ¶
func (m *MsgSubmitQueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSubmitQueryResponse) ProtoMessage ¶
func (*MsgSubmitQueryResponse) ProtoMessage()
func (*MsgSubmitQueryResponse) Reset ¶
func (m *MsgSubmitQueryResponse) Reset()
func (MsgSubmitQueryResponse) Route ¶
func (msg MsgSubmitQueryResponse) Route() string
Route Implements Msg.
func (*MsgSubmitQueryResponse) Size ¶
func (m *MsgSubmitQueryResponse) Size() (n int)
func (*MsgSubmitQueryResponse) String ¶
func (m *MsgSubmitQueryResponse) String() string
func (MsgSubmitQueryResponse) Type ¶
func (msg MsgSubmitQueryResponse) Type() string
Type Implements Msg.
func (*MsgSubmitQueryResponse) Unmarshal ¶
func (m *MsgSubmitQueryResponse) Unmarshal(dAtA []byte) error
func (MsgSubmitQueryResponse) ValidateBasic ¶
func (msg MsgSubmitQueryResponse) ValidateBasic() error
ValidateBasic Implements Msg.
func (*MsgSubmitQueryResponse) XXX_DiscardUnknown ¶
func (m *MsgSubmitQueryResponse) XXX_DiscardUnknown()
func (*MsgSubmitQueryResponse) XXX_Marshal ¶
func (m *MsgSubmitQueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSubmitQueryResponse) XXX_Merge ¶
func (m *MsgSubmitQueryResponse) XXX_Merge(src proto.Message)
func (*MsgSubmitQueryResponse) XXX_Size ¶
func (m *MsgSubmitQueryResponse) XXX_Size() int
func (*MsgSubmitQueryResponse) XXX_Unmarshal ¶
func (m *MsgSubmitQueryResponse) XXX_Unmarshal(b []byte) error
type MsgSubmitQueryResponseResponse ¶
type MsgSubmitQueryResponseResponse struct { }
MsgSubmitQueryResponseResponse defines the MsgSubmitQueryResponse response type.
func (*MsgSubmitQueryResponseResponse) Descriptor ¶
func (*MsgSubmitQueryResponseResponse) Descriptor() ([]byte, []int)
func (*MsgSubmitQueryResponseResponse) Marshal ¶
func (m *MsgSubmitQueryResponseResponse) Marshal() (dAtA []byte, err error)
func (*MsgSubmitQueryResponseResponse) MarshalTo ¶
func (m *MsgSubmitQueryResponseResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSubmitQueryResponseResponse) MarshalToSizedBuffer ¶
func (m *MsgSubmitQueryResponseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSubmitQueryResponseResponse) ProtoMessage ¶
func (*MsgSubmitQueryResponseResponse) ProtoMessage()
func (*MsgSubmitQueryResponseResponse) Reset ¶
func (m *MsgSubmitQueryResponseResponse) Reset()
func (*MsgSubmitQueryResponseResponse) Size ¶
func (m *MsgSubmitQueryResponseResponse) Size() (n int)
func (*MsgSubmitQueryResponseResponse) String ¶
func (m *MsgSubmitQueryResponseResponse) String() string
func (*MsgSubmitQueryResponseResponse) Unmarshal ¶
func (m *MsgSubmitQueryResponseResponse) Unmarshal(dAtA []byte) error
func (*MsgSubmitQueryResponseResponse) XXX_DiscardUnknown ¶
func (m *MsgSubmitQueryResponseResponse) XXX_DiscardUnknown()
func (*MsgSubmitQueryResponseResponse) XXX_Marshal ¶
func (m *MsgSubmitQueryResponseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSubmitQueryResponseResponse) XXX_Merge ¶
func (m *MsgSubmitQueryResponseResponse) XXX_Merge(src proto.Message)
func (*MsgSubmitQueryResponseResponse) XXX_Size ¶
func (m *MsgSubmitQueryResponseResponse) XXX_Size() int
func (*MsgSubmitQueryResponseResponse) XXX_Unmarshal ¶
func (m *MsgSubmitQueryResponseResponse) XXX_Unmarshal(b []byte) error
type Query ¶
type Query struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` QueryType string `protobuf:"bytes,4,opt,name=query_type,json=queryType,proto3" json:"query_type,omitempty"` RequestData []byte `protobuf:"bytes,5,opt,name=request_data,json=requestData,proto3" json:"request_data,omitempty"` CallbackModule string `protobuf:"bytes,13,opt,name=callback_module,json=callbackModule,proto3" json:"callback_module,omitempty"` CallbackId string `protobuf:"bytes,8,opt,name=callback_id,json=callbackId,proto3" json:"callback_id,omitempty"` CallbackData []byte `protobuf:"bytes,12,opt,name=callback_data,json=callbackData,proto3" json:"callback_data,omitempty"` TimeoutPolicy TimeoutPolicy `` /* 147-byte string literal not displayed */ TimeoutDuration time.Duration `protobuf:"bytes,14,opt,name=timeout_duration,json=timeoutDuration,proto3,stdduration" json:"timeout_duration"` TimeoutTimestamp uint64 `protobuf:"varint,9,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` RequestSent bool `protobuf:"varint,11,opt,name=request_sent,json=requestSent,proto3" json:"request_sent,omitempty"` SubmissionHeight uint64 `protobuf:"varint,16,opt,name=submission_height,json=submissionHeight,proto3" json:"submission_height,omitempty"` }
func (Query) Description ¶
Prints an abbreviated query description for logging purposes
func (*Query) Descriptor ¶
func (*Query) GetCallbackData ¶
func (*Query) GetCallbackId ¶
func (*Query) GetCallbackModule ¶
func (*Query) GetChainId ¶
func (*Query) GetConnectionId ¶
func (*Query) GetQueryType ¶
func (*Query) GetRequestData ¶
func (*Query) GetRequestSent ¶
func (*Query) GetSubmissionHeight ¶
func (*Query) GetTimeoutDuration ¶
func (*Query) GetTimeoutPolicy ¶
func (m *Query) GetTimeoutPolicy() TimeoutPolicy
func (*Query) GetTimeoutTimestamp ¶
func (Query) HasTimedOut ¶
Check if a query has timed-out by checking whether the block time is after the timeout timestamp
func (*Query) ProtoMessage ¶
func (*Query) ProtoMessage()
func (*Query) XXX_DiscardUnknown ¶
func (m *Query) XXX_DiscardUnknown()
func (*Query) XXX_Marshal ¶
func (*Query) XXX_Unmarshal ¶
type QueryCallbacks ¶
type QueryPendingQueriesRequest ¶
type QueryPendingQueriesRequest struct { }
func (*QueryPendingQueriesRequest) Descriptor ¶
func (*QueryPendingQueriesRequest) Descriptor() ([]byte, []int)
func (*QueryPendingQueriesRequest) Marshal ¶
func (m *QueryPendingQueriesRequest) Marshal() (dAtA []byte, err error)
func (*QueryPendingQueriesRequest) MarshalTo ¶
func (m *QueryPendingQueriesRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPendingQueriesRequest) MarshalToSizedBuffer ¶
func (m *QueryPendingQueriesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPendingQueriesRequest) ProtoMessage ¶
func (*QueryPendingQueriesRequest) ProtoMessage()
func (*QueryPendingQueriesRequest) Reset ¶
func (m *QueryPendingQueriesRequest) Reset()
func (*QueryPendingQueriesRequest) Size ¶
func (m *QueryPendingQueriesRequest) Size() (n int)
func (*QueryPendingQueriesRequest) String ¶
func (m *QueryPendingQueriesRequest) String() string
func (*QueryPendingQueriesRequest) Unmarshal ¶
func (m *QueryPendingQueriesRequest) Unmarshal(dAtA []byte) error
func (*QueryPendingQueriesRequest) XXX_DiscardUnknown ¶
func (m *QueryPendingQueriesRequest) XXX_DiscardUnknown()
func (*QueryPendingQueriesRequest) XXX_Marshal ¶
func (m *QueryPendingQueriesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPendingQueriesRequest) XXX_Merge ¶
func (m *QueryPendingQueriesRequest) XXX_Merge(src proto.Message)
func (*QueryPendingQueriesRequest) XXX_Size ¶
func (m *QueryPendingQueriesRequest) XXX_Size() int
func (*QueryPendingQueriesRequest) XXX_Unmarshal ¶
func (m *QueryPendingQueriesRequest) XXX_Unmarshal(b []byte) error
type QueryPendingQueriesResponse ¶
type QueryPendingQueriesResponse struct {
PendingQueries []Query `protobuf:"bytes,1,rep,name=pending_queries,json=pendingQueries,proto3" json:"pending_queries"`
}
func (*QueryPendingQueriesResponse) Descriptor ¶
func (*QueryPendingQueriesResponse) Descriptor() ([]byte, []int)
func (*QueryPendingQueriesResponse) GetPendingQueries ¶
func (m *QueryPendingQueriesResponse) GetPendingQueries() []Query
func (*QueryPendingQueriesResponse) Marshal ¶
func (m *QueryPendingQueriesResponse) Marshal() (dAtA []byte, err error)
func (*QueryPendingQueriesResponse) MarshalTo ¶
func (m *QueryPendingQueriesResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPendingQueriesResponse) MarshalToSizedBuffer ¶
func (m *QueryPendingQueriesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPendingQueriesResponse) ProtoMessage ¶
func (*QueryPendingQueriesResponse) ProtoMessage()
func (*QueryPendingQueriesResponse) Reset ¶
func (m *QueryPendingQueriesResponse) Reset()
func (*QueryPendingQueriesResponse) Size ¶
func (m *QueryPendingQueriesResponse) Size() (n int)
func (*QueryPendingQueriesResponse) String ¶
func (m *QueryPendingQueriesResponse) String() string
func (*QueryPendingQueriesResponse) Unmarshal ¶
func (m *QueryPendingQueriesResponse) Unmarshal(dAtA []byte) error
func (*QueryPendingQueriesResponse) XXX_DiscardUnknown ¶
func (m *QueryPendingQueriesResponse) XXX_DiscardUnknown()
func (*QueryPendingQueriesResponse) XXX_Marshal ¶
func (m *QueryPendingQueriesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPendingQueriesResponse) XXX_Merge ¶
func (m *QueryPendingQueriesResponse) XXX_Merge(src proto.Message)
func (*QueryPendingQueriesResponse) XXX_Size ¶
func (m *QueryPendingQueriesResponse) XXX_Size() int
func (*QueryPendingQueriesResponse) XXX_Unmarshal ¶
func (m *QueryPendingQueriesResponse) XXX_Unmarshal(b []byte) error
type QueryServiceClient ¶
type QueryServiceClient interface {
PendingQueries(ctx context.Context, in *QueryPendingQueriesRequest, opts ...grpc.CallOption) (*QueryPendingQueriesResponse, error)
}
QueryServiceClient is the client API for QueryService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryServiceClient ¶
func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient
type QueryServiceServer ¶
type QueryServiceServer interface {
PendingQueries(context.Context, *QueryPendingQueriesRequest) (*QueryPendingQueriesResponse, error)
}
QueryServiceServer is the server API for QueryService service.
type TimeoutPolicy ¶
type TimeoutPolicy int32
const ( TimeoutPolicy_REJECT_QUERY_RESPONSE TimeoutPolicy = 0 TimeoutPolicy_RETRY_QUERY_REQUEST TimeoutPolicy = 1 TimeoutPolicy_EXECUTE_QUERY_CALLBACK TimeoutPolicy = 2 )
func (TimeoutPolicy) EnumDescriptor ¶
func (TimeoutPolicy) EnumDescriptor() ([]byte, []int)
func (TimeoutPolicy) String ¶
func (x TimeoutPolicy) String() string
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) SubmitQueryResponse ¶
func (*UnimplementedMsgServer) SubmitQueryResponse(ctx context.Context, req *MsgSubmitQueryResponse) (*MsgSubmitQueryResponseResponse, error)
type UnimplementedQueryServiceServer ¶
type UnimplementedQueryServiceServer struct { }
UnimplementedQueryServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServiceServer) PendingQueries ¶
func (*UnimplementedQueryServiceServer) PendingQueries(ctx context.Context, req *QueryPendingQueriesRequest) (*QueryPendingQueriesResponse, error)