Documentation ¶
Index ¶
- Constants
- Variables
- type AccountRequest
- type AccountResponse
- type AccountStatus
- type BroadcastError
- type BroadcastRequest
- type BroadcastResponse
- type BroadcastSync
- type CallRequest
- type CallResponse
- type ChainInfoRequest
- type ChainInfoResponse
- type ChallengeRequest
- type ChallengeResponse
- type ChangesetMetadataRequest
- type ChangesetMetadataResponse
- type ChangesetRequest
- type ChangesetsResponse
- type DatasetInfo
- type EstimatePriceRequest
- type EstimatePriceResponse
- type HealthRequest
- type HealthResponse
- type ListDatabasesRequest
- type ListDatabasesResponse
- type ListMigrationsRequest
- type ListMigrationsResponse
- type MigrationMetadataRequest
- type MigrationMetadataResponse
- type MigrationSnapshotChunkRequest
- type MigrationSnapshotChunkResponse
- type MigrationStatusRequest
- type MigrationStatusResponse
- type PingRequest
- type PingResponse
- type QueryRequest
- type QueryResponse
- type Result
- type SchemaRequest
- type SchemaResponse
- type TxQueryRequest
- type TxQueryResponse
- type VersionRequest
- type VersionResponse
Constants ¶
const ( MethodHealth jsonrpc.Method = "user.health" MethodUserVersion jsonrpc.Method = "user.version" MethodPing jsonrpc.Method = "user.ping" MethodChainInfo jsonrpc.Method = "user.chain_info" MethodAccount jsonrpc.Method = "user.account" MethodBroadcast jsonrpc.Method = "user.broadcast" MethodCall jsonrpc.Method = "user.call" MethodDatabases jsonrpc.Method = "user.databases" MethodPrice jsonrpc.Method = "user.estimate_price" MethodQuery jsonrpc.Method = "user.query" MethodTxQuery jsonrpc.Method = "user.tx_query" MethodSchema jsonrpc.Method = "user.schema" MethodMigrationStatus jsonrpc.Method = "user.migration_status" MethodListMigrations jsonrpc.Method = "user.list_migrations" MethodLoadChangeset jsonrpc.Method = "user.changeset" MethodLoadChangesetMetadata jsonrpc.Method = "user.changeset_metadata" MethodMigrationMetadata jsonrpc.Method = "user.migration_metadata" MethodMigrationGenesisChunk jsonrpc.Method = "user.migration_genesis_chunk" MethodChallenge jsonrpc.Method = "user.challenge" )
Variables ¶
var ( AccountStatusLatest = types.AccountStatusLatest AccountStatusPending = types.AccountStatusPending )
These are the recognized AccountStatus values used with AccountRequest. AccountStatusLatest reflects confirmed state, while AccountStatusPending includes changes in mempool.
Functions ¶
This section is empty.
Types ¶
type AccountRequest ¶
type AccountRequest struct { Identifier types.HexBytes `json:"identifier" desc:"account identifier"` Status *AccountStatus `json:"status,omitempty" desc:"blockchain status (confirmed or unconfirmed)"` // Mapped to URL query parameter `status`. }
AccountRequest contains the request parameters for MethodAccount.
type AccountResponse ¶
type AccountResponse struct { Identifier types.HexBytes `json:"identifier,omitempty"` Balance string `json:"balance"` Nonce int64 `json:"nonce"` }
AccountResponse contains the response object for MethodAccount.
type AccountStatus ¶
type AccountStatus = types.AccountStatus
AccountStatus is the type used to enumerate the different account status options recognized in AccountRequest.
type BroadcastError ¶
type BroadcastError struct { // TxCode corresponds to a transactions.TxCode, rather than an RPC error code. TxCode uint32 `json:"tx_code,omitempty"` Hash string `json:"hash,omitempty"` // may be empty if it could not even deserialize our tx Message string `json:"message,omitempty"` }
BroadcastError is a structured error object used by MethodBroadcast when creating a Response with this in Error.Data. This error type would typically be in an response with the ErrorTxExecFailure RPC ErrorCode.
func (BroadcastError) Error ¶
func (be BroadcastError) Error() string
type BroadcastRequest ¶
type BroadcastRequest struct { Tx *transactions.Transaction `json:"tx"` Sync *BroadcastSync `json:"sync,omitempty"` }
BroadcastRequest contains the request parameters for MethodBroadcast.
type BroadcastResponse ¶
BroadcastResponse contains the response object for MethodBroadcast.
type BroadcastSync ¶
type BroadcastSync uint8
BroadcastSync is the type used to enumerate the broadcast request synchronization options available to BroadcastRequest.
const ( // BroadcastSyncAsync does not wait for acceptance into mempool, only // computing the transaction hash. BroadcastSyncAsync BroadcastSync = 0 // BroadcastSyncSync ensures the transaction is accepted to mempool before // responding. Ths should be preferred to BroadcastSyncAsync in most cases. BroadcastSyncSync BroadcastSync = 1 // BroadcastSyncCommit will wait for the transaction to be included in a // block. BroadcastSyncCommit BroadcastSync = 2 )
These are the recognized BroadcastSync values used with BroadcastRequest.
type CallRequest ¶
type CallRequest = transactions.CallMessage
CallRequest contains the request parameters for MethodCall.
type CallResponse ¶
type CallResponse struct { Result []byte `json:"result,omitempty"` Logs []string `json:"logs,omitempty"` }
CallResponse contains the response object for MethodCall.
type ChainInfoRequest ¶
type ChainInfoRequest struct{}
ChainInfoRequest contains the request parameters for MethodChainInfo.
type ChainInfoResponse ¶
ChainInfoResponse contains the response object for MethodChainInfo.
type ChallengeRequest ¶ added in v0.3.0
type ChallengeRequest struct{}
type ChallengeResponse ¶ added in v0.3.0
type ChangesetMetadataRequest ¶ added in v0.3.0
type ChangesetMetadataRequest struct {
Height int64 `json:"height"`
}
LoadChangesetsRequest contains the request parameters for MethodLoadChangesets.
type ChangesetMetadataResponse ¶ added in v0.3.0
type ChangesetRequest ¶ added in v0.3.0
type ChangesetsResponse ¶ added in v0.3.0
type ChangesetsResponse struct {
Changesets []byte `json:"changesets"`
}
type DatasetInfo ¶
type DatasetInfo = types.DatasetIdentifier
SchemaResponse contains the response object for MethodSchema.
type EstimatePriceRequest ¶
type EstimatePriceRequest struct {
Tx *transactions.Transaction `json:"tx"`
}
EstimatePriceRequest contains the request parameters for MethodPrice.
type EstimatePriceResponse ¶
type EstimatePriceResponse struct {
Price string `json:"price,omitempty"`
}
SchemaResponse contains the response object for MethodSchema.
type HealthRequest ¶ added in v0.3.0
type HealthRequest struct{}
type HealthResponse ¶ added in v0.3.0
HealthResponse is the response for MethodHealth. This determines the serialized response for the Health method required by the rpcserver.Svc interface. This is the response with which most health checks will be concerned.
type ListDatabasesRequest ¶
ListDatabasesRequest contains the request parameters for MethodDatabases.
type ListDatabasesResponse ¶
type ListDatabasesResponse struct {
Databases []*DatasetInfo `json:"databases,omitempty"`
}
SchemaResponse contains the response object for MethodSchema.
type ListMigrationsRequest ¶ added in v0.3.0
type ListMigrationsRequest struct{}
type ListMigrationsResponse ¶ added in v0.3.0
type MigrationMetadataRequest ¶ added in v0.3.0
type MigrationMetadataRequest struct{}
type MigrationMetadataResponse ¶ added in v0.3.0
type MigrationMetadataResponse struct {
Metadata *types.MigrationMetadata `json:"metadata"`
}
type MigrationSnapshotChunkRequest ¶ added in v0.3.0
type MigrationSnapshotChunkResponse ¶ added in v0.3.0
type MigrationSnapshotChunkResponse struct {
Chunk []byte `json:"chunk"`
}
type MigrationStatusRequest ¶ added in v0.3.0
type MigrationStatusRequest struct{}
type MigrationStatusResponse ¶ added in v0.3.0
type MigrationStatusResponse struct {
Status *types.MigrationState `json:"status"`
}
type PingRequest ¶
type PingRequest struct {
Message string `json:"message"`
}
PingRequest contains the request parameters for MethodPing.
type PingResponse ¶
type PingResponse struct {
Message string `json:"message,omitempty"`
}
SchemaResponse contains the response object for MethodSchema.
type QueryRequest ¶
QueryRequest contains the request parameters for MethodQuery.
type QueryResponse ¶
type QueryResponse Result
QueryResponse contains the response object for MethodQuery.
type SchemaRequest ¶
type SchemaRequest struct {
DBID string `json:"dbid"`
}
SchemaRequest contains the request parameters for MethodSchema.
type SchemaResponse ¶
SchemaResponse contains the response object for MethodSchema.
type TxQueryRequest ¶
TxQueryRequest contains the request parameters for MethodTxQuery.
type TxQueryResponse ¶
type TxQueryResponse struct { Hash types.HexBytes `json:"hash,omitempty"` Height int64 `json:"height,omitempty"` Tx *transactions.Transaction `json:"tx,omitempty"` TxResult *transactions.TransactionResult `json:"tx_result,omitempty"` }
TxQueryResponse contains the response object for MethodTxQuery.
type VersionRequest ¶
type VersionRequest struct{}