Versions in this module Expand all Collapse all v1 v1.0.31 Jun 4, 2020 Changes in this version + var ErrBadResolution = errors.New("resolution must be either 'hour', 'day' or 'week'") + var ErrMissingId = errors.New("required field 'Id' missing") + type Check interface + PostParams func() map[string]string + PutParams func() map[string]string + Valid func() error + type CheckResponse struct + Created int64 + Hostname string + ID int + IP6 bool + IntegrationIds []int + LastErrorTime int64 + LastResponseTime int64 + LastTestTime int64 + Name string + NotifyAgainEvery int + NotifyWhenBackup bool + Paused bool + ProbeFilters []string + Resolution int + ResponseTimeThreshold int + SendNotificationWhenDown int + SeverityLevel string + Status string + Tags []CheckResponseTag + TeamIds []int + Teams []CheckTeamResponse + Type CheckResponseType + UserIds []int + type CheckResponseHTTPDetails struct + Encryption bool + Password string + Port int + PostData string + RequestHeaders map[string]string + ShouldContain string + ShouldNotContain string + Url string + Username string + type CheckResponseTCPDetails struct + Port int + StringToExpect string + StringToSend string + type CheckResponseTag struct + Count interface{} + Name string + Type string + type CheckResponseType struct + HTTP *CheckResponseHTTPDetails + Name string + TCP *CheckResponseTCPDetails + func (c *CheckResponseType) UnmarshalJSON(b []byte) error + type CheckService struct + func (cs *CheckService) Create(check Check) (*CheckResponse, error) + func (cs *CheckService) Delete(id int) (*PingdomResponse, error) + func (cs *CheckService) List(params ...map[string]string) ([]CheckResponse, error) + func (cs *CheckService) Read(id int) (*CheckResponse, error) + func (cs *CheckService) Results(id int, params ...map[string]string) (*ResultsResponse, error) + func (cs *CheckService) SummaryPerformance(request SummaryPerformanceRequest) (*SummaryPerformanceResponse, error) + func (cs *CheckService) Update(id int, check Check) (*PingdomResponse, error) + type CheckTeamResponse struct + ID int + Name string + type Client struct + APIToken string + BaseURL *url.URL + Checks *CheckService + Maintenances *MaintenanceService + Probes *ProbeService + func NewClientWithConfig(config ClientConfig) (*Client, error) + func (pc *Client) Do(req *http.Request, v interface{}) (*http.Response, error) + func (pc *Client) NewRequest(method string, rsc string, params map[string]string) (*http.Request, error) + type ClientConfig struct + APIToken string + BaseURL string + HTTPClient *http.Client + type CreateUserContactResponse struct + Id int + type HttpCheck struct + Encryption bool + Hostname string + IntegrationIds []int + Name string + NotifyAgainEvery int + NotifyWhenBackup bool + Password string + Paused bool + Port int + PostData string + ProbeFilters string + RequestHeaders map[string]string + Resolution int + ResponseTimeThreshold int + SendNotificationWhenDown int + ShouldContain string + ShouldNotContain string + Tags string + TeamIds []int + Url string + UserIds []int + Username string + func (ck *HttpCheck) PostParams() map[string]string + func (ck *HttpCheck) PutParams() map[string]string + func (ck *HttpCheck) Valid() error + type Maintenance interface + PostParams func() map[string]string + PutParams func() map[string]string + Valid func() error + type MaintenanceCheckResponse struct + Tms []int + Uptime []int + type MaintenanceDelete interface + DeleteParams func() map[string]string + ValidDelete func() error + type MaintenanceResponse struct + Checks MaintenanceCheckResponse + Description string + EffectiveTo int64 + From int64 + ID int + RecurrenceType string + RepeatEvery int + To int64 + type MaintenanceService struct + func (cs *MaintenanceService) Create(maintenance Maintenance) (*MaintenanceResponse, error) + func (cs *MaintenanceService) Delete(id int) (*PingdomResponse, error) + func (cs *MaintenanceService) List(params ...map[string]string) ([]MaintenanceResponse, error) + func (cs *MaintenanceService) MultiDelete(maintenance MaintenanceDelete) (*PingdomResponse, error) + func (cs *MaintenanceService) Read(id int) (*MaintenanceResponse, error) + func (cs *MaintenanceService) Update(id int, maintenance Maintenance) (*PingdomResponse, error) + type MaintenanceWindow struct + Description string + EffectiveTo int + From int64 + RecurrenceType string + RepeatEvery int + TmsIDs string + To int64 + UptimeIDs string + func (ck *MaintenanceWindow) PostParams() map[string]string + func (ck *MaintenanceWindow) PutParams() map[string]string + func (ck *MaintenanceWindow) Valid() error + type MaintenanceWindowDelete struct + MaintenanceIDs string + func (ck *MaintenanceWindowDelete) DeleteParams() map[string]string + func (ck *MaintenanceWindowDelete) ValidDelete() error + type PingCheck struct + Hostname string + IntegrationIds []int + Name string + NotifyAgainEvery int + NotifyWhenBackup bool + Paused bool + ProbeFilters string + Resolution int + ResponseTimeThreshold int + SendNotificationWhenDown int + Tags string + TeamIds []int + UserIds []int + func (ck *PingCheck) PostParams() map[string]string + func (ck *PingCheck) PutParams() map[string]string + func (ck *PingCheck) Valid() error + type PingdomError struct + Message string + StatusCode int + StatusDesc string + func (r *PingdomError) Error() string + type PingdomResponse struct + Message string + type ProbeResponse struct + Active bool + City string + Country string + CountryISO string + Hostname string + ID int + IP string + IPv6 string + Name string + Region string + type ProbeService struct + func (cs *ProbeService) List(params ...map[string]string) ([]ProbeResponse, error) + type Result struct + ProbeID int + ResponseTime int + Status string + StatusDesc string + StatusDescLong string + Time int + type ResultsResponse struct + ActiveProbes []int + Results []Result + type SummaryPerformanceMap struct + Days []SummaryPerformanceSummary + Hours []SummaryPerformanceSummary + Weeks []SummaryPerformanceSummary + type SummaryPerformanceRequest struct + From int + Id int + IncludeUptime bool + Order string + Probes string + Resolution string + To int + func (csr SummaryPerformanceRequest) GetParams() (params map[string]string) + func (csr SummaryPerformanceRequest) Valid() error + type SummaryPerformanceResponse struct + Summary SummaryPerformanceMap + type SummaryPerformanceSummary struct + AvgResponse int + Downtime int + StartTime int + Unmonitored int + Uptime int + type TCPCheck struct + Hostname string + IntegrationIds []int + Name string + NotifyAgainEvery int + NotifyWhenBackup bool + Paused bool + Port int + ProbeFilters string + Resolution int + SendNotificationWhenDown int + StringToExpect string + StringToSend string + Tags string + TeamIds []int + UserIds []int + func (ck *TCPCheck) PostParams() map[string]string + func (ck *TCPCheck) PutParams() map[string]string + func (ck *TCPCheck) Valid() error + type UserEmailResponse struct + Address string + Id int + Severity string + type UserSmsResponse struct + CountryCode string + Id int + Number string + Provider string + Severity string + type UsersResponse struct + Email []UserEmailResponse + Id int + Paused string + Sms []UserSmsResponse + Username string