Documentation ¶
Index ¶
- func TestCLIVersion(t *testing.T)
- type CLI
- func (cli *CLI) DelVar(key string) error
- func (cli *CLI) Embeddable() *CLI
- func (cli *CLI) Execute()
- func (cli *CLI) GetAccount(name, keyType string) (string, error)
- func (cli *CLI) GetAccountOrSeed(name, keyType string) (string, error)
- func (cli *CLI) GetGlobalVar(key string) (string, error)
- func (cli *CLI) GetVar(key string) (string, error)
- func (cli *CLI) LoadAccount(logFields logrus.Fields, name string) *microstellar.Account
- func (cli *CLI) ResolveAccount(fields logrus.Fields, lookupKey string, keyType string) (string, error)
- func (cli *CLI) ResolveAsset(name string) (*microstellar.Asset, error)
- func (cli *CLI) Run(args ...string) string
- func (cli *CLI) RunCommand(command string) string
- func (cli *CLI) SetGlobalVar(key string, value string) error
- func (cli *CLI) SetStore(store store.API)
- func (cli *CLI) SetVar(key string, value string) error
- func (cli *CLI) StopWatcher()
- func (cli *CLI) TestCommand(command string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestCLIVersion ¶
Types ¶
type CLI ¶
type CLI struct {
// contains filtered or unexported fields
}
CLI represents a command-line interface. This class is not threadsafe.
func (*CLI) Embeddable ¶
Embeddable returns a CLI that you can embed into your own Go programs. This is not thread-safe.
func (*CLI) GetAccount ¶
GetAccount returns the account address or seed for "name". Set keyType to "address" or "seed" to specify the return value.
func (*CLI) GetAccountOrSeed ¶
GetAccountOrSeed returns the account address or seed for "name". It prefers keyType ("address" or "seed")
func (*CLI) GetGlobalVar ¶
GetGlobalVar reads global var "key"
func (*CLI) LoadAccount ¶ added in v0.3.1
LoadAccount loads information for "name" from horizon.
func (*CLI) ResolveAccount ¶ added in v0.2.8
func (cli *CLI) ResolveAccount(fields logrus.Fields, lookupKey string, keyType string) (string, error)
ResolveAccount returns an address or seed (depending on keyType), by looking up lookupKey in the local store (or in federation servers.)
func (*CLI) ResolveAsset ¶ added in v0.2.8
func (cli *CLI) ResolveAsset(name string) (*microstellar.Asset, error)
ResolveAsset looks up name and returns a microstellar Asset
func (*CLI) RunCommand ¶
RunCommand is a helper that lets you send a full command line to Run, so you don't have to break up your arguments.
func (*CLI) SetGlobalVar ¶
SetGlobalVar writes the kv pair to the global namespace in the storage backend
func (*CLI) TestCommand ¶
TestCommand is a helper function that calls Run(...) in test mode. When running in test mode, os.Exit is not called on errors.