Documentation ¶
Index ¶
- Variables
- func BuildRequestPayload(signature string, payload map[string]interface{}) *bytes.Buffer
- func CombineErrors(errors ...error) error
- func CombineErrorsWithPrefix(prefix string, errors ...error) error
- func DebugDumpJSON(msg string, d interface{})
- func DebugDumpViper()
- func DisplayProfileData()
- func EnsureDirectoryPermission(directoryPath string) error
- func FailOnError(err error)
- func FailOnErrorWithMessage(err error, message string)
- func FileHash(filePath string) (string, error)
- func FindProcess(targetPid int) (*psutils.Process, error)
- func GetMD5Hash(text string) string
- func HandleCancelError(err error) error
- func IsCancelledError(err error) bool
- func IsContextCancelled(ctx context.Context) bool
- func IsWSL() (bool, error)
- func LogTime(operation string)
- func PidExists(targetPid int) (bool, error)
- func Pluralize(base string, count int) string
- func PrefixError(err error, prefix string) error
- func RemoveDirectoryContents(removePath string) error
- 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 ShowWarning(warning string)
- func StringHash(s string) uint32
- func ToStringPointer(s string) *string
- func TransformErrorToSteampipe(err error) error
- type ExitCode
- type FileWatcher
- type InteractiveExitStatus
- type LifecycleEvent
- type LifecycleTimer
- type WatcherOptions
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 CombineErrors ¶ added in v0.6.0
func CombineErrorsWithPrefix ¶ added in v0.6.0
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 EnsureDirectoryPermission ¶ added in v0.7.0
func FailOnError ¶
func FailOnError(err error)
func FailOnErrorWithMessage ¶
func GetMD5Hash ¶ added in v0.8.0
func HandleCancelError ¶ added in v0.7.0
HandleCancelError modifies a context.Canceled error into a readable error that can be printed on the console
func IsCancelledError ¶ added in v0.8.0
func IsContextCancelled ¶ added in v0.8.0
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 PidExists ¶ added in v0.10.0
PidExists scans through the list of PIDs in the system and checks for the `targetPID`.
PidExists uses iteration, instead of signalling, since we have observed that signalling does not always work reliably when the destination of the signal is a child of the source of the signal - which may be the case then starting implicit services
func Pluralize ¶ added in v0.2.2
Pluralize :: pluralizes a word (if applicable) based on provided count
func PrefixError ¶ added in v0.7.0
func RemoveDirectoryContents ¶ added in v0.7.0
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 ¶
ShowErrorWithMessage displays the given error nicely with the given message
func ShowWarning ¶
func ShowWarning(warning string)
func StringHash ¶
func ToStringPointer ¶ added in v0.5.0
ToStringPointer converts a string into its pointer
func TransformErrorToSteampipe ¶ added in v0.6.0
TransformErrorToSteampipe removes the pq: and rpc error prefixes along with all the unnecessary information that comes from the drivers and libraries
Types ¶
type FileWatcher ¶ added in v0.4.0
type FileWatcher struct {
// contains filtered or unexported fields
}
func NewWatcher ¶ added in v0.4.0
func NewWatcher(opts *WatcherOptions) (*FileWatcher, error)
func (*FileWatcher) Close ¶ added in v0.4.0
func (w *FileWatcher) Close()
type InteractiveExitStatus ¶
type InteractiveExitStatus struct { // TODO remove altogether ExitCode int }
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
type LifecycleEvent ¶ added in v0.10.0
type LifecycleTimer ¶ added in v0.10.0
type LifecycleTimer struct {
// contains filtered or unexported fields
}
LifecycleTimer records the time for lifecycle events
func NewLifecycleTimer ¶ added in v0.10.0
func NewLifecycleTimer() *LifecycleTimer
func (*LifecycleTimer) Add ¶ added in v0.10.0
func (r *LifecycleTimer) Add(event string)
func (LifecycleTimer) GetDuration ¶ added in v0.10.0
func (r LifecycleTimer) GetDuration() time.Duration
GetDuration returns the duration between two events - if both exist