Documentation ¶
Index ¶
- Constants
- func ArgValidatorAddress(flag uint8) func(cmd *cobra.Command, arg string) error
- func ArgValidatorAssetOrP(cmd *cobra.Command, arg string) error
- func ArgValidatorECAddress(cmd *cobra.Command, arg string) error
- func ArgValidatorFCTAddress(cmd *cobra.Command, arg string) error
- func ArgValidatorFCTAmount(cmd *cobra.Command, arg string) error
- func CombineCobraArgs(funcs ...cobra.PositionalArgs) cobra.PositionalArgs
- func CustomArgOrderValidationBuilder(strict bool, valids ...func(cmd *cobra.Command, args string) error) cobra.PositionalArgs
- func Execute()
- func FactoidToFactoshi(amt string) (uint64, error)
- func FactoshiToFactoid(i int64) string
- func ReadConfig(cmd *cobra.Command, args []string)
- func SoftReadConfig(cmd *cobra.Command, args []string)
Constants ¶
const ( // Flags ADD_ANY = ^uint8(0) // Indicates all address types (all bits set) ADD_FA uint8 = 1 << iota ADD_Fs ADD_EC ADD_Es ADD_Fe ADD_FE ADD_ETHS )
Variables ¶
This section is empty.
Functions ¶
func ArgValidatorAddress ¶ added in v0.5.0
func ArgValidatorAssetOrP ¶
ArgValidatorAssetAndAll checks for valid asset or 'all'
func ArgValidatorECAddress ¶ added in v0.2.1
ArgValidatorECAddress checks for EC address
func ArgValidatorFCTAddress ¶ added in v0.2.1
ArgValidatorFCTAddress checks for FCT address
func ArgValidatorFCTAmount ¶ added in v0.2.1
func CombineCobraArgs ¶ added in v0.2.1
func CombineCobraArgs(funcs ...cobra.PositionalArgs) cobra.PositionalArgs
CombineCobraArgs allows the combination of multiple PositionalArgs
func CustomArgOrderValidationBuilder ¶ added in v0.2.1
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 FactoidToFactoshi ¶
FactoidToFactoshi is taken from the factom lib, but errors when extra decimals provided
func FactoshiToFactoid ¶
FactoshiToFactoid converts a uint64 factoshi amount into a fixed point number represented as a string
func ReadConfig ¶
ReadConfig can be put as a PreRun for a command that uses the config file
func SoftReadConfig ¶
SoftReadConfig will not fail. It can be used for a command that needs the config, but is happy with the defaults
Types ¶
This section is empty.