# Functions
AppendTrackResponses is aimed to be used while testing to add the tracking responses as a successful plan, it assumes that there's 1 retry performed by the client.
AskForConfirmation scans the stdin for "y" or "yes" (case insensitive).
DashesToUnderscore returns an underscore separated string converted from dash separated form.
FieldsOfStruct returns a list of the kebabcased struct property names that have the tag `kebabcase:"description"` set.
GetTimeoutFromSize computes a time.Duration from the size, if the computed value is smaller than the minimum timeout that is returned instead.
Min returns the minimum of two int8.
NewFailedPlanUnknown returns a mocked response from a failed plan.
NewMockTrackChangeParams creates new tracking params for test purposes.
NewSuccessfulCurrentPlan returns a mocked response from a successful plan.
RandomString generates a random strings with a defined length.
ReadMFAToken reads an MFA token.
Set will populate a property from its dashed version to the specified value i.e.
SetClusterTracking modifies the TrackChangeParams to track a specific id and kind ignoring downstream changes.
SetRawJSON prepares the API transport to send raw JSON
While setting the global JSONMime producer to runtime.TextProducer() looks scary, runtime.TextProducer() falls back on swag.WriteJSON(data) if the object we're marshalling is a struct or slice.
UnderscoreToDashes returns a dash separated string converted from underscore or camelcase separated form.
UnsetRawJSON un-does what SetRawJSON does :).
# Constants
DefaultClientTimeout client http timeout for console requests.
DefaultESPort is the default port on ES clusters running on cloud.
DefaultIndexPollerRate is the polling interval in seconds for tab-completion on index endpoints.
DefaultPollFrequency is frequency on which the API is polled for updates on pending plans.
DefaultRetries retries for the plan.TrackParams which accounts for the Pending plan not being present in the backend, it will retry the request the times specified here.
InvalidClusterID holds an invalid valid cluster id value.
ValidClusterID holds a valid cluster id value.
ValidDuration holds a valid duration value.
# Variables
ErrAPIReq is the message returned when API reference is required for a command.
ErrDeploymentID is the message returned when a provided cluster id is not of the expected length (32 chars).
SkipMaintenanceHeaders tells the EC proxy layer to still send requests to the underlying cluster instances even if they are in maintenance mode.
# Interfaces
Validator interface is mostly used for parameter structures that need to check a set of conditions and act as a gate before running expensive external calls.