cmd

package
v0.3.1-0...-218028b Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgValidatorAssetOrP

func ArgValidatorAssetOrP(cmd *cobra.Command, arg string) error

ArgValidatorAssetAndAll checks for valid asset or 'all'

func ArgValidatorECAddress

func ArgValidatorECAddress(cmd *cobra.Command, arg string) error

ArgValidatorECAddress checks for EC address

func ArgValidatorFCTAddress

func ArgValidatorFCTAddress(cmd *cobra.Command, arg string) error

ArgValidatorFCTAddress checks for FCT address

func ArgValidatorFCTAmount

func ArgValidatorFCTAmount(cmd *cobra.Command, arg string) error

func CombineCobraArgs

func CombineCobraArgs(funcs ...cobra.PositionalArgs) cobra.PositionalArgs

CombineCobraArgs allows the combination of multiple PositionalArgs

func CustomArgOrderValidationBuilder

func CustomArgOrderValidationBuilder(strict bool, valids ...func(cmd *cobra.Command, args string) error) cobra.PositionalArgs

CustomArgOrderValidationBuilder return an arg validator. The arg validator will validate cli arguments based on the validation functions provided in the order of the validation functions.

Params:
	strict		Enforce the number of args == number of validation funcs
	valids		Validation functions

func Execute

func Execute()

Execute is cobra's entry point

func FactoidToFactoshi

func FactoidToFactoshi(amt string) (uint64, error)

FactoidToFactoshi is taken from the factom lib, but errors when extra decimals provided

func FactoshiToFactoid

func FactoshiToFactoid(i int64) string

FactoshiToFactoid converts a uint64 factoshi amount into a fixed point number represented as a string

func ReadConfig

func ReadConfig(cmd *cobra.Command, args []string)

ReadConfig can be put as a PreRun for a command that uses the config file

func SoftReadConfig

func SoftReadConfig(cmd *cobra.Command, args []string)

SoftReadConfig will not fail. It can be used for a command that needs the config, but is happy with the defaults

func Transfer

func Transfer(fromAddr, asset, amt, toAddr string, fsAddr factom.FsAddress, esAddr factom.EsAddress) (error, string, string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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