webapi

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNodeNotSync is returned when the node was not synced.
	ErrNodeNotSync = errors.New("node not synced")
	// ErrInternalError is returned when there was an internal node error.
	ErrInternalError = errors.New("internal error")
)
View Source
var (
	PLUGIN = node.NewPlugin("WebAPI", node.Enabled, configure, run)
)

PLUGIN WebAPI

Functions

This section is empty.

Types

type AddNeighbors

type AddNeighbors struct {
	Command string   `mapstructure:"command"`
	Uris    []string `mapstructure:"uris"`
}

AddNeighbors legacy struct

type AddNeighborsHornet

type AddNeighborsHornet struct {
	Command   string     `mapstructure:"command"`
	Neighbors []Neighbor `mapstructure:"neighbors"`
}

AddNeighborsHornet struct

type AddNeighborsResponse

type AddNeighborsResponse struct {
	AddedNeighbors int `json:"addedNeighbors"`
	Duration       int `json:"duration"`
}

AddNeighborsResponse struct

type AddressWithBalance

type AddressWithBalance struct {
	Address trinary.Hash `mapstructure:"address"`
	Balance uint64       `mapstructure:"balance"`
}

type ApproverStruct

type ApproverStruct struct {
	TxHash            trinary.Hash `mapstructure:"txHash"`
	ReferencedByTrunk bool         `mapstructure:"referencedByTrunk"`
}

ApproverStruct struct

type AttachToTangle

type AttachToTangle struct {
	Command            string           `mapstructure:"command"`
	TrunkTransaction   trinary.Hash     `mapstructure:"trunkTransaction"`
	BranchTransaction  trinary.Hash     `mapstructure:"branchTransaction"`
	MinWeightMagnitude int              `mapstructure:"minWeightMagnitude,omitempty"`
	Trytes             []trinary.Trytes `mapstructure:"trytes"`
}

AttachToTangle struct

type AttachToTangleReturn

type AttachToTangleReturn struct {
	Trytes   []trinary.Trytes `json:"trytes"`
	Duration int              `json:"duration"`
}

AttachToTangleReturn struct

type BradcastTransactionsReturn

type BradcastTransactionsReturn struct {
	Duration int `json:"duration"`
}

BradcastTransactionsReturn struct

type BroadcastTransactions

type BroadcastTransactions struct {
	Command string           `mapstructure:"command"`
	Trytes  []trinary.Trytes `mapstructure:"trytes"`
}

BroadcastTransactions struct

type BundleWithValue

type BundleWithValue struct {
	BundleHash trinary.Hash   `mapstructure:"bundleHash"`
	TailTxHash trinary.Hash   `mapstructure:"tailTxHash"`
	LastIndex  uint64         `mapstructure:"lastIndex"`
	Txs        []*TxWithValue `mapstructure:"txs"`
}

BundleWithValue struct

type CheckConsistencyReturn

type CheckConsistencyReturn struct {
	State    bool `json:"state"`
	Duration int  `json:"duration"`
}

CheckConsistencyReturn struct

type CreateSnapshotFile

type CreateSnapshotFile struct {
	Command     string          `mapstructure:"command"`
	TargetIndex milestone.Index `mapstructure:"targetIndex"`
}

CreateSnapshotFile struct

type CreateSnapshotFileReturn

type CreateSnapshotFileReturn struct {
	Duration int `json:"duration"`
}

CreateSnapshotFileReturn struct

type DebugRequest

type DebugRequest struct {
	Hash             trinary.Hash    `json:"hash"`
	Type             string          `json:"type"`
	TxExists         bool            `json:"txExists"`
	EnqueueTimestamp int64           `json:"enqueueTime"`
	MilestoneIndex   milestone.Index `json:"milestoneIndex"`
}

type EntryPoint

type EntryPoint struct {
	TxHash                    trinary.Hash    `json:"txHash"`
	ConfirmedByMilestoneIndex milestone.Index `json:"confirmedByMilestoneIndex"`
}

EntryPoint struct

type ErrorReturn

type ErrorReturn struct {
	Error string `json:"error"`
}

ErrorReturn struct

type FindTransactions

type FindTransactions struct {
	Command    string         `mapstructure:"command"`
	Bundles    []trinary.Hash `mapstructure:"bundles"`
	Addresses  []trinary.Hash `mapstructure:"addresses"`
	Tags       []trinary.Hash `mapstructure:"tags"`
	Approvees  []trinary.Hash `mapstructure:"approvees"`
	MaxResults int            `mapstructure:"maxresults"`
	ValueOnly  bool           `json:"valueOnly"`
}

FindTransactions struct

type FindTransactionsReturn

type FindTransactionsReturn struct {
	Hashes   []trinary.Hash `json:"hashes"`
	Duration int            `json:"duration"`
}

FindTransactionsReturn struct

type GetBalances

type GetBalances struct {
	Command   string         `mapstructure:"command"`
	Addresses []trinary.Hash `mapstructure:"addresses"`
}

GetBalances struct

type GetBalancesReturn

type GetBalancesReturn struct {
	Balances       []trinary.Hash  `json:"balances"`
	References     []trinary.Hash  `json:"references"`
	MilestoneIndex milestone.Index `json:"milestoneIndex"`
	Duration       int             `json:"duration"`
}

GetBalancesReturn struct

type GetFundsOnSpentAddressesReturn

type GetFundsOnSpentAddressesReturn struct {
	Command   string                `mapstructure:"command"`
	Addresses []*AddressWithBalance `mapstructure:"addresses"`
}

GetFundsOnSpentAddressesReturn struct

type GetInclusionStates

type GetInclusionStates struct {
	Command      string         `mapstructure:"command"`
	Transactions []trinary.Hash `mapstructure:"transactions"`
}

GetInclusionStates struct

type GetInclusionStatesReturn

type GetInclusionStatesReturn struct {
	States   []bool `json:"states"`
	Duration int    `json:"duration"`
}

GetInclusionStatesReturn struct

type GetLedgerDiff

type GetLedgerDiff struct {
	Command        string          `mapstructure:"command"`
	MilestoneIndex milestone.Index `mapstructure:"milestoneIndex"`
}

GetLedgerDiff struct

type GetLedgerDiffExt

type GetLedgerDiffExt struct {
	Command        string          `mapstructure:"command"`
	MilestoneIndex milestone.Index `mapstructure:"milestoneIndex"`
}

GetLedgerDiffExt struct

type GetLedgerDiffExtReturn

type GetLedgerDiffExtReturn struct {
	ConfirmedTxWithValue      []*TxHashWithValue     `json:"confirmedTxWithValue"`
	ConfirmedBundlesWithValue []*BundleWithValue     `json:"confirmedBundlesWithValue"`
	Diff                      map[trinary.Hash]int64 `json:"diff"`
	MilestoneIndex            milestone.Index        `json:"milestoneIndex"`
	Duration                  int                    `json:"duration"`
}

GetLedgerDiffExtReturn struct

type GetLedgerDiffReturn

type GetLedgerDiffReturn struct {
	Diff           map[trinary.Hash]int64 `json:"diff"`
	MilestoneIndex milestone.Index        `json:"milestoneIndex"`
	Duration       int                    `json:"duration"`
}

GetLedgerDiffReturn struct

type GetLedgerState

type GetLedgerState struct {
	Command     string          `mapstructure:"command"`
	TargetIndex milestone.Index `mapstructure:"targetIndex,omitempty"`
}

GetLedgerState struct

type GetLedgerStateReturn

type GetLedgerStateReturn struct {
	Balances       map[trinary.Hash]uint64 `json:"balances"`
	MilestoneIndex milestone.Index         `json:"milestoneIndex"`
	Duration       int                     `json:"duration"`
}

GetLedgerStateReturn struct

type GetNeighbors

type GetNeighbors struct {
	Command string `mapstructure:"command"`
}

GetNeighbors struct

type GetNeighborsReturn

type GetNeighborsReturn struct {
	Neighbors []*peer.Info `json:"neighbors"`
	Duration  int          `json:"duration"`
}

GetNeighborsReturn struct

type GetNodeAPIConfiguration

type GetNodeAPIConfiguration struct {
	Command string `mapstructure:"command"`
}

GetNodeAPIConfiguration struct

type GetNodeAPIConfigurationReturn

type GetNodeAPIConfigurationReturn struct {
	MaxFindTransactions int             `json:"maxFindTransactions"`
	MaxRequestsList     int             `json:"maxRequestsList"`
	MaxGetTrytes        int             `json:"maxGetTrytes"`
	MaxBodyLength       int             `json:"maxBodyLength"`
	MilestoneStartIndex milestone.Index `json:"milestoneStartIndex"`
	Duration            int             `json:"duration"`
}

GetNodeAPIConfigurationReturn struct

type GetNodeInfo

type GetNodeInfo struct {
	Command string `mapstructure:"command"`
}

GetNodeInfo struct

type GetNodeInfoReturn

type GetNodeInfoReturn struct {
	AppName                            string          `json:"appName"`
	AppVersion                         string          `json:"appVersion"`
	NodeAlias                          string          `json:"nodeAlias,omitempty"`
	LatestMilestone                    trinary.Hash    `json:"latestMilestone"`
	LatestMilestoneIndex               milestone.Index `json:"latestMilestoneIndex"`
	LatestSolidSubtangleMilestone      trinary.Hash    `json:"latestSolidSubtangleMilestone"`
	LatestSolidSubtangleMilestoneIndex milestone.Index `json:"latestSolidSubtangleMilestoneIndex"`
	IsSynced                           bool            `json:"isSynced"`
	Health                             bool            `json:"isHealthy"`
	MilestoneStartIndex                milestone.Index `json:"milestoneStartIndex"`
	LastSnapshottedMilestoneIndex      milestone.Index `json:"lastSnapshottedMilestoneIndex"`
	Neighbors                          uint            `json:"neighbors"`
	Time                               int64           `json:"time"`
	Tips                               uint32          `json:"tips"`
	TransactionsToRequest              int             `json:"transactionsToRequest"`
	Features                           []string        `json:"features"`
	CoordinatorAddress                 trinary.Hash    `json:"coordinatorAddress"`
	Duration                           int             `json:"duration"`
}

GetNodeInfoReturn struct

type GetRequests

type GetRequests struct {
	Command string `mapstructure:"command"`
}

GetRequests struct

type GetRequestsReturn

type GetRequestsReturn struct {
	Requests []*DebugRequest `json:"requests"`
}

GetRequestsReturn struct

type GetTipInfo

type GetTipInfo struct {
	Command         string       `mapstructure:"command"`
	TailTransaction trinary.Hash `mapstructure:"tailTransaction"`
}

GetTipInfo struct

type GetTipInfoReturn

type GetTipInfoReturn struct {
	Confirmed      bool `json:"confirmed"`
	Conflicting    bool `json:"conflicting"`
	ShouldPromote  bool `json:"shouldPromote"`
	ShouldReattach bool `json:"shouldReattach"`
	Duration       int  `json:"duration"`
}

GetTipInfoReturn struct

type GetTransactionsToApprove

type GetTransactionsToApprove struct {
	Command   string       `mapstructure:"command"`
	Depth     uint         `mapstructure:"depth"`
	Reference trinary.Hash `mapstructure:"reference"`
}

GetTransactionsToApprove struct

type GetTransactionsToApproveReturn

type GetTransactionsToApproveReturn struct {
	TrunkTransaction  trinary.Hash `json:"trunkTransaction"`
	BranchTransaction trinary.Hash `json:"branchTransaction"`
	Duration          int          `json:"duration"`
}

GetTransactionsToApproveReturn struct

type GetTrytes

type GetTrytes struct {
	Command string         `mapstructure:"command"`
	Hashes  []trinary.Hash `mapstructure:"hashes"`
}

GetTrytes struct

type GetTrytesReturn

type GetTrytesReturn struct {
	Trytes   []trinary.Trytes `json:"trytes"`
	Duration int              `json:"duration"`
}

GetTrytesReturn struct

type Neighbor

type Neighbor struct {
	Identity   string `mapstructure:"identity"`
	Alias      string `mapstructure:"alias"`
	PreferIPv6 bool   `mapstructure:"prefer_ipv6"`
}

Neighbor struct

type PruneDatabase

type PruneDatabase struct {
	Command     string          `mapstructure:"command"`
	TargetIndex milestone.Index `mapstructure:"targetIndex"`
	Depth       milestone.Index `mapstructure:"depth"`
}

PruneDatabase struct

type PruneDatabaseReturn

type PruneDatabaseReturn struct {
	Duration int `json:"duration"`
}

PruneDatabaseReturn struct

type RemoveNeighbors

type RemoveNeighbors struct {
	Command string   `mapstructure:"removeNeighbors"`
	Uris    []string `mapstructure:"uris"`
}

RemoveNeighbors struct

type RemoveNeighborsReturn

type RemoveNeighborsReturn struct {
	RemovedNeighbors uint `json:"removedNeighbors"`
	Duration         int  `json:"duration"`
}

RemoveNeighborsReturn struct

type ResultReturn

type ResultReturn struct {
	Message string `json:"message"`
}

ResultReturn struct

type SearchConfirmedApprover

type SearchConfirmedApprover struct {
	Command         string       `mapstructure:"command"`
	TxHash          trinary.Hash `mapstructure:"txHash"`
	SearchMilestone bool         `mapstructure:"searchMilestone"`
}

SearchConfirmedApprover struct

type SearchConfirmedApproverReturn

type SearchConfirmedApproverReturn struct {
	ConfirmedTxHash           trinary.Hash      `json:"confirmedTxHash"`
	ConfirmedByMilestoneIndex milestone.Index   `json:"confirmedByMilestoneIndex"`
	TanglePath                []*ApproverStruct `json:"tanglePath"`
	TanglePathLength          int               `json:"tanglePathLength"`
}

SearchConfirmedApproverReturn struct

type SearchEntryPoint

type SearchEntryPoint struct {
	Command string       `mapstructure:"command"`
	TxHash  trinary.Hash `mapstructure:"txHash"`
}

SearchEntryPoint struct

type SearchEntryPointReturn

type SearchEntryPointReturn struct {
	TanglePath       []*TransactionWithApprovers `json:"tanglePath"`
	EntryPoints      []*EntryPoint               `json:"entryPoints"`
	TanglePathLength int                         `json:"tanglePathLength"`
}

SearchEntryPointReturn struct

type StoreTransactions

type StoreTransactions struct {
	Command string           `mapstructure:"command"`
	Trytes  []trinary.Trytes `mapstructure:"trytes"`
}

StoreTransactions struct

type TransactionWithApprovers

type TransactionWithApprovers struct {
	TxHash            trinary.Hash `json:"txHash"`
	TrunkTransaction  trinary.Hash `json:"trunkTransaction"`
	BranchTransaction trinary.Hash `json:"branchTransaction"`
}

type TriggerSolidifier

type TriggerSolidifier struct {
	Command string `mapstructure:"command"`
}

SearchConfirmedApprover struct

type TxHashWithValue

type TxHashWithValue struct {
	TxHash     trinary.Hash `mapstructure:"txHash"`
	TailTxHash trinary.Hash `mapstructure:"tailTxHash"`
	BundleHash trinary.Hash `mapstructure:"bundleHash"`
	Address    trinary.Hash `mapstructure:"address"`
	Value      int64        `mapstructure:"value"`
}

TxHashWithValue struct

type TxWithValue

type TxWithValue struct {
	TxHash  trinary.Hash `mapstructure:"txHash"`
	Address trinary.Hash `mapstructure:"address"`
	Index   uint64       `mapstructure:"index"`
	Value   int64        `mapstructure:"value"`
}

TxWithValue struct

type WereAddressesSpentFrom

type WereAddressesSpentFrom struct {
	Command   string         `mapstructure:"wereAddressesSpentFrom"`
	Addresses []trinary.Hash `mapstructure:"addresses"`
}

WereAddressesSpentFrom struct

type WereAddressesSpentFromReturn

type WereAddressesSpentFromReturn struct {
	States   []bool `json:"states"`
	Duration int    `json:"duration"`
}

WereAddressesSpentFromReturn struct

Jump to

Keyboard shortcuts

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