package
2.8.0-3.2.1+incompatible
Repository: https://github.com/mesosphere/dcos-commons.git
Documentation: pkg.go.dev

# Functions

CheckHTTPResponse checks the HTTP response and the returned error, then returns the response payload and/or a better user-facing error.
CreateHTTPRawRequest creates an HTTP request.
CreateHTTPURLRequest creates a HTTP url request which includes cluster auth headers as needed.
CreateServiceHTTPDataRequest creates a service HTTP data request.
CreateServiceHTTPJSONRequest creates a service HTTP JSON request.
CreateServiceHTTPQueryRequest creates a service HTTP query request.
CreateServiceHTTPRequest creates a service HTTP request.
CreateServiceURL creates a service URL of the form http://clusterurl.com/service/<servicename>/<urlPath>[?urlQuery].
CreateURL creates a URL of the form <baseURL>/<urlPath>[?urlQuery].
FormatList outputs the provided entries as a list: - foo - bar ...
GetDCOSURL gets the DC/OS cluster URL in the form of "http://cluster-host.com".
HTTPCosmosPostJSON triggers a HTTP POST request containing jsonPayload to https://dcos.cluster/cosmos/service/<urlPath>.
HTTPQuery does a HTTP query, returning the response if it's successful, or an error otherwise.
HTTPServiceDelete triggers a HTTP DELETE request to: <config.DcosURL>/service/<config.ServiceName>/<urlPath>.
HTTPServiceDeleteData triggers a HTTP DELETE request with a payload of contentType to: <config.DcosURL>/service/<config.ServiceName>/<urlPath>.
HTTPServiceDeleteJSON triggers a HTTP DELETE request containing jsonPayload to: <config.DcosURL>/service/<config.ServiceName>/<urlPath>.
HTTPServiceDeleteQuery triggers a HTTP DELETE request with query parameters to: <config.DcosURL>/service/<config.ServiceName>/<urlPath>?<urlQuery>.
HTTPServiceGet triggers a HTTP GET request to: <config.DcosURL>/service/<config.ServiceName>/<urlPath>.
HTTPServiceGetData triggers a HTTP GET request with a payload of contentType to: <config.DcosURL>/service/<config.ServiceName>/<urlPath>.
HTTPServiceGetJSON triggers a HTTP GET request containing jsonPayload to: <config.DcosURL>/service/<config.ServiceName>/<urlPath>.
HTTPServiceGetQuery triggers a HTTP GET request with query parameters to: <config.DcosURL>/service/<config.ServiceName><urlPath>?<urlQuery>.
HTTPServicePost triggers a HTTP POST request to: <config.DcosURL>/service/<config.ServiceName>/<urlPath>.
HTTPServicePostData triggers a HTTP POST request with a payload of contentType to: <config.DcosURL>/service/<config.ServiceName>/<urlPath>.
HTTPServicePostJSON triggers a HTTP POST request containing jsonPayload to: <config.DcosURL>/service/<config.ServiceName>/<urlPath>.
HTTPServicePostQuery triggers a HTTP POST request with query parameters to: <config.DcosURL>/service/<config.ServiceName><urlPath>?<urlQuery>.
HTTPServicePut triggers a HTTP PUT request to: <config.DcosURL>/service/<config.ServiceName>/<urlPath>.
HTTPServicePutData triggers a HTTP PUT request with a payload of contentType to: <config.DcosURL>/service/<config.ServiceName>/<urlPath>.
HTTPServicePutJSON triggers a HTTP PUT request containing jsonPayload to: <config.DcosURL>/service/<config.ServiceName>/<urlPath>.
HTTPServicePutQuery triggers a HTTP PUT request with query parameters to: <config.DcosURL>/service/<config.ServiceName><urlPath>?<urlQuery>.
OptionalCLIConfigValue retrieves the CLI configuration for name.
PrintJSONBytes pretty prints responseBytes assuming it is valid JSON.
PrintResponseText prints out a byte array as text.
PrintVerbose prints a message using PrintMessage iff config.Verbose is enabled.
RequiredCLIConfigValue gets config values from the DC/OS CLI.
RunCLICommand runs a DC/OS CLI command.
SetCustomResponseCheck sets a custom responseCheck that can be used for more advanced handling of HTTP responses.

# Variables

PrintMessage is a placeholder function that wraps a call to fmt.Println(fmt.Sprintf()) to allow assertions against captured output.