Versions in this module Expand all Collapse all v0 v0.0.2 May 22, 2023 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 AGCMNotification struct + AGCMID string + Severity string + type APNSNotification struct + Device string + Name string + Severity string + 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 + IPv6 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 CheckResponseDNSDetails struct + ExpectedIP string + NameServer string + type CheckResponseHTTPDetails struct + Encryption bool + Password string + Port int + PostData string + RequestHeaders map[string]string + SSLDownDaysBefore int + ShouldContain string + ShouldNotContain string + Url string + Username string + VerifyCertificate bool + type CheckResponseTCPDetails struct + Port int + StringToExpect string + StringToSend string + type CheckResponseTag struct + Count interface{} + Name string + Type string + type CheckResponseType struct + DNS *CheckResponseDNSDetails + 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 + Contacts *ContactService + Maintenances *MaintenanceService + Occurrences *OccurrenceService + Probes *ProbeService + TMSCheck *TMSCheckService + Teams *TeamService + func NewClientWithConfig(config ClientConfig) (*Client, error) + func (pc *Client) Do(req *http.Request, v interface{}) (*http.Response, error) + func (pc *Client) NewJSONRequest(method string, rsc string, params string) (*http.Request, error) + func (pc *Client) NewRequest(method string, rsc string, params map[string]string) (*http.Request, error) + func (pc *Client) NewRequestMultiParamValue(method string, rsc string, params map[string][]string) (*http.Request, error) + type ClientConfig struct + APIToken string + BaseURL string + HTTPClient *http.Client + type Contact struct + ID int + Name string + NotificationTargets NotificationTargets + Owner bool + Paused bool + Teams []ContactTeam + Type string + func (c *Contact) RenderForJSONAPI() string + func (c *Contact) ValidContact() error + type ContactAPI interface + RenderForJSONAPI func() string + ValidContact func() error + type ContactService struct + func (cs *ContactService) Create(contact ContactAPI) (*Contact, error) + func (cs *ContactService) Delete(id int) (*PingdomResponse, error) + func (cs *ContactService) List() ([]Contact, error) + func (cs *ContactService) Read(contactID int) (*Contact, error) + func (cs *ContactService) Update(id int, contact ContactAPI) (*PingdomResponse, error) + type ContactTeam struct + ID int + Name string + type DNSCheck struct + ExpectedIP string + Hostname string + IntegrationIds []int + Name string + NameServer string + NotifyAgainEvery int + NotifyWhenBackup bool + Paused bool + ProbeFilters string + Resolution int + SendNotificationWhenDown int + Tags string + TeamIds []int + UserIds []int + func (ck *DNSCheck) PostParams() map[string]string + func (ck *DNSCheck) PutParams() map[string]string + func (ck *DNSCheck) Valid() error + type EmailNotification struct + Address string + Severity string + 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 + SSLDownDaysBefore *int + SendNotificationWhenDown int + ShouldContain string + ShouldNotContain string + Tags string + TeamIds []int + Url string + UserIds []int + Username string + VerifyCertificate *bool + func (ck *HttpCheck) PostParams() map[string]string + func (ck *HttpCheck) PutParams() map[string]string + func (ck *HttpCheck) Valid() error + type ListOccurrenceQuery struct + From int64 + MaintenanceId int64 + To int64 + 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 int64 + 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 NotificationTargets struct + AGCM []AGCMNotification + APNS []APNSNotification + Email []EmailNotification + SMS []SMSNotification + type Occurrence struct + Duration int + DurationUnit string + From int64 + Id int64 + MaintenanceId int64 + To int64 + func (o *Occurrence) RenderForJSONAPI() string + func (o *Occurrence) Valid() error + type OccurrenceService struct + func (os *OccurrenceService) Delete(id int64) (*PingdomResponse, error) + func (os *OccurrenceService) List(query ListOccurrenceQuery) ([]Occurrence, error) + func (os *OccurrenceService) MultiDelete(ids []int64) (*PingdomResponse, error) + func (os *OccurrenceService) Read(id int64) (*Occurrence, error) + func (os *OccurrenceService) Update(id int64, occurrence Occurrence) (*PingdomResponse, 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 SMSNotification struct + CountryCode string + Number string + Provider string + Severity string + 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 TMSCheck struct + Active bool + ContactIDs []int + CustomMessage string + IntegrationIDs []int + Interval int64 + Metadata *TMSCheckMetaData + Name string + Region string + SendNotificationWhenDown int + SeverityLevel string + Steps []TMSCheckStep + Tags []string + TeamIDs []int + func (t *TMSCheck) RenderForJSONAPI() string + func (t *TMSCheck) Valid() error + type TMSCheckDetailResponse struct + CreatedAt int64 + ID int + LastDowntimeEnd int64 + LastDowntimeStart int64 + ModifiedAt int64 + Status string + Type string + type TMSCheckInterval struct + AverageResponse int64 + Downtime int64 + From string + Steps []TMSCheckStepReport + Unmonitored int64 + Uptime int64 + type TMSCheckMetaData struct + Authentications interface{} + DisableWebSecurity bool + Height int + Width int + type TMSCheckPerformanceReportResponse struct + CheckID int + Intervals []TMSCheckInterval + Name string + Resolution string + type TMSCheckResponse struct + Active bool + CreatedAt int64 + ID int + Interval int + LastDowntimeEnd int64 + LastDowntimeStart int64 + ModifiedAt int64 + Name string + Region string + Status string + Tags []string + Type string + type TMSCheckSAPI interface + RenderForJSONAPI func() string + Valid func() error + type TMSCheckService struct + func (cs *TMSCheckService) Create(tmsCheck *TMSCheck) (*TMSCheckDetailResponse, error) + func (cs *TMSCheckService) Delete(id int) (*PingdomResponse, error) + func (cs *TMSCheckService) GetPerfomanceReport(id int, params map[string]string) (*TMSCheckPerformanceReportResponse, error) + func (cs *TMSCheckService) GetStatusReport(id int, params map[string]string) (*TMSCheckStatusReportResponse, error) + func (cs *TMSCheckService) List(params ...map[string]string) ([]TMSCheckResponse, error) + func (cs *TMSCheckService) ListStatusReports(params map[string]string) ([]TMSCheckStatusReportResponse, error) + func (cs *TMSCheckService) Read(id int) (*TMSCheckDetailResponse, error) + func (cs *TMSCheckService) Update(id int, tmsCheck *TMSCheck) (*TMSCheckDetailResponse, error) + type TMSCheckStatus struct + ErrorInStep int + From string + Message string + Status string + To string + type TMSCheckStatusReportResponse struct + CheckID int + Name string + States []TMSCheckStatus + type TMSCheckStep struct + Args map[string]string + Fn string + type TMSCheckStepReport struct + AverageResponse int64 + Step TMSCheckStep + type Team struct + ID int + MemberIDs []int + Name string + func (t *Team) RenderForJSONAPI() string + func (t *Team) Valid() error + type TeamAPI interface + RenderForJSONAPI func() string + Valid func() error + type TeamDeleteResponse struct + Message string + type TeamMemberResponse struct + ID int + Name string + Type string + type TeamResponse struct + ID int + Members []TeamMemberResponse + Name string + type TeamService struct + func (cs *TeamService) Create(team TeamAPI) (*TeamResponse, error) + func (cs *TeamService) Delete(id int) (*TeamDeleteResponse, error) + func (cs *TeamService) List() ([]TeamResponse, error) + func (cs *TeamService) Read(id int) (*TeamResponse, error) + func (cs *TeamService) Update(id int, team TeamAPI) (*TeamResponse, error)