Documentation
¶
Index ¶
- type CheckResponse
- type CheckResponseDNSDetails
- type CheckResponseHTTPCustomDetails
- type CheckResponseHTTPDetails
- type CheckResponseIMAPDetails
- type CheckResponsePOP3Details
- type CheckResponseSMTPDetails
- type CheckResponseTCPDetails
- type CheckResponseTag
- type CheckResponseType
- type CheckResponseUDPDetails
- type CheckService
- type Client
- type ClientConfig
- type CreditResponse
- type CreditResponseDetails
- type CreditService
- type ListChecksDetails
- type ListChecksResponse
- type ListChecksRespounseCounts
- type PingdomError
- type PingdomResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckResponse ¶
type CheckResponse struct { Type CheckResponseType `json:"type,omitempty"` SendNotificationWhenDown int `json:"sendnotificationwhendown,omitempty"` NotifyAgainEvery int `json:"notifyagainevery,omitempty"` NotifyWhenBackup bool `json:"notifywhenbackup,omitempty"` ResponseTimeThreshold int `json:"responsetime_threshold,omitempty"` CustomMessage string `json:"custom_message,omitempty"` IntegrationIDs []int `json:"integrationids,omitempty"` ID int `json:"id"` Name string `json:"name"` LastErrorTime int64 `json:"lasterrortime,omitempty"` LastTestTime int64 `json:"lasttesttime,omitempty"` LastResponseTime int64 `json:"lastresponsetime,omitempty"` Status string `json:"status,omitempty"` Resolution int `json:"resolution,omitempty"` Hostname string `json:"hostname,omitempty"` Created int64 `json:"created,omitempty"` Tags []CheckResponseTag `json:"tags,omitempty"` Paused bool `json:"paused,omitempty"` ProbeFilters []string `json:"probe_filters,omitempty"` IPv6 bool `json:"ipv6,omitempty"` VerifyCertificate bool `json:"verify_certificate,omitempty"` SSLDownDaysBefore int `json:"ssl_down_days_before,omitempty"` }
type CheckResponseDNSDetails ¶
type CheckResponseHTTPCustomDetails ¶
type CheckResponseHTTPCustomDetails struct { URL string `json:"url,omitempty"` Encryption bool `json:"encryption,omitempty"` Port int `json:"port,omitempty"` AdditionalURLs string `json:"additionalurls,omitempty"` VerifyCertificate bool `json:"verify_certificate,omitempty"` SSLDownDaysBefore int `json:"ssl_down_days_before,omitempty"` }
type CheckResponseHTTPDetails ¶
type CheckResponseHTTPDetails struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` URL string `json:"url,omitempty"` Encryption bool `json:"encryption,omitempty"` Port int `json:"port,omitempty"` ShouldContain string `json:"shouldcontain,omitempty"` ShouldNotContain string `json:"shouldnotcontain,omitempty"` PostData string `json:"postdata,omitempty"` RequestHeaders map[string]string `json:"requestheaders,omitempty"` }
type CheckResponseTCPDetails ¶
type CheckResponseTag ¶
type CheckResponseType ¶
type CheckResponseType struct { Name string `json:"-"` HTTP *CheckResponseHTTPDetails `json:"http,omitempty"` HTTPCustomDetails *CheckResponseHTTPCustomDetails `json:"httpcustom,omitempty"` TCP *CheckResponseTCPDetails `json:"tcp,omitempty"` UDP *CheckResponseUDPDetails `json:"udp,omitempty"` DNS *CheckResponseDNSDetails `json:"dns,omitempty"` SMTP *CheckResponseSMTPDetails `json:"smtp,omitempty"` POP3 *CheckResponsePOP3Details `json:"pop3,omitempty"` IMAP *CheckResponseIMAPDetails `json:"imap,omitempty"` }
type CheckResponseUDPDetails ¶
type CheckService ¶
type CheckService struct {
// contains filtered or unexported fields
}
func (*CheckService) List ¶
func (cs *CheckService) List() ([]ListChecksDetails, error)
type Client ¶
type Client struct { APIToken string BaseURL *url.URL Checks *CheckService Credits *CreditService // contains filtered or unexported fields }
func NewClientWithConfig ¶
func NewClientWithConfig(config ClientConfig) (*Client, error)
type ClientConfig ¶
type CreditResponse ¶
type CreditResponse struct {
Credits CreditResponseDetails `json:"credits"`
}
type CreditResponseDetails ¶
type CreditResponseDetails struct { CheckLimit int `json:"checklimit,omitempty"` DefaultCheckLimit int `json:"defaultchecklimit,omitempty"` TransactionCheckLimit int `json:"transactionchecklimit,omitempty"` AvailableChecks int `json:"availablechecks,omitempty"` AvailableDefaultChecks int `json:"availabledefaultchecks,omitempty"` AvailableTransactionChecks int `json:"availabletransactionchecks,omitempty"` UsedDefault int `json:"useddefault,omitempty"` UsedTransaction int `json:"usedtransaction,omitempty"` AvailableSMS int `json:"availablesms,omitempty"` AvailableSMSTests int `json:"availablesmstests,omitempty"` AutoFillSMS bool `json:"autofillsms,omitempty"` AutoFillSMSAmount int `json:"autofillsms_amount,omitempty"` AutoFillSMSWhenLeft int `json:"autofillsms_when_left,omitempty"` MaxSMSOverage int `json:"max_sms_overage,omitempty"` AvailableRUMSites int `json:"availablerumsites,omitempty"` UsedRUMSites int `json:"usedrumsites,omitempty"` MaxRUMFilters int `json:"maxrumfilters,omitempty"` MaxRUMPageViews int `json:"maxrumpageviews,omitempty"` MaxAlertingFullUsers int `json:"maxalertingfullusers,omitempty"` AvailableAlertingFullUsers int `json:"availablealertingfullusers,omitempty"` }
type CreditService ¶
type CreditService struct {
// contains filtered or unexported fields
}
func (*CreditService) Info ¶
func (cs *CreditService) Info() (CreditResponseDetails, error)
type ListChecksDetails ¶
type ListChecksDetails struct { Type string `json:"type"` ID int `json:"id"` Name string `json:"name"` LastErrorTime int64 `json:"lasterrortime,omitempty"` LastTestTime int64 `json:"lasttesttime,omitempty"` LastResponseTime int64 `json:"lastresponsetime,omitempty"` Status string `json:"status,omitempty"` Resolution int `json:"resolution,omitempty"` Hostname string `json:"hostname,omitempty"` Created int64 `json:"created,omitempty"` Tags []CheckResponseTag `json:"tags,omitempty"` Paused bool `json:"paused,omitempty"` ProbeFilters []string `json:"probe_filters,omitempty"` IPv6 bool `json:"ipv6,omitempty"` }
type ListChecksResponse ¶
type ListChecksResponse struct { Checks []ListChecksDetails `json:"checks"` Counts ListChecksRespounseCounts `json:"counts"` }
type PingdomError ¶
type PingdomError struct { StatusCode int `json:"statuscode"` StatusDesc string `json:"statusdesc"` Message string `json:"errormessage"` }
PingdomError represents an error response from the Pingdom API.
func (*PingdomError) Error ¶
func (pe *PingdomError) Error() string
Return string representation of the PingdomError.
type PingdomResponse ¶
type PingdomResponse struct {
Message string `json:"message"`
}
PingdomResponse represents a general response from the Pingdom API.
Click to show internal directories.
Click to hide internal directories.