Documentation
¶
Index ¶
- Constants
- Variables
- func Abort(message string, errorCode int)
- func AbortForCommand(cmd *cobra.Command, cliError *CliError)
- func AbortForCommandWithSubResource(cmd *cobra.Command, cliError *CliError, subResource, operation string)
- func AbortWithUsageAndMessage(cmd *cobra.Command, message string, errorCode int)
- func ByteArrayToStruct(byt []byte, objPtr interface{})
- func CamelToTitle(inp string) string
- func CapsToTitle(inp string) string
- func ContainsIgnoreCase(a string, b string) bool
- func ContainsInArray(array []string, inputString string) bool
- func ConvertBooleanToYesOrNo(input bool) string
- func FormatTime(inputTime string) string
- func GetApiErrorMessagesForCommand(cmd *cobra.Command, apiError ApiError, subResource, operation string) []string
- func GetApiSubErrorMessagesForCommand(cmd *cobra.Command, apiSubError []ApiSubError, ...) []string
- func GetErrorMessageForArg(cmd *cobra.Command, errorType, argKeyInJson string) string
- func GetErrorMessageForFlag(cmd *cobra.Command, errorType, flagKeyInJson string) string
- func GetGlobalErrorMessage(key string) string
- func GetGlobalFallBackMessage() string
- func GetMessageForKey(baseCmdPath *cobra.Command, key string) string
- func GetPlaceHoldersInString(errorMessage, regex string) []string
- func InitLoggingConfig()
- func PrintCurlResponse(curlResponse CurlResponse)
- func PrintDigResponse(digResponse DigResponse)
- func PrintError(message string, args ...interface{})
- func PrintFailedIps(failedIps []string, failedIpsMessage string)
- func PrintGtmHostnamesTable(gtmPropertyContainer GtmPropertyContainer)
- func PrintGtmTestTargetIpTable(gtmPropertyIpsContainer GtmPropertyIpsContainer)
- func PrintHeader(message string, args ...interface{})
- func PrintIpaHostnamesTable(ipaHostnamesResponse IpaHostnameResponse)
- func PrintLocateIpResponse(geoLocation GeoLocation, ip string)
- func PrintLocateIpsResponse(verifyLocateIpsResponse VerifyLocateIpsResponse, failedIpsMessage string)
- func PrintMtrResponse(mtrRequest MtrRequest, mtrResponse MtrResponse)
- func PrintSuccess(message string, args ...interface{})
- func PrintSuggestedActions(suggestedActions []string)
- func PrintTranslateUrlResponse(arlContainer ArlContainer)
- func PrintUserDiagnosticsDataGroupDetails(userDiagnosticsDataGroupDetails UserDiagnosticsDataGroupDetails)
- func PrintUserDiagnosticsDataGroupDetailsAfterCreate(userDiagnosticsDataGroupDetails UserDiagnosticsDataGroupDetails)
- func PrintUserDiagnosticsDataGroupDetailsTable(groupsList []UserDiagnosticsDataGroupDetails)
- func PrintVerifyIpResponse(verifyLocateIpResponse VerifyLocateIpResponse)
- func PrintVerifyIpsResponse(verifyLocateIpsResponse VerifyLocateIpsResponse, failedIpsMessage string)
- func PrintWarning(message string, args ...interface{})
- func ReadStdin() []byte
- func ShowTable(tableHeaders []string, tableContents [][]string)
- func SplitCurlHeaderString(responseHeaderString string) string
- func StartSpinner(message string) *spinner.Spinner
- func StopSpinner(s *spinner.Spinner, success bool)
- type ApiClient
- func (api ApiClient) ConnectivityProblemsGet(link string) (*[]byte, *CliError)
- func (api ApiClient) ConnectivityProblemsPost(connectivityProblemsRequest ConnectivityProblemsRequest) (*[]byte, *CliError)
- func (api ApiClient) ContentProblemsGet(link string) (*[]byte, *CliError)
- func (api ApiClient) ContentProblemsPost(contentProblemsRequest ContentProblemsRequest) (*[]byte, *CliError)
- func (api ApiClient) Curl(curlRequest CurlRequest) (*[]byte, *CliError)
- func (api ApiClient) Dig(digRequest DigRequest) (*[]byte, *CliError)
- func (api ApiClient) EdgeLocations() (*[]byte, *CliError)
- func (api ApiClient) Estats(estatsRequest EstatsRequest) (*[]byte, *CliError)
- func (api ApiClient) GrepGet(link string) (*[]byte, *CliError)
- func (api ApiClient) GrepPost(grepRequest GrepRequest) (*[]byte, *CliError)
- func (api ApiClient) GtmHostnames() (*[]byte, *CliError)
- func (api ApiClient) GtmTestTargetIp(property string, domain string) (*[]byte, *CliError)
- func (api ApiClient) IpaHostnames() (*[]byte, *CliError)
- func (api ApiClient) LocateIp(locateIpsRequest VerifyLocateIpsRequest) (*[]byte, *CliError)
- func (api ApiClient) Mtr(mtrRequest MtrRequest) (*[]byte, *CliError)
- func (api ApiClient) TranslateErrorGet(link string) (*[]byte, *CliError)
- func (api ApiClient) TranslateErrorPost(errorTranslatorRequest ErrorTranslatorRequest) (*[]byte, *CliError)
- func (api ApiClient) TranslateUrl(arlRequest ArlRequest) (*[]byte, *CliError)
- func (api ApiClient) UrlHealthCheckGet(link string) (*[]byte, *CliError)
- func (api ApiClient) UrlHealthCheckPost(urlHealthCheckRequest UrlHealthCheckRequest) (*[]byte, *CliError)
- func (api ApiClient) UserDiagnosticsCreate(userDiagnosticsDataRequest UserDiagnosticsDataRequest) (*[]byte, *CliError)
- func (api ApiClient) UserDiagnosticsGet(linkId string, mtr, dig, curl bool) (*[]byte, *CliError)
- func (api ApiClient) UserDiagnosticsList(urlFilter, user string, active bool) (*[]byte, *CliError)
- func (api ApiClient) VerifyIp(verifyIpsRequest VerifyLocateIpsRequest) (*[]byte, *CliError)
- func (api ApiClient) VerifyLocateIp(verifyLocateIpRequest VerifyLocateIpRequest) (*[]byte, *CliError)
- type ApiError
- type ApiSubError
- type Arl
- type ArlContainer
- type ArlOutput
- type ArlRequest
- type CliError
- type ConnectivityProblemsRequest
- type ConnectivityProblemsResponse
- type ContentProblemsRequest
- type ContentProblemsResponse
- type CurlOutput
- type CurlRequest
- type CurlResponse
- type DigInfo
- type DigRequest
- type DigResponse
- type DnsRecord
- type EdgeGridHttpClient
- type EdgeIpInfo
- type EdgeIpLocation
- type EdgeLocation
- type EdgeLocationContainer
- type ErrorTranslatorRequest
- type ErrorTranslatorResponse
- type EstatsData
- type EstatsGrepResponse
- type EstatsRequest
- type EstatsResult
- type EstatsResultWrapper
- type GTMPropertyIps
- type GeoLocation
- type GrepRequest
- type GrepResponse
- type GtmProperty
- type GtmPropertyContainer
- type GtmPropertyIpsContainer
- type HttpStatusCode
- type IpaHostnameResponse
- type Legend
- type ListResponse
- type LogsContainer
- type MtrHop
- type MtrRequest
- type MtrResponse
- type MtrResult
- type ObjectStatus
- type Service
- func (svc Service) ConnectivityProblems(connectivityProblemsRequest ConnectivityProblemsRequest)
- func (svc Service) ContentProblems(contentProblemsRequest ContentProblemsRequest)
- func (svc Service) Curl(curlRequest CurlRequest)
- func (svc Service) Dig(digRequest DigRequest)
- func (svc Service) EdgeLocations(searchText string)
- func (svc Service) Estats(estatsRequest EstatsRequest, logsEstatsFlag bool)
- func (svc Service) Grep(grepRequest GrepRequest)
- func (svc Service) GtmHostnames()
- func (svc Service) GtmTestTargetIp(hostname string)
- func (svc Service) IpaHostnames()
- func (svc Service) LocateIp(locateIpsRequest VerifyLocateIpsRequest)
- func (svc Service) Mtr(mtrRequest MtrRequest)
- func (svc Service) TranslateError(errorTranslatorRequest ErrorTranslatorRequest)
- func (svc Service) TranslateUrl(arlRequest ArlRequest)
- func (svc Service) UrlHealthCheck(urlHealthCheckRequest UrlHealthCheckRequest)
- func (svc Service) UserDiagnosticsCreate(userDiagnosticsDataRequest UserDiagnosticsDataRequest)
- func (svc Service) UserDiagnosticsGet(linkId string, mtr, dig, curl bool)
- func (svc Service) UserDiagnosticsList(url, user string, active bool)
- func (svc Service) VerifyIp(verifyIpsRequest VerifyLocateIpsRequest)
- func (svc Service) VerifyLocateIp(verifyLocateIpRequest VerifyLocateIpRequest)
- type StatusCodeDistribution
- type Timing
- type UrlHealthCheckRequest
- type UrlHealthCheckResponse
- type UserDiagnosticsDataGroupDetails
- type UserDiagnosticsDataRequest
- type Validator
- func (validator Validator) ValidateConnectivityProblemsFields(args []string, portStr string, ...)
- func (validator Validator) ValidateContentProblemsFields(args []string, contentProblemsRequest *ContentProblemsRequest)
- func (validator Validator) ValidateCurlFields(args []string, curlRequest *CurlRequest)
- func (validator Validator) ValidateDigFields(args []string, digRequest *DigRequest)
- func (validator Validator) ValidateEstatsFields(args []string, estatsRequest *EstatsRequest, ...)
- func (validator Validator) ValidateGrepFields(args []string, grepRequest *GrepRequest, ...)
- func (validator Validator) ValidateIpVersionFlag(ipVersion *string, field string, required bool)
- func (validator Validator) ValidateMtrFields(args []string, portStr string, mtrRequest *MtrRequest)
- func (validator Validator) ValidatePacketTypeFlag(packetType *string, field string, required bool)
- func (validator Validator) ValidatePortFlag(port string, portInt *int, field string, required bool)
- func (validator Validator) ValidateTranslateErrorFields(args []string, errorTranslatorRequest *ErrorTranslatorRequest, ...)
- func (validator Validator) ValidateTranslateUrlFields(args []string, translateUrlRequest *ArlRequest)
- func (validator Validator) ValidateUrlHealthCheckFields(args []string, portStr string, urlHealthCheckRequest *UrlHealthCheckRequest, ...)
- func (validator Validator) ValidateUserDiagnosticsCreateFields(args []string, userDiagnosticsDataRequest *UserDiagnosticsDataRequest)
- func (validator Validator) ValidateVerifyIpOrLocateIpFields(args []string, verifyLocateIpsRequest *VerifyLocateIpsRequest)
- func (validator Validator) ValidateVerifyLocateIpFields(args []string, verifyLocateIpRequest *VerifyLocateIpRequest)
- type VerifyLocateIpData
- type VerifyLocateIpRequest
- type VerifyLocateIpResponse
- type VerifyLocateIpsData
- type VerifyLocateIpsRequest
- type VerifyLocateIpsResponse
- type Warning
Constants ¶
const ( Short = "short" Long = "long" Empty = "" Global = "global" Missing = "missing" Exclusive = "exclusive" Invalid = "invalid" Redundant = "redundant" RequestParsingError = "requestParsingError" ResponseParsingError = "responseParsingError" SpinnerMessage = "spinnerMessage" MissingArgs = "missingArgs" FieldsNotRequired = "fieldsNotRequired" DefaultPort = 80 IPV4 = "IPV4" IPV6 = "IPV6" TCP = "TCP" ICMP = "ICMP" FailedIps = "failedIps" )
constant message keys
const ( Get = "GET" Post = "POST" )
HTTP request methods
const ( CliErrExitCode int = 1 CmdErrExitCode int = 2 ParsingErrExitCode int = 3 )
const (
ApplicationJson = "application/json"
)
HTTP header values
const (
ContentType = "Content-Type"
)
HTTP headers
const HttpCodeExitCodeDiff = 300
const (
Search = "search"
)
Edge Locations
const (
TestTargetIp = "testTargetIp"
)
Gtm Hostnames
const (
X_ED_CLIENT_TYPE = "X-ED-CLIENT-TYPE"
)
Variables ¶
var CustomUsageTemplate = `` /* 1040-byte string literal not displayed */
var UsageFuncMap = template.FuncMap{ "bold": bold, "header": header, "italic": italic, "capsToTitle": CapsToTitle, "green": success, "blue": blue, }
Functions ¶
func AbortForCommand ¶
func ByteArrayToStruct ¶
func ByteArrayToStruct(byt []byte, objPtr interface{})
func CamelToTitle ¶
func CapsToTitle ¶
func ContainsIgnoreCase ¶
Check contains and irrespective of case.
func ContainsInArray ¶
Check contains and irrespective of case.
func ConvertBooleanToYesOrNo ¶
func FormatTime ¶
func GetApiSubErrorMessagesForCommand ¶
func GetApiSubErrorMessagesForCommand(cmd *cobra.Command, apiSubError []ApiSubError, parentErrorKey, subResource, operation string) []string
Get All the error messages for api sub errors
func GetErrorMessageForArg ¶
Get different type of message for positional args
func GetErrorMessageForFlag ¶
Get different type of message for flag
func GetGlobalErrorMessage ¶
Get global errors for given key
func GetMessageForKey ¶
Return message for given key under command.
func GetPlaceHoldersInString ¶
Get all placeholders in string inside {{}}
func InitLoggingConfig ¶
func InitLoggingConfig()
func PrintCurlResponse ¶
func PrintCurlResponse(curlResponse CurlResponse)
func PrintDigResponse ¶
func PrintDigResponse(digResponse DigResponse)
func PrintError ¶
func PrintError(message string, args ...interface{})
Start Standard Print Functions
func PrintFailedIps ¶
func PrintGtmHostnamesTable ¶
func PrintGtmHostnamesTable(gtmPropertyContainer GtmPropertyContainer)
func PrintGtmTestTargetIpTable ¶
func PrintGtmTestTargetIpTable(gtmPropertyIpsContainer GtmPropertyIpsContainer)
func PrintHeader ¶
func PrintHeader(message string, args ...interface{})
func PrintIpaHostnamesTable ¶
func PrintIpaHostnamesTable(ipaHostnamesResponse IpaHostnameResponse)
func PrintLocateIpResponse ¶
func PrintLocateIpResponse(geoLocation GeoLocation, ip string)
func PrintLocateIpsResponse ¶
func PrintLocateIpsResponse(verifyLocateIpsResponse VerifyLocateIpsResponse, failedIpsMessage string)
func PrintMtrResponse ¶
func PrintMtrResponse(mtrRequest MtrRequest, mtrResponse MtrResponse)
func PrintSuccess ¶
func PrintSuccess(message string, args ...interface{})
func PrintSuggestedActions ¶
func PrintSuggestedActions(suggestedActions []string)
func PrintTranslateUrlResponse ¶
func PrintTranslateUrlResponse(arlContainer ArlContainer)
func PrintUserDiagnosticsDataGroupDetails ¶
func PrintUserDiagnosticsDataGroupDetails(userDiagnosticsDataGroupDetails UserDiagnosticsDataGroupDetails)
func PrintUserDiagnosticsDataGroupDetailsAfterCreate ¶
func PrintUserDiagnosticsDataGroupDetailsAfterCreate(userDiagnosticsDataGroupDetails UserDiagnosticsDataGroupDetails)
func PrintUserDiagnosticsDataGroupDetailsTable ¶
func PrintUserDiagnosticsDataGroupDetailsTable(groupsList []UserDiagnosticsDataGroupDetails)
func PrintVerifyIpResponse ¶
func PrintVerifyIpResponse(verifyLocateIpResponse VerifyLocateIpResponse)
func PrintVerifyIpsResponse ¶
func PrintVerifyIpsResponse(verifyLocateIpsResponse VerifyLocateIpsResponse, failedIpsMessage string)
func PrintWarning ¶
func PrintWarning(message string, args ...interface{})
func SplitCurlHeaderString ¶
func StartSpinner ¶
func StopSpinner ¶
Types ¶
type ApiClient ¶
type ApiClient struct {
// contains filtered or unexported fields
}
func NewApiClient ¶
func NewApiClient(client EdgeGridHttpClient) *ApiClient
func (ApiClient) ConnectivityProblemsGet ¶
func (ApiClient) ConnectivityProblemsPost ¶
func (api ApiClient) ConnectivityProblemsPost(connectivityProblemsRequest ConnectivityProblemsRequest) (*[]byte, *CliError)
func (ApiClient) ContentProblemsGet ¶
func (ApiClient) ContentProblemsPost ¶
func (api ApiClient) ContentProblemsPost(contentProblemsRequest ContentProblemsRequest) (*[]byte, *CliError)
func (ApiClient) EdgeLocations ¶
func (ApiClient) Estats ¶
func (api ApiClient) Estats(estatsRequest EstatsRequest) (*[]byte, *CliError)
func (ApiClient) GrepPost ¶
func (api ApiClient) GrepPost(grepRequest GrepRequest) (*[]byte, *CliError)
func (ApiClient) GtmHostnames ¶
func (ApiClient) GtmTestTargetIp ¶
func (ApiClient) IpaHostnames ¶
func (ApiClient) LocateIp ¶
func (api ApiClient) LocateIp(locateIpsRequest VerifyLocateIpsRequest) (*[]byte, *CliError)
func (ApiClient) TranslateErrorGet ¶
func (ApiClient) TranslateErrorPost ¶
func (api ApiClient) TranslateErrorPost(errorTranslatorRequest ErrorTranslatorRequest) (*[]byte, *CliError)
func (ApiClient) TranslateUrl ¶
func (api ApiClient) TranslateUrl(arlRequest ArlRequest) (*[]byte, *CliError)
func (ApiClient) UrlHealthCheckGet ¶
func (ApiClient) UrlHealthCheckPost ¶
func (api ApiClient) UrlHealthCheckPost(urlHealthCheckRequest UrlHealthCheckRequest) (*[]byte, *CliError)
func (ApiClient) UserDiagnosticsCreate ¶
func (api ApiClient) UserDiagnosticsCreate(userDiagnosticsDataRequest UserDiagnosticsDataRequest) (*[]byte, *CliError)
func (ApiClient) UserDiagnosticsGet ¶
func (ApiClient) UserDiagnosticsList ¶
func (ApiClient) VerifyIp ¶
func (api ApiClient) VerifyIp(verifyIpsRequest VerifyLocateIpsRequest) (*[]byte, *CliError)
func (ApiClient) VerifyLocateIp ¶
func (api ApiClient) VerifyLocateIp(verifyLocateIpRequest VerifyLocateIpRequest) (*[]byte, *CliError)
type ApiError ¶
type ApiError struct {
Type string `json:"type"`
Title string `json:"title"`
Status int `json:"status"`
Instance string `json:"instance"`
Detail string `json:"detail"`
Errors []ApiSubError `json:"errors"`
}
ApiError object for API error payloads
type ApiSubError ¶
type ApiSubError struct {
Type string `json:"type"`
Title string `json:"title"`
RequestField string `json:"requestField"`
RequestValues []interface{} `json:"requestValues"`
Detail string `json:"detail"`
}
ApiSubError object represents sub-errors of an error payload or error response in 207
type ArlContainer ¶
type ArlContainer struct {
Request ArlRequest `json:"request"`
TranslatedUrl ArlOutput `json:"translatedUrl"`
}
type ArlRequest ¶
type ArlRequest struct {
Url string `json:"url"`
}
type CliError ¶
type CliError struct {
// contains filtered or unexported fields
}
CliError is used to transmit errors across the app
func CliErrorWithMessage ¶
type ConnectivityProblemsRequest ¶
type ConnectivityProblemsRequest struct {
Url string `json:"url"`
EdgeLocationId string `json:"edgeLocationId,omitempty"`
SpoofEdgeIp string `json:"spoofEdgeIp,omitempty"`
ClientIp string `json:"clientIp,omitempty"`
RequestHeaders []string `json:"requestHeaders,omitempty"`
IpVersion string `json:"ipVersion,omitempty"`
PacketType string `json:"packetType,omitempty"`
Port int `json:"port,omitempty"`
RunFromSiteShield bool `json:"runFromSiteShield,omitempty"`
}
type ContentProblemsRequest ¶
type ContentProblemsRequest struct {
Url string `json:"url"`
EdgeLocationId string `json:"edgeLocationId,omitempty"`
EdgeIp string `json:"spoofEdgeIp,omitempty"`
RequestHeaders []string `json:"requestHeaders,omitempty"`
IpVersion string `json:"ipVersion,omitempty"`
RunFromSiteShield bool `json:"runFromSiteShield,omitempty"`
}
type ContentProblemsResponse ¶
type CurlOutput ¶
type CurlOutput struct {
HttpStatusCode int `json:"httpStatusCode"`
ResponseHeaders map[string]string `json:"responseHeaders"`
Timing Timing `json:"timing,omitempty"`
ResponseBody string `json:"responseBody"`
ResponseHeaderList []string `json:"responseHeaderList"`
HttpVersion string `json:"httpVersion"`
ReasonPhrase string `json:"reasonPhrase"`
PartialSuccess bool `json:"partialSuccess"`
}
type CurlRequest ¶
type CurlRequest struct {
Url string `json:"url"`
EdgeIp string `json:"edgeIp,omitempty"`
EdgeLocationId string `json:"edgeLocationId,omitempty"`
IpVersion string `json:"ipVersion,omitempty"`
RequestHeaders []string `json:"requestHeaders,omitempty"`
RunFromSiteShield bool `json:"runFromSiteShield,omitempty"`
}
CurlRequest
type CurlResponse ¶
type CurlResponse struct {
Request CurlRequest `json:"request"`
CreatedBy string `json:"createdBy"`
CreatedTime string `json:"createdTime"`
CompletedTime string `json:"completedTime"`
ExecutionStatus string `json:"executionStatus"`
InternalIp string `json:"internalIp"`
EdgeIpLocation EdgeIpLocation `json:"edgeIpLocation"`
SiteShieldIp string `json:"siteShieldIp"`
SiteShieldIpLocation EdgeIpLocation `json:"siteShieldIpLocation"`
CurlOutput CurlOutput `json:"result"`
SuggestedActions []string `json:"suggestedActions"`
Warning Warning `json:"warning"`
}
type DigRequest ¶
type DigRequest struct {
Hostname string `json:"hostname"`
QueryType string `json:"queryType"`
ClientLocation string `json:"edgeLocationId,omitempty"`
EdgeServerIp string `json:"edgeIp,omitempty"`
IsGtmHostName bool `json:"isGtmHostname"`
}
DigRequest
type DigResponse ¶
type DigResponse struct {
Request DigRequest `json:"request"`
CreatedTime string `json:"createdTime"`
CreatedBy string `json:"createdBy"`
CompletedTime string `json:"completedTime"`
ExecutionStatus string `json:"executionStatus"`
EdgeIpLocation EdgeIpLocation `json:"edgeIpLocation"`
InternalIp string `json:"internalIp"`
Result DigInfo `json:"result"`
SuggestedActions []string `json:"suggestedActions"`
Type string `json:"type"`
Title string `json:"title"`
Status int `json:"status"`
Detail string `json:"detail"`
}
DigResponse
type DnsRecord ¶
type DnsRecord struct {
Domain string `json:"domain"`
Hostname string `json:"hostName"`
Ttl string `json:"ttl"`
RecordClass string `json:"recordClass"`
RecordType string `json:"recordType"`
PreferenceValue int `json:"preferenceValue"`
Value string `json:"value"`
}
DnsRecord
type EdgeGridHttpClient ¶
type EdgeGridHttpClient struct {
// contains filtered or unexported fields
}
func NewEdgeGridHttpClient ¶
func NewEdgeGridHttpClient(filepath, section, accountSwitchKey string) *EdgeGridHttpClient
type EdgeIpInfo ¶
type EdgeIpInfo struct {
ErrorId string `json:"errorId,omitempty"`
LogLinesCount int `json:"logLinesCount"`
EdgeIp string `json:"edgeIp"`
EdgeIpLocation EdgeIpLocation `json:"edgeIpLocation"`
HttpStatus int `json:"httpStatus"`
Hits int `json:"hits"`
ObjectStatus []ObjectStatus `json:"objectStatus"`
ErrorCode string `json:"errorCode"`
EdgeLogsLink string `json:"edgeLogsLink"`
}
type EdgeIpLocation ¶
type EdgeLocation ¶
type EdgeLocationContainer ¶
type EdgeLocationContainer struct {
EdgeLocations []EdgeLocation `json:"edgeLocations"`
}
type ErrorTranslatorRequest ¶
type ErrorTranslatorRequest struct {
ErrorCode string `json:"errorCode"`
TraceForwardLogs bool `json:"traceForwardLogs,omitempty"`
}
ErrorTranslatorRequest
type ErrorTranslatorResponse ¶
type ErrorTranslatorResponse struct {
ExecutionStatus string `json:"executionStatus"`
RetryAfter int `json:"retryAfter"`
Link string `json:"link"`
}
ErrorTranslatorResponse
type EstatsData ¶
type EstatsData struct {
EdgeErrors int `json:"edgeErrors"`
EdgeHits int `json:"edgeHits"`
EdgeFailurePercentage float64 `json:"edgeFailurePercentage"`
OriginErrors int `json:"originErrors"`
OriginHits int `json:"originHits"`
OriginFailurePercentage float64 `json:"originFailurePercentage"`
TopEdgeIpsWithError []EdgeIpInfo `json:"topEdgeIpsWithError"`
TopEdgeIpsWithErrorFromOrigin []EdgeIpInfo `json:"topEdgeIpsWithErrorFromOrigin"`
TopEdgeIpsWithSuccess []EdgeIpInfo `json:"topEdgeIpsWithSuccess"`
TopEdgeIpsWithSuccessFromOrigin []EdgeIpInfo `json:"topEdgeIpsWithSuccessFromOrigin"`
EdgeStatusCodeDistribution []StatusCodeDistribution `json:"edgeStatusCodeDistribution"`
OriginStatusCodeDistribution []StatusCodeDistribution `json:"originStatusCodeDistribution"`
}
type EstatsGrepResponse ¶
type EstatsGrepResponse struct {
LogLinesCount int `json:"logLinesCount"`
ExecutionStatus string `json:"executionStatus"`
CreatedTime string `json:"createdTime"`
CompletedTime string `json:"completedTime"`
CreatedBy string `json:"createdBy"`
LogsContainer LogsContainer `json:"result"`
SuggestedActions []string `json:"suggestedActions"`
EdgeIpLocation EdgeIpLocation `json:"edgeIpLocation"`
Warning Warning `json:"warning"`
}
type EstatsRequest ¶
type EstatsRequest struct {
Url string `json:"url,omitempty"`
CpCode int `json:"cpCode,omitempty"`
Delivery string `json:"delivery,omitempty"`
ErrorType string `json:"errorType,omitempty"`
}
EstatsRequest
type EstatsResult ¶
type EstatsResult struct {
Request EstatsRequest `json:"request"`
RequestId int `json:"requestId"`
CreatedBy string `json:"createdBy"`
CreatedTime string `json:"createdTime"`
CompletedTime string `json:"completedTime"`
ExecutionStatus string `json:"executionStatus"`
Result EstatsData `json:"result"`
}
type EstatsResultWrapper ¶
type EstatsResultWrapper struct {
EstatsResult EstatsResult `json:"estatsResult"`
EstatsLogLines []EstatsGrepResponse `json:"estatsLogLines,omitempty"`
}
EstatsWrapper
type GTMPropertyIps ¶
type GeoLocation ¶
type GeoLocation struct {
AreaCode string `json:"areaCode"`
AsNum *int `json:"asNumber"`
City string `json:"city"`
ClientIP string `json:"clientIp"`
Continent string `json:"continent"`
CountryCode string `json:"countryCode"`
County string `json:"county"`
DMA *int `json:"dma"`
FIPS string `json:"fips"`
Latitude *float32 `json:"latitude"`
Longitude *float32 `json:"longitude"`
MSA *int `json:"msa"`
Network string `json:"network"`
NetworkType string `json:"networkType"`
PMSA *int `json:"pmsa"`
Proxy string `json:"proxy"`
RegionCode string `json:"regionCode"`
Throughput string `json:"throughput"`
TimeZone string `json:"timeZone"`
ZipCode string `json:"zipCode"`
}
Geolocation
type GrepRequest ¶
type GrepRequest struct {
CpCodes []int `json:"cpCodes,omitempty"`
Hostnames []string `json:"hostnames,omitempty"`
EdgeIp string `json:"edgeIp"`
LogType string `json:"logType"`
Start string `json:"start"`
End string `json:"end"`
UserAgents []string `json:"userAgent,omitempty"`
HttpStatusCodes *HttpStatusCode `json:"httpStatusCodes,omitempty"`
Arls *Arl `json:"arls,omitempty"`
ClientIps []string `json:"clientIps,omitempty"`
}
type GrepResponse ¶
type GtmProperty ¶
type GtmPropertyContainer ¶
type GtmPropertyContainer struct {
GtmProperties []GtmProperty `json:"gtmProperties"`
}
type GtmPropertyIpsContainer ¶
type GtmPropertyIpsContainer struct {
GTMPropertyIps GTMPropertyIps `json:"gtmPropertyIps"`
}
type HttpStatusCode ¶
type IpaHostnameResponse ¶
type IpaHostnameResponse struct {
Hostnames []string `json:"hostnames"`
}
type ListResponse ¶
type ListResponse struct {
Groups []UserDiagnosticsDataGroupDetails `json:"groups,omitempty"`
}
add all list responses, use this as a container
type LogsContainer ¶
type MtrHop ¶
type MtrHop struct {
Number int `json:"number"`
IP string `json:"ip"`
IPLocation EdgeIpLocation `json:"ipLocation"`
Host string `json:"host"`
PacketLoss float64 `json:"packetLoss"`
SentPackets int `json:"sentPackets"`
LastPacketLatency float64 `json:"lastPacketLatency"`
AverageLatency float64 `json:"averageLatency"`
BestRtt float64 `json:"bestRtt"`
WorstRtt float64 `json:"worstRtt"`
StandardDeviation float64 `json:"standardDeviation"`
}
Mtr hop
type MtrRequest ¶
type MtrRequest struct {
Source string `json:"source"`
Destination string `json:"destination"`
PacketType string `json:"packetType"`
SourceType string `json:"sourceType,omitempty"`
DestinationType string `json:"destinationType,omitempty"`
IPVersion string `json:"ipVersion,omitempty"`
Port int `json:"port,omitempty"`
GtmHostname string `json:"gtmHostname,omitempty"`
SiteShieldHostname string `json:"siteShieldHostname,omitempty"`
}
MtrRequest
type MtrResponse ¶
type MtrResponse struct {
SourceIPLocation EdgeIpLocation `json:"sourceIpLocation"`
DestinationIPLocation EdgeIpLocation `json:"destinationIpLocation"`
SourceContext string `json:"sourceContext"`
DestinationContext string `json:"destinationContext"`
SourceInternalIP string `json:"sourceInternalIp"`
DestinationInternalIP string `json:"destinationInternalIp"`
CreatedBy string `json:"createdBy"`
CreatedTime string `json:"createdTime"`
SiteShieldIp string `json:"siteShieldIp"`
SiteShieldIpLocation EdgeIpLocation `json:"siteShieldIpLocation"`
Result MtrResult `json:"result"`
SuggestedActions []string `json:"suggestedActions"`
}
MtrResponse
type ObjectStatus ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (Service) ConnectivityProblems ¶
func (svc Service) ConnectivityProblems(connectivityProblemsRequest ConnectivityProblemsRequest)
func (Service) ContentProblems ¶
func (svc Service) ContentProblems(contentProblemsRequest ContentProblemsRequest)
func (Service) Curl ¶
func (svc Service) Curl(curlRequest CurlRequest)
func (Service) Dig ¶
func (svc Service) Dig(digRequest DigRequest)
func (Service) EdgeLocations ¶
func (Service) Estats ¶
func (svc Service) Estats(estatsRequest EstatsRequest, logsEstatsFlag bool)
func (Service) Grep ¶
func (svc Service) Grep(grepRequest GrepRequest)
func (Service) GtmHostnames ¶
func (svc Service) GtmHostnames()
func (Service) GtmTestTargetIp ¶
func (Service) IpaHostnames ¶
func (svc Service) IpaHostnames()
func (Service) LocateIp ¶
func (svc Service) LocateIp(locateIpsRequest VerifyLocateIpsRequest)
func (Service) Mtr ¶
func (svc Service) Mtr(mtrRequest MtrRequest)
func (Service) TranslateError ¶
func (svc Service) TranslateError(errorTranslatorRequest ErrorTranslatorRequest)
func (Service) TranslateUrl ¶
func (svc Service) TranslateUrl(arlRequest ArlRequest)
func (Service) UrlHealthCheck ¶
func (svc Service) UrlHealthCheck(urlHealthCheckRequest UrlHealthCheckRequest)
func (Service) UserDiagnosticsCreate ¶
func (svc Service) UserDiagnosticsCreate(userDiagnosticsDataRequest UserDiagnosticsDataRequest)
func (Service) UserDiagnosticsGet ¶
func (Service) UserDiagnosticsList ¶
func (Service) VerifyIp ¶
func (svc Service) VerifyIp(verifyIpsRequest VerifyLocateIpsRequest)
func (Service) VerifyLocateIp ¶
func (svc Service) VerifyLocateIp(verifyLocateIpRequest VerifyLocateIpRequest)
type StatusCodeDistribution ¶
type Timing ¶
type Timing struct {
DnsLookupTime float64 `json:"dnsLookupTime,omitempty"`
TcpConnectionTime float64 `json:"tcpConnectionTime,omitempty"`
SslConnectionTime float64 `json:"sslConnectionTime,omitempty"`
TimeToFirstByte float64 `json:"timeToFirstByte,omitempty"`
TotalTime float64 `json:"totalTime,omitempty"`
}
type UrlHealthCheckRequest ¶
type UrlHealthCheckRequest struct {
Url string `json:"url"`
EdgeLocationId string `json:"edgeLocationId,omitempty"`
EdgeIp string `json:"spoofEdgeIp,omitempty"`
Port int `json:"port,omitempty"`
PacketType string `json:"packetType,omitempty"`
IpVersion string `json:"ipVersion,omitempty"`
RequestHeaders []string `json:"requestHeaders,omitempty"`
QueryType string `json:"queryType,omitempty"`
ViewsAllowed []string `json:"viewsAllowed,omitempty"`
RunFromSiteShield bool `json:"runFromSiteShield,omitempty"`
}
type UrlHealthCheckResponse ¶
type UserDiagnosticsDataGroupDetails ¶
type UserDiagnosticsDataGroupDetails struct {
GroupID string `json:"groupId"`
Note string `json:"note"`
URL string `json:"url"`
IpaHostname string `json:"ipaHostname"`
CreatedTime string `json:"createdTime"`
DiagnosticLink string `json:"diagnosticLink"`
DiagnosticLinkStatus string `json:"diagnosticLinkStatus"`
RecordCount int `json:"recordCount"`
CreatedBy string `json:"createdBy"`
}
UserDiagnosticsDataGroupDetails
type UserDiagnosticsDataRequest ¶
type UserDiagnosticsDataRequest struct {
Url string `json:"url,omitempty"`
Note string `json:"note,omitempty"`
IpaHostname string `json:"ipaHostname,omitempty"`
}
UserDiagnosticsDataRequest
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func (Validator) ValidateConnectivityProblemsFields ¶
func (validator Validator) ValidateConnectivityProblemsFields(args []string, portStr string, connectivityProblemsRequest *ConnectivityProblemsRequest)
func (Validator) ValidateContentProblemsFields ¶
func (validator Validator) ValidateContentProblemsFields(args []string, contentProblemsRequest *ContentProblemsRequest)
func (Validator) ValidateCurlFields ¶
func (validator Validator) ValidateCurlFields(args []string, curlRequest *CurlRequest)
func (Validator) ValidateDigFields ¶
func (validator Validator) ValidateDigFields(args []string, digRequest *DigRequest)
func (Validator) ValidateEstatsFields ¶
func (validator Validator) ValidateEstatsFields(args []string, estatsRequest *EstatsRequest, logs, enhancedTls, standardTls, edgeErrors, originErrors bool)
func (Validator) ValidateGrepFields ¶
func (Validator) ValidateIpVersionFlag ¶
func (Validator) ValidateMtrFields ¶
func (validator Validator) ValidateMtrFields(args []string, portStr string, mtrRequest *MtrRequest)
func (Validator) ValidatePacketTypeFlag ¶
func (Validator) ValidatePortFlag ¶
func (Validator) ValidateTranslateErrorFields ¶
func (validator Validator) ValidateTranslateErrorFields(args []string, errorTranslatorRequest *ErrorTranslatorRequest, traceForwardLogs bool)
func (Validator) ValidateTranslateUrlFields ¶
func (validator Validator) ValidateTranslateUrlFields(args []string, translateUrlRequest *ArlRequest)
func (Validator) ValidateUrlHealthCheckFields ¶
func (validator Validator) ValidateUrlHealthCheckFields(args []string, portStr string, urlHealthCheckRequest *UrlHealthCheckRequest, logs, networkConnectivity bool)
func (Validator) ValidateUserDiagnosticsCreateFields ¶
func (validator Validator) ValidateUserDiagnosticsCreateFields(args []string, userDiagnosticsDataRequest *UserDiagnosticsDataRequest)
func (Validator) ValidateVerifyIpOrLocateIpFields ¶
func (validator Validator) ValidateVerifyIpOrLocateIpFields(args []string, verifyLocateIpsRequest *VerifyLocateIpsRequest)
func (Validator) ValidateVerifyLocateIpFields ¶
func (validator Validator) ValidateVerifyLocateIpFields(args []string, verifyLocateIpRequest *VerifyLocateIpRequest)
type VerifyLocateIpData ¶
type VerifyLocateIpData struct {
IsEdgeIp bool `json:"isEdgeIp"`
GeoLocation GeoLocation `json:"geoLocation"`
}
VerifyLocateIp Result
type VerifyLocateIpRequest ¶
type VerifyLocateIpRequest struct {
IpAddress string `json:"ipAddress"`
}
VerifyLocateIpRequest
type VerifyLocateIpResponse ¶
type VerifyLocateIpResponse struct {
Request VerifyLocateIpRequest `json:"request"`
CreatedTime string `json:"createdTime"`
CreatedBy string `json:"createdBy"`
ExecutionStatus string `json:"executionStatus"`
Result VerifyLocateIpData `json:"result"`
}
VerifyLocateIpResponse
type VerifyLocateIpsData ¶
type VerifyLocateIpsData struct {
ExecutionStatus string `json:"executionStatus"`
IpAddress string `json:"ipAddress"`
IsEdgeIp bool `json:"isEdgeIp"`
GeoLocation GeoLocation `json:"geoLocation"`
}
VerifyLocateIpsData
type VerifyLocateIpsRequest ¶
type VerifyLocateIpsRequest struct {
IpAddresses []string `json:"ipAddresses"`
}
VerifyLocateIpsRequest
type VerifyLocateIpsResponse ¶
type VerifyLocateIpsResponse struct {
Request VerifyLocateIpsRequest `json:"request"`
CreatedTime string `json:"createdTime"`
CreatedBy string `json:"createdBy"`
ExecutionStatus string `json:"executionStatus"`
Result []VerifyLocateIpsData `json:"results"`
}
VerifyLocateIpsResponse