Documentation ¶
Index ¶
- Constants
- Variables
- func BuildReportLink(stackID string) string
- func HTTPRequest(data HTTPRequestType) *http.Response
- func HTTPRequestMultipart(data HTTPRequestType, w *multipart.Writer, buf *bytes.Buffer) *http.Response
- func MinimumArgs(n int, msg string) cobra.PositionalArgs
- type FlagError
- type GenericPayload
- type HTTPRequestType
Constants ¶
View Source
const ( CRDAHost string = "https://gw.api.openshift.io" CRDAAuthToken string = "207c527cfc2a6b8dcf4fa43ad7a976da" Debug bool = false ActualHost string = "https://recommender.api.openshift.io" )
Flag Defaults
Variables ¶
View Source
var ErrorSilent = errors.New("SilentError")
ErrorSilent is an error that triggers exit code 1 without any error messaging
Functions ¶
func BuildReportLink ¶
BuildReportLink builds stack report UI Link
func HTTPRequest ¶
func HTTPRequest(data HTTPRequestType) *http.Response
HTTPRequest is generic method for HTTP Requests to server
func HTTPRequestMultipart ¶
func HTTPRequestMultipart(data HTTPRequestType, w *multipart.Writer, buf *bytes.Buffer) *http.Response
HTTPRequestMultipart is generic method for HTTP Multipart Requests to server
func MinimumArgs ¶
func MinimumArgs(n int, msg string) cobra.PositionalArgs
MinimumArgs validates for Minimum arg in cmd
Types ¶
type FlagError ¶
type FlagError struct {
Err error
}
FlagError is the kind of error raised in flag processing
type GenericPayload ¶
type GenericPayload interface{}
GenericPayload is Generic Interface of Request Payload
type HTTPRequestType ¶
type HTTPRequestType struct { Payload GenericPayload `json:"payload,omitempty"` Method string `json:"method,omitempty"` Endpoint string `json:"endpoint,omitempty"` ThreeScaleToken string `json:"threeScale,omitempty"` Host string `json:"host,omitempty"` UserID string `json:"user_id,omitempty"` Client string `json:"client,omitempty"` }
HTTPRequestType is request type HTTPRequest Method accepts
Click to show internal directories.
Click to hide internal directories.