Documentation ¶
Index ¶
- Constants
- type ConsoleUtilModule
- type DHTModule
- type DevModule
- type ExtManager
- type GetOptions
- type Module
- type ModuleCommon
- type Modules
- type ModulesHub
- type NamespaceModule
- type NodeModule
- type PoolModule
- type PushKeyModule
- type RPCModule
- type RepoModule
- type TicketModule
- type TxModule
- type UserModule
- type VMMember
Constants ¶
View Source
const ( TxStatusInMempool = "in_mempool" TxStatusInPushpool = "in_pushpool" TxStatusInBlock = "in_block" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsoleUtilModule ¶
type ConsoleUtilModule interface { Module PrettyPrint(values ...interface{}) Dump(objs ...interface{}) Diff(a, b interface{}) Eval(src interface{}) otto.Value EvalFile(file string) otto.Value ReadFile(filename string) []byte ReadTextFile(filename string) string TreasuryAddress() string GenKey(seed ...int64) util.Map }
type ExtManager ¶
type GetOptions ¶
type GetOptions struct { Height interface{} `json:"height"` Select []string `json:"select"` }
type ModuleCommon ¶
type ModuleCommon struct { // Suggestions contains console suggestions Suggestions []prompt.Suggest // Client is an RPC client Client types.Client }
ModuleCommon provides common module fields and methods.
func (*ModuleCommon) Completer ¶
func (m *ModuleCommon) Completer(d prompt.Document) []prompt.Suggest
Completer returns suggestions for console input
func (*ModuleCommon) IsAttached ¶
func (m *ModuleCommon) IsAttached() bool
IsAttached checks whether the module is in attach mode.
type Modules ¶
type Modules struct { Tx TxModule Chain NodeModule Pool PoolModule User UserModule PushKey PushKeyModule Util ConsoleUtilModule Ticket TicketModule Repo RepoModule NS NamespaceModule DHT DHTModule ExtMgr ExtManager RPC RPCModule Dev DevModule }
Modules contains all supported modules
func (*Modules) ConfigureVM ¶
ConfigureVM applies all modules' VM configurations to the given VM.
type ModulesHub ¶
type ModulesHub interface { // ConfigureVM instructs VM-accessible modules accessible to configure the VM ConfigureVM(vm *otto.Otto) []prompt.Completer // GetModules returns modules GetModules() *Modules }
ModulesHub describes a mechanism for aggregating, configuring and accessing modules that provide uniform functionalities in JS environment, JSON-RPC APIs and REST APIs
type NamespaceModule ¶
type NodeModule ¶
type PoolModule ¶
type PushKeyModule ¶
type PushKeyModule interface { Module Register(params map[string]interface{}, options ...interface{}) util.Map Update(params map[string]interface{}, options ...interface{}) util.Map Find(id string, blockHeight ...uint64) util.Map Unregister(params map[string]interface{}, options ...interface{}) util.Map GetByAddress(address string) []string GetAccountOfOwner(gpgID string, blockHeight ...uint64) util.Map }
type RepoModule ¶
type RepoModule interface { Module Create(params map[string]interface{}, options ...interface{}) util.Map UpsertOwner(params map[string]interface{}, options ...interface{}) util.Map Vote(params map[string]interface{}, options ...interface{}) util.Map Get(name string, opts ...GetOptions) util.Map Update(params map[string]interface{}, options ...interface{}) util.Map DepositProposalFee(params map[string]interface{}, options ...interface{}) util.Map AddContributor(params map[string]interface{}, options ...interface{}) util.Map Track(names string, height ...uint64) UnTrack(names string) GetTracked() util.Map GetReposCreatedByAddress(address string) []string ListPath(name, path string, revision ...string) []util.Map ReadFileLines(name, filePath string, revision ...string) []string ReadFile(name, filePath string, revision ...string) string GetBranches(name string) []string GetLatestBranchCommit(name, branch string) util.Map GetCommits(reference, branch string, limit ...int) []util.Map GetCommit(name, hash string) util.Map CountCommits(name, branch string) int GetCommitAncestors(name, commitHash string, limit ...int) []util.Map GetParentsAndCommitDiff(name string, commitHash string) util.Map }
type TicketModule ¶
type TicketModule interface { Module BuyValidatorTicket(params map[string]interface{}, options ...interface{}) util.Map BuyHostTicket(params map[string]interface{}, options ...interface{}) util.Map GetValidatorTicketsByProposer(proposerPubKey string, queryOpts ...util.Map) []util.Map GetHostTicketsByProposer(proposerPubKey string, queryOpts ...util.Map) []util.Map GetTopValidators(limit ...int) []util.Map GetTopHosts(limit ...int) []util.Map GetStats(proposerPubKey ...string) (result util.Map) GetAll(limit ...int) []util.Map UnbondHostTicket(params map[string]interface{}, options ...interface{}) util.Map }
type UserModule ¶
type UserModule interface { Module GetKeys() []string GetPrivKey(address string, passphrase ...string) string GetPublicKey(address string, passphrase ...string) string GetNonce(address string, height ...uint64) string GetAccount(address string, height ...uint64) util.Map GetAvailableBalance(address string, height ...uint64) string GetStakedBalance(address string, height ...uint64) string GetValidator(includePrivKey ...bool) util.Map SetCommission(params map[string]interface{}, options ...interface{}) util.Map SendCoin(params map[string]interface{}, options ...interface{}) util.Map }
Click to show internal directories.
Click to hide internal directories.