Documentation ¶
Index ¶
- Constants
- func ArgsToJSON(args []string) []interface{}
- func CheckAndConvertInt(num string, name string) int
- func CheckAndConvertInt64(num string, name string) int64
- func CheckArguments(cmd *cobra.Command, args []string, min int, max int)
- func CheckIntegerBounds(cmd *cobra.Command, name string, val int, min int, max int)
- func CheckLoad()
- func ClientNotSupported(client string)
- func CreateAuthNHeader() (string, error)
- func CreateTable() error
- func Delete(key string) error
- func Exists(key string) bool
- func FlagNotProvidedError(cmd *cobra.Command, flagName string)
- func GetAsBool(input string) (bool, error)
- func GetBoolFlagValue(cmd *cobra.Command, flag string) bool
- func GetFloat64FlagValue(cmd *cobra.Command, flag string) float64
- func GetIntFlagValue(cmd *cobra.Command, flag string) int
- func GetP(key string, v interface{}) error
- func GetStringFlagValue(cmd *cobra.Command, flag string) string
- func HttpRequest(method string, url string, bodyData string) ([]byte, error)
- func InvalidArgument(arg string)
- func InvalidInteger(name string, value string, fatal bool)
- func IsTTY() bool
- func JsonRpcCall(method string, params interface{}) (interface{}, error)
- func JsonRpcCallAndPrint(method string, params interface{})
- func JsonRpcCallP(method string, params interface{}, out interface{}) error
- func JwtHTTPRequest(method string, url string, bodyData string) (string, error)
- func MalformedUsageError(cmd *cobra.Command, err interface{})
- func OptionListPrompt(msg string, options []string) int
- func ParseIntToStringSlice(vals []string) (map[int][]string, error)
- func PartialCommand(cmd *cobra.Command, args []string)
- func Prettyp(s string) string
- func Prettypi(i interface{}) string
- func Print(i interface{})
- func PrintErrorFatal(err interface{})
- func PrintStringError(err string)
- func Printf(format string, a ...interface{})
- func ReadTestnetStore(name string, outptr interface{}) error
- func RequireFlags(cmd *cobra.Command, flags ...string)
- func Set(key string, value interface{}) error
- func UnrollStringSliceToMapIntString(slices []string, delim string) (map[int]string, []string, error)
- func UnrollStringSliceToMapStringString(slices []string, delim string) (map[string]string, error)
- func Write(path string, data []byte) error
- func WriteTestnetStore(name string, in interface{}) error
- func YesNoPrompt(msg string) bool
- type Config
- type SshClient
Constants ¶
View Source
const ( NoMaxArgs = -1 ErrNoPreviousBuild = "No previous build found" )
Variables ¶
This section is empty.
Functions ¶
func ArgsToJSON ¶ added in v1.8.17
func ArgsToJSON(args []string) []interface{}
func CheckAndConvertInt ¶
func CheckAndConvertInt64 ¶
func CheckIntegerBounds ¶
func ClientNotSupported ¶
func ClientNotSupported(client string)
func CreateAuthNHeader ¶ added in v1.7.1
func CreateTable ¶ added in v1.8.17
func CreateTable() error
func FlagNotProvidedError ¶ added in v1.8.17
func GetBoolFlagValue ¶ added in v1.8.17
func GetFloat64FlagValue ¶ added in v1.8.17
func GetP ¶ added in v1.8.17
GetP fetches the value of key and returns it to v, v should be a pointer
func GetStringFlagValue ¶ added in v1.8.17
func HttpRequest ¶
Sends an http request and returns the body. Gives an error if the http request failed or returned a non success code.
func InvalidArgument ¶
func InvalidArgument(arg string)
func InvalidInteger ¶
func JsonRpcCall ¶ added in v1.8.17
func JsonRpcCallAndPrint ¶ added in v1.8.17
func JsonRpcCallAndPrint(method string, params interface{})
func JsonRpcCallP ¶ added in v1.8.17
func JwtHTTPRequest ¶ added in v1.7.1
JwtHTTPRequest is similar to HttpRequest, but it have the content-type set as application/json and it will put the given jwt in the auth header
func MalformedUsageError ¶ added in v1.8.17
func OptionListPrompt ¶ added in v1.8.17
func ParseIntToStringSlice ¶ added in v1.8.17
func PartialCommand ¶
func PrintErrorFatal ¶
func PrintErrorFatal(err interface{})
func PrintStringError ¶
func PrintStringError(err string)
func ReadTestnetStore ¶ added in v1.8.17
func RequireFlags ¶ added in v1.8.17
func UnrollStringSliceToMapIntString ¶ added in v1.6.3
func UnrollStringSliceToMapStringString ¶ added in v1.6.3
func Write ¶
Write writes data to a file, creating it if it doesn't exist, deleting and recreating it if it does.
func WriteTestnetStore ¶ added in v1.8.17
func YesNoPrompt ¶
Types ¶
type Config ¶ added in v1.8.9
type Config struct { APIURL string `mapstructure:"apiURL"` Verbosity string `mapstructure:"verbosity"` HTTPTimeout int64 `mapstructure:"httpTimeout"` HTTPRetries int `mapstructure:"httpRetries"` StoreDirectory string `mapstructure:"storeDirectory"` ServerAddr string `mapstructure:"serverAddr"` CheckLoad bool `mapstructure:"checkLoad"` LoadWarnThreshold float64 `mapstructure:"loadWarnThreshold"` MaxConns int64 `mapstructure:"maxConns"` RPCRetries int `mapstructure:"rpcRetries"` SSHPrivateKey string `mapstructure:"sshPrivateKey"` SSHBinary string `mapstructure:"sshBinary"` }
Config groups all of the global configuration parameters into a single struct
Click to show internal directories.
Click to hide internal directories.