Documentation
¶
Index ¶
Constants ¶
View Source
const QueryTmp = `` /* 301-byte string literal not displayed */
Variables ¶
View Source
var ( ErrSpawnTxNotFound = errors.New("err_spawn_tx_not_found") ErrInvalidProcessType = errors.New("err_invalid_process_type") ErrInvalidAssignmentType = errors.New("err_invalid_assignment_type") ErrInvalidMessageType = errors.New("err_invalid_message_type") ErrInvalidDownloadItems = errors.New("err_invalid_download_items") )
Functions ¶
This section is empty.
Types ¶
type DownloadResult ¶
type DownloadResult struct {
Nonce int64
Assignment *goarSchema.BundleItem
Message *goarSchema.BundleItem
}
type GraphQLEdge ¶
type GraphQLEdge struct {
Cursor string `json:"cursor"`
Node GraphQLNode `json:"node"`
}
type GraphQLNode ¶
type GraphQLNode struct {
ID string `json:"id"`
Tags []GraphQLTag `json:"tags"`
}
type GraphQLPageInfo ¶
type GraphQLPageInfo struct {
HasNextPage bool `json:"hasNextPage"`
}
type GraphQLResp ¶
type GraphQLResp struct {
Transactions GraphQLTransactions `json:"transactions"`
}
GraphQL response structs
type GraphQLTag ¶
type GraphQLTransactions ¶
type GraphQLTransactions struct {
PageInfo GraphQLPageInfo `json:"pageInfo"`
Edges []GraphQLEdge `json:"edges"`
}
type IDBChainkit ¶ added in v0.3.2
type IDBChainkit interface {
AddPending(txid string) error
MoveToUploading() (int64, error)
EndUpload() error
IsUploadedBatch(txids []string) (map[string]bool, error)
IsUploaded(txid string) (bool, error)
GetUploading() ([]string, error)
SetBundledIn(bundledInID string) error
GetBundledIn() (string, error)
Cache(txid string, item goarSchema.BundleItem) error
GetCache(txid string) (*goarSchema.BundleItem, error)
}
type IDBTool ¶ added in v0.3.2
type IDBTool interface {
// DB
GetMessage(msgid string) (msg *goarSchema.BundleItem, err error)
GetAssignByNonce(pid string, nonce int64) (assign *goarSchema.BundleItem, err error)
GetResult(msgid string) (result *vmmSchema.Result, err error)
}
type IOperator ¶
type IOperator interface {
// Upload a transaction in BundleItem form; a BundleItem may nest multiple BundleItems.
// The outermost BundleItem is submitted to the network as the atomic Transaction.
// The outermost BundleItem's txID is used as parentTxID when downloading.
Upload(items []goarSchema.BundleItem) (txid string, err error)
// Download a transaction
// return BundleItem format
Download(itemID string) (*goarSchema.BundleItem, error)
// Download multiple transactions
Downloads(itemIDs []string) ([]*goarSchema.BundleItem, error)
// Execute a GraphQL query.
GraphQL(query string) ([]byte, error)
// Check if a transaction upload success
CheckTransaction(txid string) (bool, error)
}
Click to show internal directories.
Click to hide internal directories.