Documentation ¶
Index ¶
- Variables
- func BuildRequestPayload(signature string, payload map[string]interface{}) *bytes.Buffer
- func DebugDumpJSON(msg string, d interface{})
- func DebugDumpViper()
- func DisplayProfileData()
- func FailOnError(err error)
- func FailOnErrorWithMessage(err error, message string)
- func FileHash(filePath string) (string, error)
- func IsWSL() (bool, error)
- func LogTime(operation string)
- func Pluralize(base string, count int) string
- func SendRequest(signature string, method string, sendRequestTo url.URL, payload *bytes.Buffer) (*http.Response, error)
- func ShowError(err error)
- func ShowErrorWithMessage(err error, message string)
- func ShowSpinner(msg string) *spinner.Spinner
- func ShowWarning(warning string)
- func StartSpinnerAfterDelay(msg string, delay time.Duration, cancelStartIf chan bool) *spinner.Spinner
- func StopSpinner(spinner *spinner.Spinner)
- func StopSpinnerWithMessage(spinner *spinner.Spinner, finalMsg string)
- func StringHash(s string) uint32
- func UpdateSpinnerMessage(spinner *spinner.Spinner, newMessage string)
- type ExitCode
- type InteractiveExitStatus
Constants ¶
This section is empty.
Variables ¶
var Timing []timeLog
Functions ¶
func BuildRequestPayload ¶ added in v0.2.0
BuildRequestPayload :: merges the provided payload with the standard payload that needs to be sent
func DebugDumpJSON ¶ added in v0.3.0
func DebugDumpJSON(msg string, d interface{})
functions specifically used for Debugging purposes.
func DebugDumpViper ¶ added in v0.3.0
func DebugDumpViper()
func DisplayProfileData ¶
func DisplayProfileData()
func FailOnError ¶
func FailOnError(err error)
func FailOnErrorWithMessage ¶
func IsWSL ¶ added in v0.2.0
IsWSL :: detects whether app is running in WSL environment refer to: https://github.com/Microsoft/WSL/issues/423#issuecomment-679190758
func Pluralize ¶ added in v0.2.2
Pluralize :: pluralizes a word (if applicable) based on provided count
func SendRequest ¶ added in v0.2.0
func SendRequest(signature string, method string, sendRequestTo url.URL, payload *bytes.Buffer) (*http.Response, error)
SendRequest ::
func ShowErrorWithMessage ¶
func ShowSpinner ¶
ShowSpinner :: create a spinner with a given message and start
func ShowWarning ¶
func ShowWarning(warning string)
func StartSpinnerAfterDelay ¶ added in v0.1.1
func StartSpinnerAfterDelay(msg string, delay time.Duration, cancelStartIf chan bool) *spinner.Spinner
StartSpinnerAfterDelay :: create a spinner with a given message and start
func StopSpinner ¶
StopSpinner :: stops a spinner instance and clears it
func StopSpinnerWithMessage ¶
StopSpinnerWithMessage :: stops a spinner instance and clears it, after writing `finalMsg`
func StringHash ¶
func UpdateSpinnerMessage ¶ added in v0.1.1
UpdateSpinnerMessage :: updates the message on the right of the given spinner
Types ¶
type InteractiveExitStatus ¶
InteractiveExitStatus :: exist status from the interative prompt
We exit go-prompt after every query (in order to manage the prompt history to only include complete queries) We therefore need to distinguish between:
a user requested exit (ctrl+D or .exit) - indicated by a non-nil exit code and restart=false and a value , go-prompt being terminated after a query completion and requiring restarting - indicated by restart=true