Documentation
¶
Overview ¶
pkg/upapi/ep_maintenance_notifications.go
Index ¶
- Variables
- func BoolPtr(v bool) *bool
- func ErrorFromResponse(r *http.Response) error
- func StringPtr(v string) *string
- type API
- type AccountUsage
- type AccountUsageEndpoint
- type Alert
- type AlertItem
- type AlertListOptions
- type AlertListResponse
- type AlertResponse
- type AlertRootCause
- type AlertsEndpoint
- type CBD
- type Check
- type CheckAPI
- type CheckBlacklist
- type CheckCloudStatus
- type CheckCloudStatusConfig
- type CheckCreateUpdateResponse
- type CheckDNS
- type CheckEscalation
- type CheckEscalations
- type CheckGetResponse
- type CheckGroup
- type CheckGroupConfig
- type CheckHTTP
- type CheckHeartbeat
- type CheckICMP
- type CheckIMAP
- type CheckListOptions
- type CheckListResponse
- type CheckLocationListOptions
- type CheckLocationListResponse
- type CheckMaintenance
- type CheckMaintenanceSchedule
- type CheckMalware
- type CheckNTP
- type CheckPOP
- type CheckPageSpeed
- type CheckPageSpeedConfig
- type CheckRDAP
- type CheckRUM
- type CheckRUM2
- type CheckSMTP
- type CheckSSH
- type CheckSSLCert
- type CheckSSLCertConfig
- type CheckStats
- type CheckStatsOptions
- type CheckStatsResponse
- type CheckTCP
- type CheckTransaction
- type CheckUDP
- type CheckWHOIS
- type CheckWebhook
- type ChecksEndpoint
- type CloudStatusGroup
- type CloudStatusGroupListItem
- type CloudStatusGroupListOptions
- type CloudStatusGroupListResponse
- type CloudStatusService
- type CloudStatusServiceListOptions
- type CloudStatusServiceListResponse
- type Contact
- type ContactCreateUpdateResponse
- type ContactListOptions
- type ContactListResponse
- type ContactResponse
- type ContactsEndpoint
- type Credential
- type CredentialCreateUpdateResponse
- type CredentialEndpoint
- type CredentialListOptions
- type CredentialListResponse
- type CredentialResponse
- type CredentialSecret
- type Dashboard
- type DashboardCreateUpdateResponse
- type DashboardListOptions
- type DashboardListResponse
- type DashboardResponse
- type DashboardsEndpoint
- type Doer
- type EndpointCreator
- type EndpointDeleter
- type EndpointGetter
- type EndpointLister
- type EndpointUpdater
- type Error
- type FieldErrors
- type IncidentAffectedComponent
- type IncidentAffectedComponentEntity
- type IncidentUpdate
- type Integration
- type IntegrationCachet
- type IntegrationDatadog
- type IntegrationGeckoboard
- type IntegrationJiraServicedesk
- type IntegrationKlipfolio
- type IntegrationLibrato
- type IntegrationListOptions
- type IntegrationListResponse
- type IntegrationMicrosoftTeams
- type IntegrationOpsgenie
- type IntegrationPagerduty
- type IntegrationPushbullet
- type IntegrationPushover
- type IntegrationResponse
- type IntegrationSlack
- type IntegrationStatus
- type IntegrationStatuspage
- type IntegrationTwitter
- type IntegrationVictorops
- type IntegrationWavefront
- type IntegrationWebhook
- type IntegrationZapier
- type IntegrationsEndpoint
- type Itemable
- type ListResult
- type Listable
- type MaintenanceContactGroup
- type MaintenanceNotificationCreateUpdateResponse
- type MaintenanceNotificationListOptions
- type MaintenanceNotificationListResponse
- type MaintenanceNotificationResponse
- type MaintenanceNotificationsEndpoint
- type MaintenanceSchedule
- type MaintenanceScheduleCreateUpdateResponse
- type MaintenanceScheduleInput
- type MaintenanceScheduleListOptions
- type MaintenanceScheduleListResponse
- type MaintenanceScheduleNotification
- type MaintenanceScheduleNotificationInput
- type MaintenanceScheduleResponse
- type MaintenanceSchedulesEndpoint
- type MaintenanceService
- type MaintenanceTag
- type Option
- func WithBaseURL(baseurl string) Option
- func WithBearerToken(token string) Option
- func WithRateLimit(rateLimit float64) Option
- func WithRateLimitEvery(every time.Duration) Option
- func WithRetry(limit int, maxDelay time.Duration, w io.Writer) Option
- func WithSubaccount(subaccount int64) Option
- func WithToken(token string) Option
- func WithTrace(w io.Writer) Option
- func WithUserAgent(ua string) Option
- type Outage
- type OutageListOptions
- type OutageListResponse
- type OutageResponse
- type OutagesEndpoint
- type PrimaryKey
- type PrimaryKeyable
- type ProbeServer
- type ProbeServerListOptions
- type ProbeServerListResponse
- type ProbeServersEndpoint
- type PushNotificationProfile
- type PushNotificationProfileCreateRequest
- type PushNotificationProfileCreateUpdateResponse
- type PushNotificationProfileItemResponse
- type PushNotificationProfileListOptions
- type PushNotificationProfileListResponse
- type PushNotificationProfileUpdateRequest
- type PushNotificationsEndpoint
- type RequestBuilder
- type ResponseDecoder
- type SLAReport
- type SLAReportCreateUpdateResponse
- type SLAReportGroup
- type SLAReportGroupCreateResponse
- type SLAReportGroupCreateUpdateResponse
- type SLAReportGroupListOptions
- type SLAReportGroupListResponse
- type SLAReportGroupResponse
- type SLAReportListOptions
- type SLAReportListResponse
- type SLAReportResponse
- type SLAReportService
- type SLAReportsEndpoint
- type SLAReportsGroupsEndpoint
- type ScheduledReport
- type ScheduledReportCreateUpdateResponse
- type ScheduledReportListOptions
- type ScheduledReportListResponse
- type ScheduledReportResponse
- type ScheduledReportsEndpoint
- type ServiceVariable
- type ServiceVariableCreateRequest
- type ServiceVariableCreateUpdateResponse
- type ServiceVariableCredential
- type ServiceVariableItemResponse
- type ServiceVariableListOptions
- type ServiceVariableListResponse
- type ServiceVariableUpdateRequest
- type ServiceVariablesEndpoint
- type StatusPage
- type StatusPageComponent
- type StatusPageComponentCreateUpdateResponse
- type StatusPageComponentEndpoint
- type StatusPageComponentListOptions
- type StatusPageComponentListResponse
- type StatusPageComponentResponse
- type StatusPageCreateUpdateResponse
- type StatusPageCurrentStatus
- type StatusPageCurrentStatusComponent
- type StatusPageCurrentStatusEndpoint
- type StatusPageCurrentStatusResponse
- type StatusPageIncident
- type StatusPageIncidentCreateUpdateResponse
- type StatusPageIncidentEndpoint
- type StatusPageIncidentListOptions
- type StatusPageIncidentListResponse
- type StatusPageIncidentResponse
- type StatusPageListOptions
- type StatusPageListResponse
- type StatusPageMetric
- type StatusPageMetricCreateUpdateResponse
- type StatusPageMetricEndpoint
- type StatusPageMetricListOptions
- type StatusPageMetricListResponse
- type StatusPageMetricResponse
- type StatusPageResponse
- type StatusPageStatusHistory
- type StatusPageStatusHistoryEndpoint
- type StatusPageStatusHistoryListOptions
- type StatusPageStatusHistoryListResponse
- type StatusPageStatusHistoryResponse
- type StatusPageSubsDomainAllowList
- type StatusPageSubsDomainAllowListCreateUpdateResponse
- type StatusPageSubsDomainAllowListEndpoint
- type StatusPageSubsDomainAllowListListOptions
- type StatusPageSubsDomainAllowListListResponse
- type StatusPageSubsDomainAllowListResponse
- type StatusPageSubsDomainBlockList
- type StatusPageSubsDomainBlockListCreateUpdateResponse
- type StatusPageSubsDomainBlockListEndpoint
- type StatusPageSubsDomainBlockListListOptions
- type StatusPageSubsDomainBlockListListResponse
- type StatusPageSubsDomainBlockListResponse
- type StatusPageSubscriber
- type StatusPageSubscriberCreateResponse
- type StatusPageSubscriberEndpoint
- type StatusPageSubscriberListOptions
- type StatusPageSubscriberListResponse
- type StatusPageSubscriberResponse
- type StatusPageUser
- type StatusPageUserCreateUpdateResponse
- type StatusPageUserEndpoint
- type StatusPageUserListOptions
- type StatusPageUserListResponse
- type StatusPageUserResponse
- type StatusPagesEndpoint
- type Subaccount
- type SubaccountCreateRequest
- type SubaccountItemResponse
- type SubaccountPacks
- type SubaccountUpdateRequest
- type SubaccountsEndpoint
- type Tag
- type TagCreateUpdateResponse
- type TagItemResponse
- type TagListOptions
- type TagListResponse
- type TagsEndpoint
- type User
- type UserAccount
- type UserCreateRequest
- type UserCreateUpdateResponse
- type UserItemResponse
- type UserListOptions
- type UserListResponse
- type UserUpdateRequest
- type UsersEndpoint
Constants ¶
This section is empty.
Variables ¶
var DecodeError = errors.New("error response decode error")
Functions ¶
func BoolPtr ¶ added in v2.8.0
BoolPtr returns a pointer to the given bool value. Use this helper to set *bool fields on Check structs for PATCH operations.
func ErrorFromResponse ¶
Types ¶
type API ¶
type API interface {
Alerts() AlertsEndpoint
Checks() ChecksEndpoint
Contacts() ContactsEndpoint
MaintenanceSchedules() MaintenanceSchedulesEndpoint
MaintenanceNotifications() MaintenanceNotificationsEndpoint
Dashboards() DashboardsEndpoint
Integrations() IntegrationsEndpoint
Tags() TagsEndpoint
Outages() OutagesEndpoint
ProbeServers() ProbeServersEndpoint
StatusPages() StatusPagesEndpoint
SLAReports() SLAReportsEndpoint
ScheduledReports() ScheduledReportsEndpoint
Credentials() CredentialEndpoint
ServiceVariables() ServiceVariablesEndpoint
Users() UsersEndpoint
PushNotifications() PushNotificationsEndpoint
Subaccounts() SubaccountsEndpoint
AccountUsage() AccountUsageEndpoint
}
API manages communication with the Uptime.com API.
type AccountUsage ¶ added in v2.10.0
AccountUsage represents account usage and plan limits as returned by the API. The API returns a single-element array with one object containing heterogeneous fields (strings, numbers, bools, arrays), so we use a map to preserve all data.
type AccountUsageEndpoint ¶ added in v2.10.0
type AccountUsageEndpoint interface {
Get(ctx context.Context) (*AccountUsage, error)
}
AccountUsageEndpoint provides access to account usage and plan limits.
func NewAccountUsageEndpoint ¶ added in v2.10.0
func NewAccountUsageEndpoint(cbd CBD) AccountUsageEndpoint
type Alert ¶
type Alert struct {
PK int64 `json:"pk,omitempty"`
URL string `json:"url,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
MonitoringServerName string `json:"monitoring_server_name,omitempty"`
MonitoringServerIPv4 *net.IP `json:"monitoring_server_ipv4,omitempty"`
MonitoringServerIPv6 *net.IP `json:"monitoring_server_ipv6,omitempty"`
Location string `json:"location,omitempty"`
Output string `json:"output,omitempty"`
}
Alert represents an alert generated during an outage.
type AlertItem ¶ added in v2.4.0
type AlertItem struct {
PK int64 `json:"pk,omitempty"`
URL string `json:"url,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
ResolvedAt *time.Time `json:"resolved_at,omitempty"`
MonitoringServerName string `json:"monitoring_server_name,omitempty"`
MonitoringServerIPv4 *net.IP `json:"monitoring_server_ipv4,omitempty"`
MonitoringServerIPv6 *net.IP `json:"monitoring_server_ipv6,omitempty"`
Location string `json:"location,omitempty"`
Output string `json:"output,omitempty"`
StateIsUp bool `json:"state_is_up,omitempty"`
Ignored bool `json:"ignored,omitempty"`
CheckPK int64 `json:"check_pk,omitempty"`
CheckURL string `json:"check_url,omitempty"`
CheckAddress string `json:"check_address,omitempty"`
CheckName string `json:"check_name,omitempty"`
CheckMonitoringServiceType string `json:"check_monitoring_service_type,omitempty"`
}
AlertItem represents an alert/incident in the Uptime.com monitoring system. Alerts are generated when a check detects an issue from a monitoring location.
func (AlertItem) PrimaryKey ¶ added in v2.4.0
func (a AlertItem) PrimaryKey() PrimaryKey
type AlertListOptions ¶ added in v2.4.0
type AlertListOptions struct {
Page int64 `url:"page,omitempty"`
PageSize int64 `url:"page_size,omitempty"`
Search string `url:"search,omitempty"`
Ordering string `url:"ordering,omitempty"`
StateIsUp *bool `url:"state_is_up,omitempty"`
CheckPK int64 `url:"check_pk,omitempty"`
CheckMonitoringServiceType string `url:"check_monitoring_service_type,omitempty"`
CheckTag string `url:"check_tag,omitempty"`
StartDate string `url:"start_date,omitempty"`
EndDate string `url:"end_date,omitempty"`
}
AlertListOptions specifies the optional parameters for listing alerts.
type AlertListResponse ¶ added in v2.4.0
type AlertListResponse struct {
Count int64 `json:"count,omitempty"`
Next string `json:"next,omitempty"`
Previous string `json:"previous,omitempty"`
Results []AlertItem `json:"results,omitempty"`
}
AlertListResponse represents a paginated list of alerts.
func (AlertListResponse) CountItems ¶ added in v2.6.0
func (r AlertListResponse) CountItems() int64
func (AlertListResponse) List ¶ added in v2.4.0
func (r AlertListResponse) List() []AlertItem
type AlertResponse ¶ added in v2.4.0
type AlertResponse AlertItem
AlertResponse represents a single alert response.
func (AlertResponse) Item ¶ added in v2.4.0
func (r AlertResponse) Item() AlertItem
type AlertRootCause ¶ added in v2.4.0
type AlertRootCause struct {
PK int64 `json:"pk,omitempty"`
URL string `json:"url,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
MonitoringServerName string `json:"monitoring_server_name,omitempty"`
MonitoringServerIPv4 *net.IP `json:"monitoring_server_ipv4,omitempty"`
MonitoringServerIPv6 *net.IP `json:"monitoring_server_ipv6,omitempty"`
Location string `json:"location,omitempty"`
Output string `json:"output,omitempty"`
RootCauseData string `json:"root_cause_data,omitempty"`
}
AlertRootCause represents root cause analysis data for an alert.
type AlertsEndpoint ¶ added in v2.4.0
type AlertsEndpoint interface {
List(context.Context, AlertListOptions) (*ListResult[AlertItem], error)
Get(context.Context, PrimaryKeyable) (*AlertItem, error)
RootCause(context.Context, PrimaryKeyable) (*AlertRootCause, error)
Ignore(context.Context, PrimaryKeyable) (*AlertItem, error)
}
AlertsEndpoint defines the interface for interacting with alert resources.
func NewAlertsEndpoint ¶ added in v2.4.0
func NewAlertsEndpoint(cbd CBD) AlertsEndpoint
NewAlertsEndpoint creates a new alerts endpoint.
type CBD ¶
type CBD interface {
Doer
RequestBuilder
ResponseDecoder
}
CBD is http Client, request Build and response Decoder bundle.
type Check ¶
type Check struct {
PK int64 `json:"pk,omitempty"`
URL string `json:"url,omitempty"`
StatsURL string `json:"stats_url,omitempty"`
AlertsURL string `json:"alerts_url,omitempty"`
Name string `json:"name,omitempty"`
CachedResponseTime float64 `json:"cached_response_time,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
ModifiedAt time.Time `json:"modified_at,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
CheckType string `json:"check_type,omitempty"`
Escalations []CheckEscalation `json:"escalations,omitempty"`
MonitoringServiceType string `json:"monitoring_service_type,omitempty"`
IsPaused bool `json:"is_paused,omitempty"`
IsUnderMaintenance bool `json:"is_under_maintenance,omitempty"`
StateIsUp bool `json:"state_is_up,omitempty"`
StateChangedAt time.Time `json:"state_changed_at,omitempty"`
HeartbeatURL string `json:"heartbeat_url,omitempty"`
WebhookURL string `json:"webhook_url,omitempty"`
Protocol string `json:"msp_protocol,omitempty"`
Interval int64 `json:"msp_interval,omitempty"`
Address string `json:"msp_address,omitempty"`
Port int64 `json:"msp_port,omitempty"`
Username string `json:"msp_username,omitempty"`
Password string `json:"msp_password,omitempty"`
Proxy string `json:"msp_proxy,omitempty"`
DNSServer string `json:"msp_dns_server,omitempty"`
DNSRecordType string `json:"msp_dns_record_type,omitempty"`
StatusCode string `json:"msp_status_code,omitempty"`
SendString string `json:"msp_send_string,omitempty"`
ExpectString string `json:"msp_expect_string,omitempty"`
ExpectStringType string `json:"msp_expect_string_type,omitempty"`
Encryption *string `json:"msp_encryption,omitempty"`
Threshold int64 `json:"msp_threshold,omitempty"`
Headers string `json:"msp_headers,omitempty"`
Script string `json:"msp_script,omitempty"`
Version int64 `json:"msp_version,omitempty"`
Sensitivity int64 `json:"msp_sensitivity,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UseIPVersion string `json:"msp_use_ip_version,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics bool `json:"msp_include_in_global_metrics,omitempty"`
Maintenance *CheckMaintenance `json:"maintenance,omitempty"`
SSLConfig *CheckSSLCertConfig `json:"sslconfig,omitempty"`
PageSpeedConfig *CheckPageSpeedConfig `json:"pagespeedconfig,omitempty"`
GroupConfig *CheckGroupConfig `json:"groupcheckconfig,omitempty"`
CloudStatusConfig *CheckCloudStatusConfig `json:"cloudstatusconfig,omitempty"`
}
Check represents a check in Uptime.com.
func (Check) PrimaryKey ¶
func (c Check) PrimaryKey() PrimaryKey
type CheckAPI ¶
type CheckAPI struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Interval int64 `json:"msp_interval,omitempty"`
Threshold int64 `json:"msp_threshold,omitempty"`
Script string `json:"msp_script,omitempty"`
Sensitivity int64 `json:"msp_sensitivity,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UseIPVersion string `json:"msp_use_ip_version,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
}
type CheckBlacklist ¶
type CheckBlacklist struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Address string `json:"msp_address,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
}
type CheckCloudStatus ¶ added in v2.9.0
type CheckCloudStatus struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
CloudStatusConfig CheckCloudStatusConfig `json:"cloudstatusconfig,omitempty"`
}
type CheckCloudStatusConfig ¶ added in v2.9.0
type CheckCloudStatusConfig struct {
// NotifyOnlyOnDown opts out of maintenance notifications.
NotifyOnlyOnDown bool `json:"notify_only_on_down,omitempty"`
// ServiceName is the legacy (deprecated) cloud status component name or ID.
ServiceName string `json:"service_name,omitempty"`
// Group is the cloud status group to monitor. On write only the numeric
// ID is sent; on read the server also reports the group name.
Group *CloudStatusGroup `json:"group,omitempty"`
// MonitoringType selects how Group is monitored: "ALL" or "SPECIFIC".
MonitoringType string `json:"monitoring_type,omitempty"`
// Services is the list of specific service IDs to monitor when
// MonitoringType is "SPECIFIC".
Services []int64 `json:"services,omitempty"`
// ServiceTitles auto-monitors current and future services whose title
// matches any entry in this list when MonitoringType is "SPECIFIC".
ServiceTitles []string `json:"service_titles,omitempty"`
}
CheckCloudStatusConfig describes the cloudstatusconfig payload accepted by the /checks/add-cloudstatus and /checks/{pk} endpoints.
There are two ways to configure what is monitored:
- Legacy: set ServiceName to a single component name. Deprecated server-side in favour of the group + monitoring_type model below.
- Group-based: set Group to the cloud status group ID and MonitoringType to either "ALL" (every service in the group) or "SPECIFIC" (only entries listed in Services and/or ServiceTitles).
Use the GET /api/v1/checks/cloudstatus-groups/ and /api/v1/checks/cloudstatus-services/ endpoints to discover valid IDs.
type CheckCreateUpdateResponse ¶
type CheckCreateUpdateResponse struct {
Messages map[string]interface{} `json:"messages,omitempty"`
Results Check `json:"results,omitempty"`
}
func (CheckCreateUpdateResponse) Item ¶
func (r CheckCreateUpdateResponse) Item() Check
type CheckDNS ¶
type CheckDNS struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Interval int64 `json:"msp_interval,omitempty"`
Address string `json:"msp_address,omitempty"`
DNSServer string `json:"msp_dns_server,omitempty"`
DNSRecordType string `json:"msp_dns_record_type,omitempty"`
ExpectString string `json:"msp_expect_string,omitempty"`
Threshold int64 `json:"msp_threshold,omitempty"`
Sensitivity int64 `json:"msp_sensitivity,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
}
type CheckEscalation ¶ added in v2.2.0
type CheckEscalations ¶ added in v2.2.0
type CheckEscalations struct {
Escalations []CheckEscalation `json:"escalations"`
}
type CheckGetResponse ¶
type CheckGetResponse Check
func (CheckGetResponse) Item ¶
func (c CheckGetResponse) Item() Check
type CheckGroup ¶
type CheckGroup struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
Config CheckGroupConfig `json:"groupcheckconfig,omitempty"`
}
type CheckGroupConfig ¶
type CheckGroupConfig struct {
CheckServices []string `json:"group_check_services,omitempty"`
CheckTags []string `json:"group_check_tags,omitempty"`
CheckDownCondition string `json:"group_check_down_condition,omitempty"`
UptimePercentCalculation string `json:"group_uptime_percent_calculation,omitempty"`
ResponseTimeCalculationMode string `json:"group_response_time_calculation_mode,omitempty"`
ResponseTimeCheckType string `json:"group_response_time_check_type,omitempty"`
ResponseTimeSingleCheck string `json:"group_response_time_single_check,omitempty"`
}
type CheckHTTP ¶
type CheckHTTP struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Interval int64 `json:"msp_interval,omitempty"`
Address string `json:"msp_address,omitempty"`
Port int64 `json:"msp_port,omitempty"`
Username string `json:"msp_username,omitempty"`
Password string `json:"msp_password,omitempty"`
Proxy string `json:"msp_proxy,omitempty"`
StatusCode string `json:"msp_status_code,omitempty"`
SendString string `json:"msp_send_string,omitempty"`
ExpectString string `json:"msp_expect_string,omitempty"`
ExpectStringType string `json:"msp_expect_string_type,omitempty"`
Encryption *string `json:"msp_encryption,omitempty"`
Threshold int64 `json:"msp_threshold,omitempty"`
Headers string `json:"msp_headers,omitempty"`
Version int64 `json:"msp_version,omitempty"`
Sensitivity int64 `json:"msp_sensitivity,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UseIPVersion string `json:"msp_use_ip_version,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
}
type CheckHeartbeat ¶
type CheckHeartbeat struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Interval int64 `json:"msp_interval,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
HeartbeatURL string `json:"heartbeat_url,omitempty"`
}
type CheckICMP ¶
type CheckICMP struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Interval int64 `json:"msp_interval,omitempty"`
Address string `json:"msp_address,omitempty"`
Sensitivity int64 `json:"msp_sensitivity,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UseIPVersion string `json:"msp_use_ip_version,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
}
type CheckIMAP ¶
type CheckIMAP struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Interval int64 `json:"msp_interval,omitempty"`
Address string `json:"msp_address,omitempty"`
Port int64 `json:"msp_port,omitempty"`
ExpectString string `json:"msp_expect_string,omitempty"`
Encryption *string `json:"msp_encryption,omitempty"`
Sensitivity int64 `json:"msp_sensitivity,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UseIPVersion string `json:"msp_use_ip_version,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
}
type CheckListOptions ¶
type CheckListOptions struct {
Page int64 `url:"page,omitempty"`
PageSize int64 `url:"page_size,omitempty"`
Search string `url:"search,omitempty"`
Ordering string `url:"ordering,omitempty"`
MonitoringServiceType string `url:"monitoring_service_type,omitempty"`
IsPaused bool `url:"is_paused"`
StateIsUp bool `url:"state_is_up,omitempty"`
Tag []string `url:"tag,omitempty"`
}
CheckListOptions specifies the optional parameters to the CheckService.List method.
type CheckListResponse ¶
type CheckListResponse struct {
Count int64 `json:"count,omitempty"`
Results []Check `json:"results,omitempty"`
}
func (CheckListResponse) CountItems ¶ added in v2.6.0
func (r CheckListResponse) CountItems() int64
func (CheckListResponse) List ¶
func (r CheckListResponse) List() []Check
type CheckLocationListOptions ¶ added in v2.7.0
type CheckLocationListOptions struct{}
type CheckLocationListResponse ¶ added in v2.7.0
type CheckLocationListResponse struct {
Locations []string `json:"locations"`
}
func (CheckLocationListResponse) CountItems ¶ added in v2.7.0
func (r CheckLocationListResponse) CountItems() int64
func (CheckLocationListResponse) List ¶ added in v2.7.0
func (r CheckLocationListResponse) List() []string
type CheckMaintenance ¶
type CheckMaintenance struct {
State string `json:"state,omitempty"`
Schedule []CheckMaintenanceSchedule `json:"schedule,omitempty"`
PauseOnScheduledMaintenance *bool `json:"pause_on_scheduled_maintenance,omitempty"`
}
type CheckMaintenanceSchedule ¶
type CheckMaintenanceSchedule struct {
Type string `json:"type"`
FromTime string `json:"from_time,omitempty"`
ToTime string `json:"to_time,omitempty"`
Monthday int `json:"monthday,omitempty"`
MonthdayFrom int `json:"monthday_from,omitempty"`
MonthdayTo int `json:"monthday_to,omitempty"`
OnceStartDate string `json:"once_start_date,omitempty"`
OnceEndDate string `json:"once_end_date,omitempty"`
Weekdays []int `json:"weekdays,omitempty"`
}
type CheckMalware ¶
type CheckMalware struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Address string `json:"msp_address,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
}
type CheckNTP ¶
type CheckNTP struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Interval int64 `json:"msp_interval,omitempty"`
Address string `json:"msp_address,omitempty"`
Port int64 `json:"msp_port,omitempty"`
Threshold int64 `json:"msp_threshold,omitempty"`
Sensitivity int64 `json:"msp_sensitivity,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UseIPVersion string `json:"msp_use_ip_version,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
}
type CheckPOP ¶
type CheckPOP struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Interval int64 `json:"msp_interval,omitempty"`
Address string `json:"msp_address,omitempty"`
Port int64 `json:"msp_port,omitempty"`
ExpectString string `json:"msp_expect_string,omitempty"`
Encryption *string `json:"msp_encryption,omitempty"`
Sensitivity int64 `json:"msp_sensitivity,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UseIPVersion string `json:"msp_use_ip_version,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
}
type CheckPageSpeed ¶
type CheckPageSpeed struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Address string `json:"msp_address,omitempty"`
Interval int64 `json:"msp_interval,omitempty"`
Username string `json:"msp_username,omitempty"`
Password string `json:"msp_password,omitempty"`
Headers string `json:"msp_headers,omitempty"`
Script string `json:"msp_script,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
Notes string `json:"msp_notes,omitempty"`
Config CheckPageSpeedConfig `json:"pagespeedconfig,omitempty"`
}
type CheckPageSpeedConfig ¶
type CheckRDAP ¶
type CheckRDAP struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Address string `json:"msp_address,omitempty"`
ExpectString string `json:"msp_expect_string,omitempty"`
Threshold int64 `json:"msp_threshold,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
SendResolvedNotifications *bool `json:"msp_send_resolved_notifications,omitempty"`
}
type CheckRUM ¶
type CheckRUM struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Address string `json:"msp_address,omitempty"`
Threshold int64 `json:"msp_threshold,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
}
type CheckRUM2 ¶
type CheckRUM2 struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Address string `json:"msp_address,omitempty"`
Threshold int64 `json:"msp_threshold,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
}
type CheckSMTP ¶
type CheckSMTP struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Interval int64 `json:"msp_interval,omitempty"`
Address string `json:"msp_address,omitempty"`
Port int64 `json:"msp_port,omitempty"`
Username string `json:"msp_username,omitempty"`
Password string `json:"msp_password,omitempty"`
ExpectString string `json:"msp_expect_string,omitempty"`
Encryption *string `json:"msp_encryption,omitempty"`
Sensitivity int64 `json:"msp_sensitivity,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UseIpVersion string `json:"msp_use_ip_version,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
}
type CheckSSH ¶
type CheckSSH struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Interval int64 `json:"msp_interval,omitempty"`
Address string `json:"msp_address,omitempty"`
Port int64 `json:"msp_port,omitempty"`
Sensitivity int64 `json:"msp_sensitivity,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UseIpVersion string `json:"msp_use_ip_version,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
}
type CheckSSLCert ¶
type CheckSSLCert struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Protocol string `json:"msp_protocol,omitempty"`
Address string `json:"msp_address,omitempty"`
Port int64 `json:"msp_port,omitempty"`
Threshold int64 `json:"msp_threshold,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
SSLConfig CheckSSLCertConfig `json:"sslconfig,omitempty"`
}
type CheckSSLCertConfig ¶
type CheckSSLCertConfig struct {
Protocol string `json:"ssl_cert_protocol,omitempty" flag:"sslcert.protocol"`
CRL *bool `json:"ssl_cert_crl,omitempty" flag:"sslcert.crl"`
FirstElementOnly *bool `json:"ssl_cert_first_element_only,omitempty" flag:"sslcert.first-element-only"`
Match string `json:"ssl_cert_match,omitempty" flag:"sslcert.match"`
Issuer string `json:"ssl_cert_issuer,omitempty" flag:"sslcert.issuer"`
MinVersion string `json:"ssl_cert_minimum_ssl_tls_version,omitempty" flag:"sslcert.min-version"`
Fingerprint string `json:"ssl_cert_fingerprint,omitempty" flag:"sslcert.fingerprint"`
SelfSigned bool `json:"ssl_cert_selfsigned,omitempty" flag:"sslcert.self-signed"`
URL string `json:"ssl_cert_file,omitempty" flag:"sslcert.url"`
Resolve string `json:"ssl_cert_resolve,omitempty" flag:"sslcert.resolve"`
IgnoreAuthorityWarnings bool `json:"ssl_ignore_authority_warnings,omitempty" flag:"sslcert.ignore-authority-warnings"`
IgnoreSCT bool `json:"ssl_ignore_sct,omitempty" flag:"sslcert.ignore-sct"`
}
type CheckStats ¶
type CheckStatsOptions ¶
type CheckStatsOptions struct {
StartDate string `url:"start_date,omitempty"`
EndDate string `url:"end_date,omitempty"`
Location string `url:"location,omitempty"`
LocationsResponseTimes bool `url:"locations_response_times,omitempty"`
IncludeAlerts bool `url:"include_alerts,omitempty"`
Download bool `url:"download,omitempty"`
PDF bool `url:"pdf,omitempty"`
}
CheckStatsOptions specifies the parameters to /api/v1/checks/{pk}/stats/ endpoint
type CheckStatsResponse ¶
type CheckStatsResponse struct {
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
Totals struct {
Outages int64 `json:"outages,omitempty"`
DowntimeSecs int64 `json:"downtime_secs,omitempty"`
} `json:"totals"`
Statistics []CheckStats `json:"statistics"`
}
CheckStatsResponse represents the API response to a Stats query
func (CheckStatsResponse) CountItems ¶ added in v2.6.0
func (c CheckStatsResponse) CountItems() int64
func (CheckStatsResponse) List ¶
func (c CheckStatsResponse) List() []CheckStats
type CheckTCP ¶
type CheckTCP struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Interval int64 `json:"msp_interval,omitempty"`
Address string `json:"msp_address,omitempty"`
Port int64 `json:"msp_port,omitempty"`
SendString string `json:"msp_send_string,omitempty"`
ExpectString string `json:"msp_expect_string,omitempty"`
Sensitivity int64 `json:"msp_sensitivity,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UseIpVersion string `json:"msp_use_ip_version,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
Encryption *string `json:"msp_encryption,omitempty"`
}
type CheckTransaction ¶
type CheckTransaction struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Interval int64 `json:"msp_interval,omitempty"`
Threshold int64 `json:"msp_threshold,omitempty"`
Script string `json:"msp_script,omitempty"`
Sensitivity int64 `json:"msp_sensitivity,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
}
type CheckUDP ¶
type CheckUDP struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Interval int64 `json:"msp_interval,omitempty"`
Address string `json:"msp_address,omitempty"`
Port int64 `json:"msp_port,omitempty"`
SendString string `json:"msp_send_string,omitempty"`
ExpectString string `json:"msp_expect_string,omitempty"`
Sensitivity int64 `json:"msp_sensitivity,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UseIpVersion string `json:"msp_use_ip_version,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
}
type CheckWHOIS ¶
type CheckWHOIS struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
Address string `json:"msp_address,omitempty"`
ExpectString string `json:"msp_expect_string,omitempty"`
Threshold int64 `json:"msp_threshold,omitempty"`
NumRetries int64 `json:"msp_num_retries,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
}
type CheckWebhook ¶
type CheckWebhook struct {
Name string `json:"name,omitempty"`
ContactGroups *[]string `json:"contact_groups,omitempty"`
Locations []string `json:"locations,omitempty"`
Tags []string `json:"tags,omitempty"`
IsPaused *bool `json:"is_paused,omitempty"`
UptimeSLA decimal.Decimal `json:"msp_uptime_sla,omitempty"`
ResponseTimeSLA decimal.Decimal `json:"msp_response_time_sla,omitempty"`
Notes string `json:"msp_notes,omitempty"`
IncludeInGlobalMetrics *bool `json:"msp_include_in_global_metrics,omitempty"`
WebhookUrl string `json:"webhook_url,omitempty"`
}
type ChecksEndpoint ¶
type ChecksEndpoint interface {
List(context.Context, CheckListOptions) (*ListResult[Check], error)
Get(context.Context, PrimaryKeyable) (*Check, error)
Delete(context.Context, PrimaryKeyable) error
Stats(context.Context, PrimaryKeyable, CheckStatsOptions) (*ListResult[CheckStats], error)
ListLocations(context.Context) (*ListResult[string], error)
CreateAPI(context.Context, CheckAPI) (*Check, error)
UpdateAPI(context.Context, PrimaryKeyable, CheckAPI) (*Check, error)
CreateBlacklist(context.Context, CheckBlacklist) (*Check, error)
UpdateBlacklist(context.Context, PrimaryKeyable, CheckBlacklist) (*Check, error)
CreateDNS(context.Context, CheckDNS) (*Check, error)
UpdateDNS(context.Context, PrimaryKeyable, CheckDNS) (*Check, error)
CreateGroup(context.Context, CheckGroup) (*Check, error)
UpdateGroup(context.Context, PrimaryKeyable, CheckGroup) (*Check, error)
CreateHeartbeat(context.Context, CheckHeartbeat) (*Check, error)
UpdateHeartbeat(context.Context, PrimaryKeyable, CheckHeartbeat) (*Check, error)
CreateHTTP(context.Context, CheckHTTP) (*Check, error)
UpdateHTTP(context.Context, PrimaryKeyable, CheckHTTP) (*Check, error)
CreateICMP(context.Context, CheckICMP) (*Check, error)
UpdateICMP(context.Context, PrimaryKeyable, CheckICMP) (*Check, error)
CreateIMAP(context.Context, CheckIMAP) (*Check, error)
UpdateIMAP(context.Context, PrimaryKeyable, CheckIMAP) (*Check, error)
CreateMalware(context.Context, CheckMalware) (*Check, error)
UpdateMalware(context.Context, PrimaryKeyable, CheckMalware) (*Check, error)
CreateNTP(context.Context, CheckNTP) (*Check, error)
UpdateNTP(context.Context, PrimaryKeyable, CheckNTP) (*Check, error)
CreatePOP(context.Context, CheckPOP) (*Check, error)
UpdatePOP(context.Context, PrimaryKeyable, CheckPOP) (*Check, error)
CreateRUM(context.Context, CheckRUM) (*Check, error)
UpdateRUM(context.Context, PrimaryKeyable, CheckRUM) (*Check, error)
CreateRUM2(context.Context, CheckRUM2) (*Check, error)
UpdateRUM2(context.Context, PrimaryKeyable, CheckRUM2) (*Check, error)
CreateSMTP(context.Context, CheckSMTP) (*Check, error)
UpdateSMTP(context.Context, PrimaryKeyable, CheckSMTP) (*Check, error)
CreateSSH(context.Context, CheckSSH) (*Check, error)
UpdateSSH(context.Context, PrimaryKeyable, CheckSSH) (*Check, error)
CreateSSLCert(context.Context, CheckSSLCert) (*Check, error)
UpdateSSLCert(context.Context, PrimaryKeyable, CheckSSLCert) (*Check, error)
CreateTCP(context.Context, CheckTCP) (*Check, error)
UpdateTCP(context.Context, PrimaryKeyable, CheckTCP) (*Check, error)
CreateTransaction(context.Context, CheckTransaction) (*Check, error)
UpdateTransaction(context.Context, PrimaryKeyable, CheckTransaction) (*Check, error)
CreateUDP(context.Context, CheckUDP) (*Check, error)
UpdateUDP(context.Context, PrimaryKeyable, CheckUDP) (*Check, error)
CreateWebhook(context.Context, CheckWebhook) (*Check, error)
UpdateWebhook(context.Context, PrimaryKeyable, CheckWebhook) (*Check, error)
CreateWHOIS(context.Context, CheckWHOIS) (*Check, error)
UpdateWHOIS(context.Context, PrimaryKeyable, CheckWHOIS) (*Check, error)
CreateRDAP(context.Context, CheckRDAP) (*Check, error)
UpdateRDAP(context.Context, PrimaryKeyable, CheckRDAP) (*Check, error)
CreatePageSpeed(context.Context, CheckPageSpeed) (*Check, error)
UpdatePageSpeed(context.Context, PrimaryKeyable, CheckPageSpeed) (*Check, error)
CreateCloudStatus(context.Context, CheckCloudStatus) (*Check, error)
UpdateCloudStatus(context.Context, PrimaryKeyable, CheckCloudStatus) (*Check, error)
ListCloudStatusGroups(context.Context, CloudStatusGroupListOptions) (*ListResult[CloudStatusGroupListItem], error)
ListCloudStatusServices(context.Context, CloudStatusServiceListOptions) (*ListResult[CloudStatusService], error)
UpdateMaintenance(context.Context, PrimaryKeyable, CheckMaintenance) (*Check, error)
GetEscalations(context.Context, PrimaryKeyable) (*CheckEscalations, error)
UpdateEscalations(context.Context, PrimaryKeyable, CheckEscalations) (*CheckEscalations, error)
}
func NewChecksEndpoint ¶
func NewChecksEndpoint(cbd CBD) ChecksEndpoint
type CloudStatusGroup ¶ added in v2.11.0
CloudStatusGroup references a cloud status group by ID. On write (POST/PUT) it serializes as the group's integer ID, matching the legacy request format. On read (GET) the server returns a nested `{"id": ..., "name": ...}` object, so UnmarshalJSON accepts either shape - bare integer or nested object.
func (CloudStatusGroup) MarshalJSON ¶ added in v2.11.0
func (g CloudStatusGroup) MarshalJSON() ([]byte, error)
func (*CloudStatusGroup) UnmarshalJSON ¶ added in v2.11.0
func (g *CloudStatusGroup) UnmarshalJSON(data []byte) error
type CloudStatusGroupListItem ¶ added in v2.12.0
CloudStatusGroupListItem is the read-only item shape returned by the /checks/cloudstatus-groups/ lookup endpoint. It is intentionally separate from CloudStatusGroup, which has a custom MarshalJSON that serializes as a bare integer for the check-config write path - re-marshaling a list item through that type would silently drop the Name.
type CloudStatusGroupListOptions ¶ added in v2.12.0
type CloudStatusGroupListResponse ¶ added in v2.12.0
type CloudStatusGroupListResponse struct {
Count int64 `json:"count,omitempty"`
Results []CloudStatusGroupListItem `json:"results,omitempty"`
}
func (CloudStatusGroupListResponse) CountItems ¶ added in v2.12.0
func (r CloudStatusGroupListResponse) CountItems() int64
func (CloudStatusGroupListResponse) List ¶ added in v2.12.0
func (r CloudStatusGroupListResponse) List() []CloudStatusGroupListItem
type CloudStatusService ¶ added in v2.12.0
type CloudStatusServiceListOptions ¶ added in v2.12.0
type CloudStatusServiceListResponse ¶ added in v2.12.0
type CloudStatusServiceListResponse struct {
Count int64 `json:"count,omitempty"`
Results []CloudStatusService `json:"results,omitempty"`
}
func (CloudStatusServiceListResponse) CountItems ¶ added in v2.12.0
func (r CloudStatusServiceListResponse) CountItems() int64
func (CloudStatusServiceListResponse) List ¶ added in v2.12.0
func (r CloudStatusServiceListResponse) List() []CloudStatusService
type Contact ¶
type Contact struct {
PK int64 `json:"pk,omitempty"`
URL string `json:"url,omitempty"`
Name string `json:"name,omitempty"`
SmsList []string `json:"sms_list,omitempty"`
EmailList []string `json:"email_list,omitempty"`
PhonecallList []string `json:"phonecall_list,omitempty"`
Integrations []string `json:"integrations,omitempty"`
PushNotificationProfiles []string `json:"push_notification_profiles,omitempty"`
}
func (Contact) PrimaryKey ¶
func (c Contact) PrimaryKey() PrimaryKey
type ContactCreateUpdateResponse ¶
type ContactCreateUpdateResponse struct {
Results Contact `json:"results,omitempty"`
}
func (ContactCreateUpdateResponse) Item ¶
func (r ContactCreateUpdateResponse) Item() Contact
type ContactListOptions ¶
type ContactListResponse ¶
type ContactListResponse struct {
Count int64 `json:"count,omitempty"`
Results []Contact `json:"results,omitempty"`
}
func (ContactListResponse) CountItems ¶ added in v2.6.0
func (r ContactListResponse) CountItems() int64
func (ContactListResponse) List ¶
func (r ContactListResponse) List() []Contact
type ContactResponse ¶
type ContactResponse Contact
func (ContactResponse) Item ¶
func (r ContactResponse) Item() Contact
type ContactsEndpoint ¶
type ContactsEndpoint interface {
List(context.Context, ContactListOptions) (*ListResult[Contact], error)
Create(context.Context, Contact) (*Contact, error)
Update(context.Context, PrimaryKeyable, Contact) (*Contact, error)
Get(context.Context, PrimaryKeyable) (*Contact, error)
Delete(context.Context, PrimaryKeyable) error
}
func NewContactsEndpoint ¶
func NewContactsEndpoint(cbd CBD) ContactsEndpoint
type Credential ¶
type Credential struct {
PK int64 `json:"id,omitempty"`
DisplayName string `json:"display_name,omitempty"`
Description string `json:"description,omitempty"`
CredentialType string `json:"credential_type"`
Hint string `json:"hint,omitempty"`
Username string `json:"username,omitempty"`
Version string `json:"version,omitempty"`
UsedSecretProperties []string `json:"used_secret_properties,omitempty"`
CreatedBy int64 `json:"created_by,omitempty"`
Secret CredentialSecret `json:"secret"`
}
func (Credential) PrimaryKey ¶
func (c Credential) PrimaryKey() PrimaryKey
type CredentialCreateUpdateResponse ¶
type CredentialCreateUpdateResponse struct {
Results Credential `json:"results,omitempty"`
}
func (CredentialCreateUpdateResponse) Item ¶
func (r CredentialCreateUpdateResponse) Item() Credential
type CredentialEndpoint ¶
type CredentialEndpoint interface {
List(context.Context, CredentialListOptions) (*ListResult[Credential], error)
Create(context.Context, Credential) (*Credential, error)
Update(context.Context, PrimaryKeyable, Credential) (*Credential, error)
Get(context.Context, PrimaryKeyable) (*Credential, error)
Delete(context.Context, PrimaryKeyable) error
}
func NewCredentialsEndpoint ¶
func NewCredentialsEndpoint(cbd CBD) CredentialEndpoint
type CredentialListOptions ¶
type CredentialListResponse ¶
type CredentialListResponse struct {
Count int64 `json:"count,omitempty"`
Results []Credential `json:"results,omitempty"`
}
func (CredentialListResponse) CountItems ¶ added in v2.6.0
func (r CredentialListResponse) CountItems() int64
func (CredentialListResponse) List ¶
func (r CredentialListResponse) List() []Credential
type CredentialResponse ¶
type CredentialResponse Credential
func (CredentialResponse) Item ¶
func (r CredentialResponse) Item() Credential
type CredentialSecret ¶
type Dashboard ¶
type Dashboard struct {
PK int64 `json:"pk,omitempty"`
ServicesSelected []string `json:"services_selected"`
ServicesTags []string `json:"services_tags"`
Ordering int64 `json:"ordering"`
Name string `json:"name"`
IsPinned bool `json:"is_pinned"`
MetricsShowSection bool `json:"metrics_show_section"`
MetricsForAllChecks bool `json:"metrics_for_all_checks"`
ServicesShowSection bool `json:"services_show_section"`
ServicesNumToShow int64 `json:"services_num_to_show"`
ServicesIncludeUp bool `json:"services_include_up"`
ServicesIncludeDown bool `json:"services_include_down"`
ServicesIncludePaused bool `json:"services_include_paused"`
ServicesIncludeMaintenance bool `json:"services_include_maintenance"`
ServicesPrimarySort string `json:"services_primary_sort"`
ServicesSecondarySort string `json:"services_secondary_sort"`
ServicesShowUptime bool `json:"services_show_uptime"`
ServicesShowResponseTime bool `json:"services_show_response_time"`
AlertsShowSection bool `json:"alerts_show_section"`
AlertsForAllChecks bool `json:"alerts_for_all_checks"`
AlertsIncludeIgnored bool `json:"alerts_include_ignored"`
AlertsincludeResolved bool `json:"alerts_include_resolved"`
AlertsnumToShow int64 `json:"alerts_num_to_show"`
}
func (Dashboard) PrimaryKey ¶
func (d Dashboard) PrimaryKey() PrimaryKey
type DashboardCreateUpdateResponse ¶
type DashboardCreateUpdateResponse struct {
Results Dashboard `json:"results,omitempty"`
}
func (DashboardCreateUpdateResponse) Item ¶
func (r DashboardCreateUpdateResponse) Item() Dashboard
type DashboardListOptions ¶
type DashboardListResponse ¶
type DashboardListResponse struct {
Count int64 `json:"count,omitempty"`
Results []Dashboard `json:"results,omitempty"`
}
func (DashboardListResponse) CountItems ¶ added in v2.6.0
func (r DashboardListResponse) CountItems() int64
func (DashboardListResponse) List ¶
func (r DashboardListResponse) List() []Dashboard
type DashboardResponse ¶
type DashboardResponse Dashboard
func (DashboardResponse) Item ¶
func (d DashboardResponse) Item() Dashboard
type DashboardsEndpoint ¶
type DashboardsEndpoint interface {
List(context.Context, DashboardListOptions) (*ListResult[Dashboard], error)
Create(context.Context, Dashboard) (*Dashboard, error)
Update(context.Context, PrimaryKeyable, Dashboard) (*Dashboard, error)
Get(context.Context, PrimaryKeyable) (*Dashboard, error)
Delete(context.Context, PrimaryKeyable) error
}
func NewDashboardsEndpoint ¶
func NewDashboardsEndpoint(cbd CBD) DashboardsEndpoint
type EndpointCreator ¶
type EndpointCreator[RequestType any, ResponseType Itemable[ItemType], ItemType any] interface { Create(ctx context.Context, arg RequestType) (*ItemType, error) }
EndpointCreator is a generic interface for creating an item from an endpoint.
func NewEndpointCreator ¶
type EndpointDeleter ¶
type EndpointDeleter interface {
Delete(ctx context.Context, pk PrimaryKeyable) error
}
EndpointDeleter is a generic interface for deleting an item from an endpoint.
func NewEndpointDeleter ¶
func NewEndpointDeleter(cbd CBD, endpoint string) EndpointDeleter
type EndpointGetter ¶
type EndpointGetter[ResponseType Itemable[ItemType], ItemType any] interface { Get(ctx context.Context, pk PrimaryKeyable) (*ItemType, error) }
EndpointGetter is a generic interface for getting a single item from an endpoint.
func NewEndpointGetter ¶
func NewEndpointGetter[ResponseType Itemable[ItemType], ItemType any](cbd CBD, endpoint string) EndpointGetter[ResponseType, ItemType]
type EndpointLister ¶
type EndpointLister[ResponseType Listable[ItemType], ItemType any, OptionsType any] interface { List(ctx context.Context, opts OptionsType) (*ListResult[ItemType], error) }
EndpointLister is a generic interface for listing items from an endpoint.
func NewEndpointLister ¶
type EndpointUpdater ¶
type EndpointUpdater[ArgumentType any, ResultType Itemable[ItemType], ItemType any] interface { Update(ctx context.Context, pk PrimaryKeyable, arg ArgumentType) (*ItemType, error) }
EndpointUpdater is a generic interface for updating an item from an endpoint.
func NewEndpointUpdater ¶
type Error ¶
type Error struct {
Response *http.Response
Code string `json:"error_code"`
Message string `json:"error_message"`
Fields FieldErrors `json:"error_fields,omitempty"`
}
type FieldErrors ¶ added in v2.11.0
FieldErrors is the decoded `error_fields` payload. The server returns a flat `field -> [msg, ...]` map for top-level field errors and a nested `field -> {subfield: [msg, ...]}` object when the offending field is itself a structured value (e.g. `cloudstatusconfig.service_name`). UnmarshalJSON flattens nested objects into dotted-path keys so callers always see a flat `map[string][]any`.
func (*FieldErrors) UnmarshalJSON ¶ added in v2.11.0
func (f *FieldErrors) UnmarshalJSON(data []byte) error
type IncidentAffectedComponent ¶
type IncidentAffectedComponent struct {
PK int64 `json:"id"`
}
type IncidentAffectedComponentEntity ¶
type IncidentAffectedComponentEntity struct {
PK int64 `json:"id"`
Status string `json:"status"`
Component IncidentAffectedComponent `json:"component"`
}
type IncidentUpdate ¶
type Integration ¶
type Integration struct {
PK int64 `json:"pk,omitempty"`
URL string `json:"url,omitempty"`
Name string `json:"name,omitempty"`
Module string `json:"module,omitempty"`
ContactGroups []string `json:"contact_groups,omitempty"`
IsErrored bool `json:"is_errored,omitempty"`
LastError string `json:"last_error,omitempty"`
// Optional fields for particular integrations
APIEndpoint string `json:"api_endpoint,omitempty"`
APIKey string `json:"api_key,omitempty"`
Teams string `json:"teams,omitempty"`
Tags string `json:"tags,omitempty"`
Autoresolve bool `json:"autoresolve,omitempty"`
}
Integration represents an integration in Uptime.com.
func (Integration) Item ¶
func (r Integration) Item() Integration
func (Integration) PrimaryKey ¶
func (i Integration) PrimaryKey() PrimaryKey
type IntegrationCachet ¶
type IntegrationCachet struct {
PK int64 `json:"pk,omitempty"`
CachetURL string `json:"url,omitempty"`
Name string `json:"name,omitempty"`
ContactGroups []string `json:"contact_groups,omitempty"`
Token string `json:"token,omitempty"`
Component string `json:"component,omitempty"`
Metric string `json:"metric,omitempty"`
}
func (IntegrationCachet) PrimaryKey ¶
func (i IntegrationCachet) PrimaryKey() PrimaryKey
type IntegrationDatadog ¶
type IntegrationGeckoboard ¶
type IntegrationJiraServicedesk ¶
type IntegrationJiraServicedesk struct {
Name string `json:"name,omitempty"`
ContactGroups []string `json:"contact_groups,omitempty"`
APIEmail string `json:"api_email,omitempty"`
APIToken string `json:"api_token,omitempty"`
JiraSubdomain string `json:"jira_subdomain,omitempty"`
ProjectKey string `json:"project_key,omitempty"`
Labels string `json:"labels,omitempty"`
CustomFieldIdAccountName int64 `json:"custom_field_id_account_name,omitempty"`
CustomFieldIdCheckName int64 `json:"custom_field_id_check_name,omitempty"`
CustomFieldIdCheckUrl int64 `json:"custom_field_id_check_url,omitempty"`
CustomFieldsJson string `json:"custom_fields_json,omitempty"`
}
type IntegrationKlipfolio ¶
type IntegrationLibrato ¶
type IntegrationListOptions ¶
type IntegrationListResponse ¶
type IntegrationListResponse struct {
Count int64 `json:"count,omitempty"`
Next string `json:"next,omitempty"`
Previous string `json:"previous,omitempty"`
Results []Integration `json:"results,omitempty"`
}
func (IntegrationListResponse) CountItems ¶ added in v2.6.0
func (r IntegrationListResponse) CountItems() int64
func (IntegrationListResponse) List ¶
func (r IntegrationListResponse) List() []Integration
type IntegrationOpsgenie ¶
type IntegrationOpsgenie struct {
Name string `json:"name,omitempty"`
ContactGroups []string `json:"contact_groups,omitempty"`
APIEndpoint string `json:"api_endpoint,omitempty"`
APIKey string `json:"api_key,omitempty"`
Teams string `json:"teams,omitempty"`
Tags string `json:"tags,omitempty"`
Autoresolve bool `json:"autoresolve"`
}
type IntegrationPagerduty ¶
type IntegrationPushbullet ¶
type IntegrationPushover ¶
type IntegrationResponse ¶
type IntegrationResponse struct {
Results Integration `json:"results,omitempty"`
}
func (IntegrationResponse) Item ¶
func (r IntegrationResponse) Item() Integration
type IntegrationSlack ¶
type IntegrationStatus ¶
type IntegrationStatus struct {
Name string `json:"name,omitempty"`
ContactGroups []string `json:"contact_groups,omitempty"`
StatuspageID string `json:"statuspage_id,omitempty"`
APIID string `json:"api_id,omitempty"`
APIKey string `json:"api_key,omitempty"`
Component string `json:"component,omitempty"`
Container string `json:"container,omitempty"`
Metric string `json:"metric,omitempty"`
}
type IntegrationStatuspage ¶
type IntegrationTwitter ¶
type IntegrationVictorops ¶
type IntegrationWavefront ¶
type IntegrationWebhook ¶
type IntegrationZapier ¶
type IntegrationsEndpoint ¶
type IntegrationsEndpoint interface {
List(context.Context, IntegrationListOptions) (*ListResult[Integration], error)
Get(context.Context, PrimaryKeyable) (*Integration, error)
Delete(context.Context, PrimaryKeyable) error
CreateCachet(context.Context, IntegrationCachet) (*Integration, error)
UpdateCachet(context.Context, PrimaryKeyable, IntegrationCachet) (*Integration, error)
CreateDatadog(context.Context, IntegrationDatadog) (*Integration, error)
UpdateDatadog(context.Context, PrimaryKeyable, IntegrationDatadog) (*Integration, error)
CreateGeckoboard(context.Context, IntegrationGeckoboard) (*Integration, error)
UpdateGeckoboard(context.Context, PrimaryKeyable, IntegrationGeckoboard) (*Integration, error)
CreateJiraServicedesk(context.Context, IntegrationJiraServicedesk) (*Integration, error)
UpdateJiraServiceDesk(context.Context, PrimaryKeyable, IntegrationJiraServicedesk) (*Integration, error)
CreateKlipfolio(context.Context, IntegrationKlipfolio) (*Integration, error)
UpdateKlipfolio(context.Context, PrimaryKeyable, IntegrationKlipfolio) (*Integration, error)
CreateLibrato(context.Context, IntegrationLibrato) (*Integration, error)
UpdateLibrato(context.Context, PrimaryKeyable, IntegrationLibrato) (*Integration, error)
CreateMicrosoftTeams(context.Context, IntegrationMicrosoftTeams) (*Integration, error)
UpdateMicrosoftTeams(context.Context, PrimaryKeyable, IntegrationMicrosoftTeams) (*Integration, error)
CreateOpsgenie(context.Context, IntegrationOpsgenie) (*Integration, error)
UpdateOpsgenie(context.Context, PrimaryKeyable, IntegrationOpsgenie) (*Integration, error)
CreatePagerduty(context.Context, IntegrationPagerduty) (*Integration, error)
UpdatePagerduty(context.Context, PrimaryKeyable, IntegrationPagerduty) (*Integration, error)
CreatePushbullet(context.Context, IntegrationPushbullet) (*Integration, error)
UpdatePushbullet(context.Context, PrimaryKeyable, IntegrationPushbullet) (*Integration, error)
CreatePushover(context.Context, IntegrationPushover) (*Integration, error)
UpdatePushover(context.Context, PrimaryKeyable, IntegrationPushover) (*Integration, error)
CreateSlack(context.Context, IntegrationSlack) (*Integration, error)
UpdateSlack(context.Context, PrimaryKeyable, IntegrationSlack) (*Integration, error)
CreateStatus(context.Context, IntegrationStatus) (*Integration, error)
UpdateStatus(context.Context, PrimaryKeyable, IntegrationStatus) (*Integration, error)
CreateStatuspage(context.Context, IntegrationStatuspage) (*Integration, error)
UpdateStatuspage(context.Context, PrimaryKeyable, IntegrationStatuspage) (*Integration, error)
CreateTwitter(context.Context, IntegrationTwitter) (*Integration, error)
UpdateTwitter(context.Context, PrimaryKeyable, IntegrationTwitter) (*Integration, error)
CreateVictorops(context.Context, IntegrationVictorops) (*Integration, error)
UpdateVictorops(context.Context, PrimaryKeyable, IntegrationVictorops) (*Integration, error)
CreateWavefront(context.Context, IntegrationWavefront) (*Integration, error)
UpdateWavefront(context.Context, PrimaryKeyable, IntegrationWavefront) (*Integration, error)
CreateWebhook(context.Context, IntegrationWebhook) (*Integration, error)
UpdateWebhook(context.Context, PrimaryKeyable, IntegrationWebhook) (*Integration, error)
CreateZapier(context.Context, IntegrationZapier) (*Integration, error)
UpdateZapier(context.Context, PrimaryKeyable, IntegrationZapier) (*Integration, error)
}
func NewIntegrationsEndpoint ¶
func NewIntegrationsEndpoint(cbd CBD) IntegrationsEndpoint
type ListResult ¶ added in v2.6.0
ListResult contains items and total count from list responses.
type MaintenanceContactGroup ¶ added in v2.13.0
type MaintenanceContactGroup struct {
PK int64 `json:"id,omitempty"`
Name string `json:"name,omitempty"`
}
MaintenanceContactGroup is the nested contact-group object in read responses.
type MaintenanceNotificationCreateUpdateResponse ¶ added in v2.13.0
type MaintenanceNotificationCreateUpdateResponse struct {
Results MaintenanceScheduleNotification `json:"results,omitempty"`
}
type MaintenanceNotificationListOptions ¶ added in v2.13.0
type MaintenanceNotificationListResponse ¶ added in v2.13.0
type MaintenanceNotificationListResponse struct {
Count int64 `json:"count,omitempty"`
Results []MaintenanceScheduleNotification `json:"results,omitempty"`
}
func (MaintenanceNotificationListResponse) CountItems ¶ added in v2.13.0
func (r MaintenanceNotificationListResponse) CountItems() int64
func (MaintenanceNotificationListResponse) List ¶ added in v2.13.0
func (r MaintenanceNotificationListResponse) List() []MaintenanceScheduleNotification
type MaintenanceNotificationResponse ¶ added in v2.13.0
type MaintenanceNotificationResponse MaintenanceScheduleNotification
func (MaintenanceNotificationResponse) Item ¶ added in v2.13.0
func (r MaintenanceNotificationResponse) Item() MaintenanceScheduleNotification
type MaintenanceNotificationsEndpoint ¶ added in v2.13.0
type MaintenanceNotificationsEndpoint interface {
List(context.Context, MaintenanceNotificationListOptions) (*ListResult[MaintenanceScheduleNotification], error)
Create(context.Context, MaintenanceScheduleNotificationInput) (*MaintenanceScheduleNotification, error)
Update(context.Context, PrimaryKeyable, MaintenanceScheduleNotificationInput) (*MaintenanceScheduleNotification, error)
Get(context.Context, PrimaryKeyable) (*MaintenanceScheduleNotification, error)
Delete(context.Context, PrimaryKeyable) error
}
func NewMaintenanceNotificationsEndpoint ¶ added in v2.13.0
func NewMaintenanceNotificationsEndpoint(cbd CBD) MaintenanceNotificationsEndpoint
type MaintenanceSchedule ¶ added in v2.13.0
type MaintenanceSchedule struct {
PK int64 `json:"id,omitempty"`
Name string `json:"name,omitempty"`
ScheduleType string `json:"schedule_type,omitempty"`
StartsAt string `json:"starts_at,omitempty"`
EndsAt string `json:"ends_at,omitempty"`
RRule string `json:"rrule,omitempty"`
DurationMinutes *int64 `json:"duration_minutes,omitempty"`
IsActive bool `json:"is_active"`
PauseChecksDuringMaintenance bool `json:"pause_checks_during_maintenance"`
Services []MaintenanceService `json:"services,omitempty"`
Tags []MaintenanceTag `json:"tags,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
ModifiedAt string `json:"modified_at,omitempty"`
}
MaintenanceSchedule is the read/result representation of a maintenance schedule.
func (MaintenanceSchedule) PrimaryKey ¶ added in v2.13.0
func (m MaintenanceSchedule) PrimaryKey() PrimaryKey
type MaintenanceScheduleCreateUpdateResponse ¶ added in v2.13.0
type MaintenanceScheduleCreateUpdateResponse struct {
Results MaintenanceSchedule `json:"results,omitempty"`
}
func (MaintenanceScheduleCreateUpdateResponse) Item ¶ added in v2.13.0
func (r MaintenanceScheduleCreateUpdateResponse) Item() MaintenanceSchedule
type MaintenanceScheduleInput ¶ added in v2.13.0
type MaintenanceScheduleInput struct {
Name string `json:"name"`
ScheduleType string `json:"schedule_type"`
StartsAt string `json:"starts_at"`
EndsAt *string `json:"ends_at"`
RRule string `json:"rrule"`
DurationMinutes *int64 `json:"duration_minutes"`
IsActive bool `json:"is_active"`
PauseChecksDuringMaintenance bool `json:"pause_checks_during_maintenance"`
Services []int64 `json:"services"`
Tags []int64 `json:"tags"`
}
MaintenanceScheduleInput is the write representation (services/tags as ID lists). No omitempty on scalar fields: Terraform always sends the full desired state, and PATCH must overwrite (e.g. is_active=false must not be dropped).
type MaintenanceScheduleListOptions ¶ added in v2.13.0
type MaintenanceScheduleListResponse ¶ added in v2.13.0
type MaintenanceScheduleListResponse struct {
Count int64 `json:"count,omitempty"`
Results []MaintenanceSchedule `json:"results,omitempty"`
}
func (MaintenanceScheduleListResponse) CountItems ¶ added in v2.13.0
func (r MaintenanceScheduleListResponse) CountItems() int64
func (MaintenanceScheduleListResponse) List ¶ added in v2.13.0
func (r MaintenanceScheduleListResponse) List() []MaintenanceSchedule
type MaintenanceScheduleNotification ¶ added in v2.13.0
type MaintenanceScheduleNotification struct {
PK int64 `json:"id,omitempty"`
ScheduleID int64 `json:"schedule_id,omitempty"`
Offset int64 `json:"-"`
OffsetRaw string `json:"offset,omitempty"`
Event string `json:"event,omitempty"`
ContactGroups []MaintenanceContactGroup `json:"contact_groups,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
ModifiedAt string `json:"modified_at,omitempty"`
}
MaintenanceScheduleNotification is the read representation. Offset (seconds) is derived from the Django duration string OffsetRaw via withParsedOffset(), which is applied in every response type's Item()/List() conversion below.
IMPORTANT: do NOT add a custom UnmarshalJSON to this type. The detail/create/update responses decode into the NAMED types MaintenanceNotificationResponse / MaintenanceNotificationCreateUpdateResponse, which do not inherit methods from this underlying type, so an UnmarshalJSON here would silently never run on those paths. Parsing inside Item()/List() covers all paths uniformly.
func (MaintenanceScheduleNotification) PrimaryKey ¶ added in v2.13.0
func (n MaintenanceScheduleNotification) PrimaryKey() PrimaryKey
type MaintenanceScheduleNotificationInput ¶ added in v2.13.0
type MaintenanceScheduleNotificationInput struct {
ScheduleID int64 `json:"schedule_id"`
Offset int64 `json:"offset"`
Event string `json:"event"`
ContactGroups []int64 `json:"contact_groups"`
}
MaintenanceScheduleNotificationInput is the write representation (offset in seconds).
type MaintenanceScheduleResponse ¶ added in v2.13.0
type MaintenanceScheduleResponse MaintenanceSchedule
func (MaintenanceScheduleResponse) Item ¶ added in v2.13.0
func (r MaintenanceScheduleResponse) Item() MaintenanceSchedule
type MaintenanceSchedulesEndpoint ¶ added in v2.13.0
type MaintenanceSchedulesEndpoint interface {
List(context.Context, MaintenanceScheduleListOptions) (*ListResult[MaintenanceSchedule], error)
Create(context.Context, MaintenanceScheduleInput) (*MaintenanceSchedule, error)
Update(context.Context, PrimaryKeyable, MaintenanceScheduleInput) (*MaintenanceSchedule, error)
Get(context.Context, PrimaryKeyable) (*MaintenanceSchedule, error)
Delete(context.Context, PrimaryKeyable) error
}
func NewMaintenanceSchedulesEndpoint ¶ added in v2.13.0
func NewMaintenanceSchedulesEndpoint(cbd CBD) MaintenanceSchedulesEndpoint
type MaintenanceService ¶ added in v2.13.0
type MaintenanceService struct {
PK int64 `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Address string `json:"address,omitempty"`
Type string `json:"type,omitempty"`
}
MaintenanceService is the nested service object returned in read responses.
type MaintenanceTag ¶ added in v2.13.0
type MaintenanceTag struct {
PK int64 `json:"id,omitempty"`
Tag string `json:"tag,omitempty"`
ColorHex string `json:"color_hex,omitempty"`
}
MaintenanceTag is the nested tag object returned in read responses.
type Option ¶
func WithBaseURL ¶
func WithBearerToken ¶ added in v2.8.0
func WithRateLimit ¶
func WithRateLimitEvery ¶
func WithSubaccount ¶
func WithUserAgent ¶
type Outage ¶
type Outage struct {
PK int64 `json:"pk,omitempty"`
URL string `json:"url,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
ResolvedAt time.Time `json:"resolved_at,omitempty"`
DurationSecs int64 `json:"duration_secs,omitempty"`
IgnoreAlertURL string `json:"ignore_alert_url,omitempty"`
CheckPK int64 `json:"check_pk,omitempty"`
CheckURL string `json:"check_url,omitempty"`
CheckAddress string `json:"check_address,omitempty"`
CheckName string `json:"check_name,omitempty"`
CheckMonitoringServiceType string `json:"check_monitoring_service_type,omitempty"`
StateIsUp bool `json:"state_is_up,omitempty"`
Ignored bool `json:"ignored,omitempty"`
NumLocationsDown int64 `json:"num_locations_down,omitempty"`
AllAlerts *[]Alert `json:"all_alerts,omitempty"`
}
Outage represents an outage reported by Uptime.com.
type OutageListOptions ¶
type OutageListOptions struct {
Page int64 `url:"page,omitempty"`
PageSize int64 `url:"page_size,omitempty"`
Search string `url:"search,omitempty"`
Ordering string `url:"ordering,omitempty"`
CheckMonitoringServiceType string `url:"check_monitoring_service_type,omitempty"`
}
OutageListOptions specifies the optional parameters to the OutagesService.List and OutagesService.ListByServiceType methods.
type OutageListResponse ¶
type OutageListResponse struct {
Count int64 `json:"count,omitempty"`
Next string `json:"next,omitempty"`
Previous string `json:"previous,omitempty"`
Results []Outage `json:"results,omitempty"`
}
OutageListResponse represents a page of Outage results returned by the Uptime.com API.
func (OutageListResponse) CountItems ¶ added in v2.6.0
func (o OutageListResponse) CountItems() int64
func (OutageListResponse) List ¶
func (o OutageListResponse) List() []Outage
type OutageResponse ¶
type OutageResponse Outage
func (OutageResponse) Item ¶
func (o OutageResponse) Item() Outage
type OutagesEndpoint ¶
type OutagesEndpoint interface {
List(context.Context, OutageListOptions) (*ListResult[Outage], error)
Get(context.Context, PrimaryKeyable) (*Outage, error)
}
func NewOutagesEndpoint ¶
func NewOutagesEndpoint(cbd CBD) OutagesEndpoint
type PrimaryKey ¶
type PrimaryKey int
func (PrimaryKey) PrimaryKey ¶
func (p PrimaryKey) PrimaryKey() PrimaryKey
type PrimaryKeyable ¶
type PrimaryKeyable interface {
PrimaryKey() PrimaryKey
}
type ProbeServer ¶
type ProbeServer struct {
Location string `json:"location"`
ProbeName string `json:"probe_name"`
// IPAddress is deprecated, and returns empty value use IPv4Addresses or IPv6Addresses instead
IPAddress string `json:"ip_address"`
IPv4Addresses []string `json:"ipv4_addresses"`
IPv6Addresses []string `json:"ipv6_addresses"`
IsPrivate bool `json:"is_private"`
Country string `json:"country"`
}
type ProbeServerListOptions ¶
type ProbeServerListOptions struct{}
type ProbeServerListResponse ¶
type ProbeServerListResponse []ProbeServer
func (ProbeServerListResponse) CountItems ¶ added in v2.6.0
func (r ProbeServerListResponse) CountItems() int64
func (ProbeServerListResponse) List ¶
func (r ProbeServerListResponse) List() []ProbeServer
type ProbeServersEndpoint ¶
type ProbeServersEndpoint interface {
List(ctx context.Context) (*ListResult[ProbeServer], error)
}
func NewProbeServersEndpoint ¶
func NewProbeServersEndpoint(cbd CBD) ProbeServersEndpoint
type PushNotificationProfile ¶ added in v2.4.0
type PushNotificationProfile struct {
PK int64 `json:"pk,omitempty"`
URL string `json:"url,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
ModifiedAt string `json:"modified_at,omitempty"`
UUID string `json:"uuid,omitempty"`
User string `json:"user,omitempty"`
DeviceName string `json:"device_name,omitempty"`
DisplayName string `json:"display_name,omitempty"`
ContactGroups []string `json:"contact_groups,omitempty"`
}
func (PushNotificationProfile) PrimaryKey ¶ added in v2.4.0
func (p PushNotificationProfile) PrimaryKey() PrimaryKey
type PushNotificationProfileCreateRequest ¶ added in v2.4.0
type PushNotificationProfileCreateUpdateResponse ¶ added in v2.4.0
type PushNotificationProfileCreateUpdateResponse struct {
PushNotificationProfile `json:",inline"`
}
func (PushNotificationProfileCreateUpdateResponse) Item ¶ added in v2.4.0
func (p PushNotificationProfileCreateUpdateResponse) Item() PushNotificationProfile
type PushNotificationProfileItemResponse ¶ added in v2.4.0
type PushNotificationProfileItemResponse struct {
PushNotificationProfile `json:",inline"`
}
func (PushNotificationProfileItemResponse) Item ¶ added in v2.4.0
func (p PushNotificationProfileItemResponse) Item() PushNotificationProfile
type PushNotificationProfileListOptions ¶ added in v2.4.0
type PushNotificationProfileListResponse ¶ added in v2.4.0
type PushNotificationProfileListResponse struct {
Count int64 `json:"count,omitempty"`
Next string `json:"next,omitempty"`
Previous string `json:"previous,omitempty"`
Results []PushNotificationProfile `json:"results,omitempty"`
}
func (PushNotificationProfileListResponse) CountItems ¶ added in v2.6.0
func (r PushNotificationProfileListResponse) CountItems() int64
func (PushNotificationProfileListResponse) List ¶ added in v2.4.0
func (r PushNotificationProfileListResponse) List() []PushNotificationProfile
type PushNotificationProfileUpdateRequest ¶ added in v2.4.0
type PushNotificationsEndpoint ¶ added in v2.4.0
type PushNotificationsEndpoint interface {
List(context.Context, PushNotificationProfileListOptions) (*ListResult[PushNotificationProfile], error)
Create(context.Context, PushNotificationProfileCreateRequest) (*PushNotificationProfile, error)
Get(context.Context, PrimaryKeyable) (*PushNotificationProfile, error)
Update(context.Context, PrimaryKeyable, PushNotificationProfileUpdateRequest) (*PushNotificationProfile, error)
Delete(context.Context, PrimaryKeyable) error
}
func NewPushNotificationsEndpoint ¶ added in v2.4.0
func NewPushNotificationsEndpoint(cbd CBD) PushNotificationsEndpoint
type RequestBuilder ¶
type ResponseDecoder ¶
type SLAReport ¶
type SLAReport struct {
PK int64 `json:"pk,omitempty"`
URL string `json:"url,omitempty"`
StatsURL string `json:"stats_url,omitempty"`
Name string `json:"name"`
ServicesTags []string `json:"services_tags,omitempty"`
ServicesSelected *[]SLAReportService `json:"services_selected,omitempty"`
ReportingGroups *[]SLAReportGroup `json:"reporting_groups,omitempty"`
DefaultDateRange string `json:"default_date_range,omitempty"`
FilterWithDowntime bool `json:"filter_with_downtime,omitempty"`
FilterUptimeSLAViolations bool `json:"filter_uptime_sla_violations,omitempty"`
FilterSlowest bool `json:"filter_slowest,omitempty"`
FilterResponseTimeSLAViolations bool `json:"filter_response_time_sla_violations,omitempty"`
ShowUptimeSection bool `json:"show_uptime_section,omitempty"`
ShowUptimeSLA bool `json:"show_uptime_sla,omitempty"`
ShowResponseTimeSection bool `json:"show_response_time_section,omitempty"`
ShowResponseTimeSLA bool `json:"show_response_time_sla,omitempty"`
UptimeSectionSort string `json:"uptime_section_sort,omitempty"`
ResponseTimeSectionSort string `json:"response_time_section_sort,omitempty"`
}
func (SLAReport) PrimaryKey ¶
func (s SLAReport) PrimaryKey() PrimaryKey
type SLAReportCreateUpdateResponse ¶
type SLAReportCreateUpdateResponse struct {
Results SLAReport `json:"results,omitempty"`
}
func (SLAReportCreateUpdateResponse) Item ¶
func (r SLAReportCreateUpdateResponse) Item() SLAReport
type SLAReportGroup ¶
type SLAReportGroup struct {
ID int `json:"id,omitempty"`
Name string `json:"name,omitempty"`
GroupServices []string `json:"group_services,omitempty"`
}
func (SLAReportGroup) PrimaryKey ¶
func (s SLAReportGroup) PrimaryKey() PrimaryKey
type SLAReportGroupCreateResponse ¶
type SLAReportGroupCreateResponse struct {
Results SLAReportGroup `json:"results,omitempty"`
}
func (SLAReportGroupCreateResponse) Item ¶
func (r SLAReportGroupCreateResponse) Item() SLAReportGroup
type SLAReportGroupCreateUpdateResponse ¶
type SLAReportGroupCreateUpdateResponse struct {
Results SLAReportGroup `json:"results,omitempty"`
}
func (SLAReportGroupCreateUpdateResponse) Item ¶
func (r SLAReportGroupCreateUpdateResponse) Item() SLAReportGroup
type SLAReportGroupListResponse ¶
type SLAReportGroupListResponse struct {
Count int64 `json:"count,omitempty"`
Results []SLAReportGroup `json:"results,omitempty"`
}
func (SLAReportGroupListResponse) CountItems ¶ added in v2.6.0
func (r SLAReportGroupListResponse) CountItems() int64
func (SLAReportGroupListResponse) List ¶
func (r SLAReportGroupListResponse) List() []SLAReportGroup
type SLAReportGroupResponse ¶
type SLAReportGroupResponse SLAReportGroup
func (SLAReportGroupResponse) Item ¶
func (r SLAReportGroupResponse) Item() SLAReportGroup
type SLAReportListOptions ¶
type SLAReportListResponse ¶
type SLAReportListResponse struct {
Count int64 `json:"count,omitempty"`
Results []SLAReport `json:"results,omitempty"`
}
func (SLAReportListResponse) CountItems ¶ added in v2.6.0
func (r SLAReportListResponse) CountItems() int64
func (SLAReportListResponse) List ¶
func (r SLAReportListResponse) List() []SLAReport
type SLAReportResponse ¶
type SLAReportResponse SLAReport
func (SLAReportResponse) Item ¶
func (r SLAReportResponse) Item() SLAReport
type SLAReportService ¶
func (SLAReportService) MarshalJSON ¶
func (s SLAReportService) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
This is workaround for the fact that the API can accept either a string (name) or an int for the PK field.
func (*SLAReportService) UnmarshalJSON ¶
func (s *SLAReportService) UnmarshalJSON(data []byte) (err error)
UnmarshalJSON implements the json.Unmarshaler interface.
This is workaround for the fact that the API can return either a string (name) or an int for the PK field.
type SLAReportsEndpoint ¶
type SLAReportsEndpoint interface {
List(context.Context, SLAReportListOptions) (*ListResult[SLAReport], error)
Create(context.Context, SLAReport) (*SLAReport, error)
Update(context.Context, PrimaryKeyable, SLAReport) (*SLAReport, error)
Get(context.Context, PrimaryKeyable) (*SLAReport, error)
Delete(context.Context, PrimaryKeyable) error
ReportingGroups(PrimaryKeyable) SLAReportsGroupsEndpoint
}
func NewSLAReportsEndpoint ¶
func NewSLAReportsEndpoint(cbd CBD) SLAReportsEndpoint
type SLAReportsGroupsEndpoint ¶
type SLAReportsGroupsEndpoint interface {
Create(context.Context, SLAReportGroup) (*SLAReportGroup, error)
List(context.Context, SLAReportGroupListOptions) (*ListResult[SLAReportGroup], error)
Get(context.Context, PrimaryKeyable) (*SLAReportGroup, error)
Delete(context.Context, PrimaryKeyable) error
}
type ScheduledReport ¶
type ScheduledReport struct {
PK int64 `json:"pk,omitempty"`
URL string `json:"url,omitempty"`
Name string `json:"name"`
ScheduledReport string `json:"sla_report,omitempty"`
RecipientUsers []string `json:"recipient_users,omitempty"`
RecipientEmails []string `json:"recipient_emails,omitempty"`
FileType string `json:"file_type,omitempty"`
Recurrence string `json:"recurrence,omitempty"`
OnWeekday int32 `json:"on_weekday,omitempty"`
AtTime int32 `json:"at_time"`
IsEnabled bool `json:"is_enabled,omitempty"`
}
func (ScheduledReport) PrimaryKey ¶
func (s ScheduledReport) PrimaryKey() PrimaryKey
type ScheduledReportCreateUpdateResponse ¶
type ScheduledReportCreateUpdateResponse struct {
Results ScheduledReport `json:"results,omitempty"`
}
func (ScheduledReportCreateUpdateResponse) Item ¶
func (r ScheduledReportCreateUpdateResponse) Item() ScheduledReport
type ScheduledReportListResponse ¶
type ScheduledReportListResponse struct {
Count int64 `json:"count,omitempty"`
Results []ScheduledReport `json:"results,omitempty"`
}
func (ScheduledReportListResponse) CountItems ¶ added in v2.6.0
func (r ScheduledReportListResponse) CountItems() int64
func (ScheduledReportListResponse) List ¶
func (r ScheduledReportListResponse) List() []ScheduledReport
type ScheduledReportResponse ¶
type ScheduledReportResponse ScheduledReport
func (ScheduledReportResponse) Item ¶
func (r ScheduledReportResponse) Item() ScheduledReport
type ScheduledReportsEndpoint ¶
type ScheduledReportsEndpoint interface {
List(context.Context, ScheduledReportListOptions) (*ListResult[ScheduledReport], error)
Create(context.Context, ScheduledReport) (*ScheduledReport, error)
Update(context.Context, PrimaryKeyable, ScheduledReport) (*ScheduledReport, error)
Get(context.Context, PrimaryKeyable) (*ScheduledReport, error)
Delete(context.Context, PrimaryKeyable) error
}
func NewScheduledReportsEndpoint ¶
func NewScheduledReportsEndpoint(cbd CBD) ScheduledReportsEndpoint
type ServiceVariable ¶ added in v2.1.0
type ServiceVariable struct {
ID int64 `json:"id,omitempty"`
CredentialID int64 `json:"credential_id,omitempty"`
Credential *ServiceVariableCredential `json:"credential,omitempty"`
PropertyName string `json:"property_name,omitempty"`
VariableName string `json:"variable_name,omitempty"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
Account string `json:"account,omitempty"`
Service string `json:"service,omitempty"`
}
func (ServiceVariable) PrimaryKey ¶ added in v2.1.0
func (s ServiceVariable) PrimaryKey() PrimaryKey
type ServiceVariableCreateRequest ¶ added in v2.1.0
type ServiceVariableCreateUpdateResponse ¶ added in v2.1.0
type ServiceVariableCreateUpdateResponse struct {
Results ServiceVariable `json:"results,omitempty"`
}
func (ServiceVariableCreateUpdateResponse) Item ¶ added in v2.1.0
func (s ServiceVariableCreateUpdateResponse) Item() ServiceVariable
type ServiceVariableCredential ¶ added in v2.1.0
type ServiceVariableCredential struct {
ID int64 `json:"id,omitempty"`
CredentialType string `json:"credential_type,omitempty"`
DisplayName string `json:"display_name,omitempty"`
Description string `json:"description,omitempty"`
Hint string `json:"hint,omitempty"`
Username string `json:"username,omitempty"`
Version string `json:"version,omitempty"`
UsedSecretProperties []string `json:"used_secret_properties,omitempty"`
CreatedBy int64 `json:"created_by,omitempty"`
}
type ServiceVariableItemResponse ¶ added in v2.1.0
type ServiceVariableItemResponse struct {
Results ServiceVariable `json:"results,omitempty"`
}
func (ServiceVariableItemResponse) Item ¶ added in v2.1.0
func (s ServiceVariableItemResponse) Item() ServiceVariable
type ServiceVariableListOptions ¶ added in v2.1.0
type ServiceVariableListResponse ¶ added in v2.1.0
type ServiceVariableListResponse struct {
Count int64 `json:"count,omitempty"`
Next string `json:"next,omitempty"`
Previous string `json:"previous,omitempty"`
Results []ServiceVariable `json:"results,omitempty"`
}
func (ServiceVariableListResponse) CountItems ¶ added in v2.6.0
func (r ServiceVariableListResponse) CountItems() int64
func (ServiceVariableListResponse) List ¶ added in v2.1.0
func (r ServiceVariableListResponse) List() []ServiceVariable
type ServiceVariableUpdateRequest ¶ added in v2.1.0
type ServiceVariableUpdateRequest struct {
CredentialID int64 `json:"credential_id,omitempty" flag:"credential-id"`
PropertyName string `json:"property_name,omitempty" flag:"property-name"`
ServiceID int64 `json:"service_id,omitempty" flag:"service-id"`
VariableName string `json:"variable_name,omitempty" flag:"variable-name"`
}
type ServiceVariablesEndpoint ¶ added in v2.1.0
type ServiceVariablesEndpoint interface {
List(context.Context, ServiceVariableListOptions) (*ListResult[ServiceVariable], error)
Create(context.Context, ServiceVariableCreateRequest) (*ServiceVariable, error)
Get(context.Context, PrimaryKeyable) (*ServiceVariable, error)
Update(context.Context, PrimaryKeyable, ServiceVariableUpdateRequest) (*ServiceVariable, error)
Delete(context.Context, PrimaryKeyable) error
}
func NewServiceVariablesEndpoint ¶ added in v2.1.0
func NewServiceVariablesEndpoint(cbd CBD) ServiceVariablesEndpoint
type StatusPage ¶
type StatusPage struct {
PK int64 `json:"pk,omitempty"`
URL string `json:"url,omitempty"`
Name string `json:"name"`
VisibilityLevel string `json:"visibility_level"`
Description string `json:"description"`
PageType string `json:"page_type"`
Slug string `json:"slug"`
CNAME string `json:"cname"`
AllowSubscriptions *bool `json:"allow_subscriptions,omitempty"`
AllowSearchIndexing bool `json:"allow_search_indexing"`
AllowDrillDown bool `json:"allow_drill_down"`
AuthUsername string `json:"auth_username"`
AuthPassword string `json:"auth_password"`
MaxVisibleComponentDays int64 `json:"max_visible_component_days,omitempty"`
ShowStatusTab bool `json:"show_status_tab"`
ShowActiveIncidents bool `json:"show_active_incidents"`
ShowComponentResponseTime bool `json:"show_component_response_time"`
ShowHistoryTab bool `json:"show_history_tab"`
DefaultHistoryDateRange int64 `json:"default_history_date_range"`
UptimeCalculationType string `json:"uptime_calculation_type"`
ShowHistorySnake bool `json:"show_history_snake"`
ShowComponentHistory bool `json:"show_component_history"`
ShowSummaryMetrics bool `json:"show_summary_metrics"`
ShowPastIncidents bool `json:"show_past_incidents"`
AllowPdfReport bool `json:"allow_pdf_report"`
GoogleAnalyticsCode string `json:"google_analytics_code"`
ContactEmail string `json:"contact_email"`
EmailFrom string `json:"email_from"`
EmailReplyTo string `json:"email_reply_to"`
CustomHeaderHtml string `json:"custom_header_html"`
CustomCss string `json:"custom_css"`
CustomHeaderHtmlInspire string `json:"custom_header_html_inspire"`
CustomCssInspire string `json:"custom_css_inspire"`
CompanyWebsiteUrl string `json:"company_website_url"`
Timezone string `json:"timezone"`
AllowSubscriptionsEmail bool `json:"allow_subscriptions_email"`
AllowSubscriptionsRss bool `json:"allow_subscriptions_rss"`
AllowSubscriptionsSlack bool `json:"allow_subscriptions_slack"`
AllowSubscriptionsSms bool `json:"allow_subscriptions_sms"`
AllowSubscriptionsWebhook bool `json:"allow_subscriptions_webhook"`
HideEmptyTabsHistory bool `json:"hide_empty_tabs_history"`
Theme string `json:"theme"`
CustomHeaderBgColorHex string `json:"custom_header_bg_color_hex"`
CustomHeaderTextColorHex string `json:"custom_header_text_color_hex"`
}
func (StatusPage) PrimaryKey ¶
func (s StatusPage) PrimaryKey() PrimaryKey
type StatusPageComponent ¶
type StatusPageComponent struct {
PK int64 `json:"pk"`
URL string `json:"url,omitempty"`
Name string `json:"name"`
Description string `json:"description"`
IsGroup bool `json:"is_group,omitempty"`
GroupID *int64 `json:"group_id"`
ServiceID *int64 `json:"service_id"`
Status string `json:"status,omitempty"`
AutoStatusDown string `json:"auto_status_down,omitempty"`
AutoStatusUp string `json:"auto_status_up,omitempty"`
SortingWeight *int64 `json:"sorting_weight,omitempty"`
}
func (StatusPageComponent) PrimaryKey ¶
func (s StatusPageComponent) PrimaryKey() PrimaryKey
type StatusPageComponentCreateUpdateResponse ¶
type StatusPageComponentCreateUpdateResponse struct {
Results StatusPageComponent `json:"results,omitempty"`
}
func (StatusPageComponentCreateUpdateResponse) Item ¶
func (r StatusPageComponentCreateUpdateResponse) Item() StatusPageComponent
type StatusPageComponentEndpoint ¶
type StatusPageComponentEndpoint interface {
Create(context.Context, StatusPageComponent) (*StatusPageComponent, error)
Update(context.Context, PrimaryKeyable, StatusPageComponent) (*StatusPageComponent, error)
List(context.Context, StatusPageComponentListOptions) (*ListResult[StatusPageComponent], error)
Get(context.Context, PrimaryKeyable) (*StatusPageComponent, error)
Delete(context.Context, PrimaryKeyable) error
}
type StatusPageComponentListResponse ¶
type StatusPageComponentListResponse struct {
Count int64 `json:"count,omitempty"`
Results []StatusPageComponent `json:"results,omitempty"`
}
func (StatusPageComponentListResponse) CountItems ¶ added in v2.6.0
func (r StatusPageComponentListResponse) CountItems() int64
func (StatusPageComponentListResponse) List ¶
func (r StatusPageComponentListResponse) List() []StatusPageComponent
type StatusPageComponentResponse ¶
type StatusPageComponentResponse StatusPageComponent
func (StatusPageComponentResponse) Item ¶
func (r StatusPageComponentResponse) Item() StatusPageComponent
type StatusPageCreateUpdateResponse ¶
type StatusPageCreateUpdateResponse struct {
Results StatusPage `json:"results,omitempty"`
}
func (StatusPageCreateUpdateResponse) Item ¶
func (r StatusPageCreateUpdateResponse) Item() StatusPage
type StatusPageCurrentStatus ¶ added in v2.4.0
type StatusPageCurrentStatus struct {
StatusPage // Embed StatusPage to inherit all its fields
GlobalIsOperational bool `json:"global_is_operational"`
ActiveIncidents []interface{} `json:"active_incidents,omitempty"`
UpcomingMaintenance []interface{} `json:"upcoming_maintenance,omitempty"`
Components []StatusPageCurrentStatusComponent `json:"components,omitempty"`
Metrics []interface{} `json:"metrics,omitempty"`
}
StatusPageCurrentStatus represents the current operational status of a status page
type StatusPageCurrentStatusComponent ¶ added in v2.4.0
type StatusPageCurrentStatusComponent struct {
PK int64 `json:"pk,omitempty"`
Name string `json:"name,omitempty"`
Status string `json:"status,omitempty"`
Description string `json:"description,omitempty"`
}
StatusPageCurrentStatusComponent represents the current status of a component
type StatusPageCurrentStatusEndpoint ¶ added in v2.4.0
type StatusPageCurrentStatusEndpoint interface {
Get(context.Context) (*StatusPageCurrentStatus, error)
}
StatusPageCurrentStatusEndpoint provides access to status page current status
func NewStatusPageCurrentStatusEndpoint ¶ added in v2.4.0
func NewStatusPageCurrentStatusEndpoint(cbd CBD, statusPagePK PrimaryKeyable) StatusPageCurrentStatusEndpoint
NewStatusPageCurrentStatusEndpoint creates a new status page current status endpoint
type StatusPageCurrentStatusResponse ¶ added in v2.4.0
type StatusPageCurrentStatusResponse StatusPageCurrentStatus
StatusPageCurrentStatusResponse wraps the current status response (API returns directly without wrapper)
func (StatusPageCurrentStatusResponse) Item ¶ added in v2.4.0
func (r StatusPageCurrentStatusResponse) Item() StatusPageCurrentStatus
type StatusPageIncident ¶
type StatusPageIncident struct {
PK int64 `json:"pk"`
URL string `json:"url,omitempty"`
Name string `json:"name"`
IncludeInGlobalMetrics bool `json:"include_in_global_metrics,omitempty"`
Updates []IncidentUpdate `json:"updates,omitempty"`
AffectedComponents []IncidentAffectedComponentEntity `json:"affected_components,omitempty"`
IncidentType string `json:"incident_type,omitempty"`
StartsAt string `json:"starts_at"`
EndsAt string `json:"ends_at,omitempty"`
UpdateComponentStatus bool `json:"update_component_status,omitempty"`
NotifySubscribers bool `json:"notify_subscribers,omitempty"`
SendMaintenanceStartNotification bool `json:"send_maintenance_start_notification,omitempty"`
IsGroup bool `json:"is_group,omitempty"`
GroupID int64 `json:"group_id,omitempty"`
ServiceID int64 `json:"service_id,omitempty"`
Status string `json:"status,omitempty"`
AutoStatusDowt string `json:"auto_status_down,omitempty"`
AutoStatusUp string `json:"auto_status_up,omitempty"`
}
func (StatusPageIncident) PrimaryKey ¶
func (s StatusPageIncident) PrimaryKey() PrimaryKey
type StatusPageIncidentCreateUpdateResponse ¶
type StatusPageIncidentCreateUpdateResponse struct {
Results StatusPageIncident `json:"results,omitempty"`
}
func (StatusPageIncidentCreateUpdateResponse) Item ¶
func (r StatusPageIncidentCreateUpdateResponse) Item() StatusPageIncident
type StatusPageIncidentEndpoint ¶
type StatusPageIncidentEndpoint interface {
Create(context.Context, StatusPageIncident) (*StatusPageIncident, error)
Update(context.Context, PrimaryKeyable, StatusPageIncident) (*StatusPageIncident, error)
List(context.Context, StatusPageIncidentListOptions) (*ListResult[StatusPageIncident], error)
Get(context.Context, PrimaryKeyable) (*StatusPageIncident, error)
Delete(context.Context, PrimaryKeyable) error
}
type StatusPageIncidentListResponse ¶
type StatusPageIncidentListResponse struct {
Count int64 `json:"count,omitempty"`
Results []StatusPageIncident `json:"results,omitempty"`
}
func (StatusPageIncidentListResponse) CountItems ¶ added in v2.6.0
func (r StatusPageIncidentListResponse) CountItems() int64
func (StatusPageIncidentListResponse) List ¶
func (r StatusPageIncidentListResponse) List() []StatusPageIncident
type StatusPageIncidentResponse ¶
type StatusPageIncidentResponse StatusPageIncident
func (StatusPageIncidentResponse) Item ¶
func (r StatusPageIncidentResponse) Item() StatusPageIncident
type StatusPageListOptions ¶
type StatusPageListResponse ¶
type StatusPageListResponse struct {
Count int64 `json:"count,omitempty"`
Results []StatusPage `json:"results,omitempty"`
}
func (StatusPageListResponse) CountItems ¶ added in v2.6.0
func (r StatusPageListResponse) CountItems() int64
func (StatusPageListResponse) List ¶
func (r StatusPageListResponse) List() []StatusPage
type StatusPageMetric ¶
type StatusPageMetric struct {
PK int64 `json:"pk"`
URL string `json:"url,omitempty"`
Name string `json:"name"`
ServiceID int64 `json:"service_id"`
IsVisible bool `json:"is_visible"`
}
func (StatusPageMetric) PrimaryKey ¶
func (s StatusPageMetric) PrimaryKey() PrimaryKey
type StatusPageMetricCreateUpdateResponse ¶
type StatusPageMetricCreateUpdateResponse struct {
Results StatusPageMetric `json:"results,omitempty"`
}
func (StatusPageMetricCreateUpdateResponse) Item ¶
func (r StatusPageMetricCreateUpdateResponse) Item() StatusPageMetric
type StatusPageMetricEndpoint ¶
type StatusPageMetricEndpoint interface {
Create(context.Context, StatusPageMetric) (*StatusPageMetric, error)
Update(context.Context, PrimaryKeyable, StatusPageMetric) (*StatusPageMetric, error)
List(context.Context, StatusPageMetricListOptions) (*ListResult[StatusPageMetric], error)
Get(context.Context, PrimaryKeyable) (*StatusPageMetric, error)
Delete(context.Context, PrimaryKeyable) error
}
type StatusPageMetricListResponse ¶
type StatusPageMetricListResponse struct {
Count int64 `json:"count,omitempty"`
Results []StatusPageMetric `json:"results,omitempty"`
}
func (StatusPageMetricListResponse) CountItems ¶ added in v2.6.0
func (r StatusPageMetricListResponse) CountItems() int64
func (StatusPageMetricListResponse) List ¶
func (r StatusPageMetricListResponse) List() []StatusPageMetric
type StatusPageMetricResponse ¶
type StatusPageMetricResponse StatusPageMetric
func (StatusPageMetricResponse) Item ¶
func (r StatusPageMetricResponse) Item() StatusPageMetric
type StatusPageResponse ¶
type StatusPageResponse StatusPage
func (StatusPageResponse) Item ¶
func (r StatusPageResponse) Item() StatusPage
type StatusPageStatusHistory ¶ added in v2.4.0
type StatusPageStatusHistory struct {
PK int64 `json:"pk,omitempty"`
Status string `json:"status,omitempty"`
Description string `json:"description,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
ComponentPK *int64 `json:"component_pk,omitempty"`
}
StatusPageStatusHistory represents a historical status entry
func (StatusPageStatusHistory) PrimaryKey ¶ added in v2.4.0
func (s StatusPageStatusHistory) PrimaryKey() PrimaryKey
type StatusPageStatusHistoryEndpoint ¶ added in v2.4.0
type StatusPageStatusHistoryEndpoint interface {
List(context.Context, StatusPageStatusHistoryListOptions) (*ListResult[StatusPageStatusHistory], error)
Get(context.Context, PrimaryKeyable) (*StatusPageStatusHistory, error)
}
StatusPageStatusHistoryEndpoint provides access to status page status history
func NewStatusPageStatusHistoryEndpoint ¶ added in v2.4.0
func NewStatusPageStatusHistoryEndpoint(cbd CBD, statusPagePK PrimaryKeyable) StatusPageStatusHistoryEndpoint
NewStatusPageStatusHistoryEndpoint creates a new status page status history endpoint
type StatusPageStatusHistoryListOptions ¶ added in v2.4.0
type StatusPageStatusHistoryListOptions struct {
Page int64 `url:"page,omitempty"`
PageSize int64 `url:"page_size,omitempty"`
Search string `url:"search,omitempty"`
Ordering string `url:"ordering,omitempty"`
Status string `url:"status,omitempty"`
ComponentPK int64 `url:"component_pk,omitempty"`
DateFrom string `url:"date_from,omitempty"`
DateTo string `url:"date_to,omitempty"`
}
StatusPageStatusHistoryListOptions provides filtering options for status history
type StatusPageStatusHistoryListResponse ¶ added in v2.4.0
type StatusPageStatusHistoryListResponse struct {
Count int64 `json:"count,omitempty"`
Results []StatusPageStatusHistory `json:"results,omitempty"`
}
StatusPageStatusHistoryListResponse wraps the list response
func (StatusPageStatusHistoryListResponse) CountItems ¶ added in v2.6.0
func (r StatusPageStatusHistoryListResponse) CountItems() int64
func (StatusPageStatusHistoryListResponse) List ¶ added in v2.4.0
func (r StatusPageStatusHistoryListResponse) List() []StatusPageStatusHistory
type StatusPageStatusHistoryResponse ¶ added in v2.4.0
type StatusPageStatusHistoryResponse StatusPageStatusHistory
StatusPageStatusHistoryResponse wraps a single status history item
func (StatusPageStatusHistoryResponse) Item ¶ added in v2.4.0
func (r StatusPageStatusHistoryResponse) Item() StatusPageStatusHistory
type StatusPageSubsDomainAllowList ¶
func (StatusPageSubsDomainAllowList) PrimaryKey ¶
func (s StatusPageSubsDomainAllowList) PrimaryKey() PrimaryKey
type StatusPageSubsDomainAllowListCreateUpdateResponse ¶
type StatusPageSubsDomainAllowListCreateUpdateResponse struct {
Results StatusPageSubsDomainAllowList `json:"results,omitempty"`
}
type StatusPageSubsDomainAllowListEndpoint ¶
type StatusPageSubsDomainAllowListEndpoint interface {
Create(context.Context, StatusPageSubsDomainAllowList) (*StatusPageSubsDomainAllowList, error)
List(context.Context, StatusPageSubsDomainAllowListListOptions) (*ListResult[StatusPageSubsDomainAllowList], error)
Update(context.Context, PrimaryKeyable, StatusPageSubsDomainAllowList) (*StatusPageSubsDomainAllowList, error)
Get(context.Context, PrimaryKeyable) (*StatusPageSubsDomainAllowList, error)
Delete(context.Context, PrimaryKeyable) error
}
type StatusPageSubsDomainAllowListListResponse ¶
type StatusPageSubsDomainAllowListListResponse struct {
Count int64 `json:"count,omitempty"`
Results []StatusPageSubsDomainAllowList `json:"results,omitempty"`
}
func (StatusPageSubsDomainAllowListListResponse) CountItems ¶ added in v2.6.0
func (r StatusPageSubsDomainAllowListListResponse) CountItems() int64
func (StatusPageSubsDomainAllowListListResponse) List ¶
func (r StatusPageSubsDomainAllowListListResponse) List() []StatusPageSubsDomainAllowList
type StatusPageSubsDomainAllowListResponse ¶
type StatusPageSubsDomainAllowListResponse StatusPageSubsDomainAllowList
func (StatusPageSubsDomainAllowListResponse) Item ¶
func (r StatusPageSubsDomainAllowListResponse) Item() StatusPageSubsDomainAllowList
type StatusPageSubsDomainBlockList ¶
func (StatusPageSubsDomainBlockList) PrimaryKey ¶
func (s StatusPageSubsDomainBlockList) PrimaryKey() PrimaryKey
type StatusPageSubsDomainBlockListCreateUpdateResponse ¶
type StatusPageSubsDomainBlockListCreateUpdateResponse struct {
Results StatusPageSubsDomainBlockList `json:"results,omitempty"`
}
type StatusPageSubsDomainBlockListEndpoint ¶
type StatusPageSubsDomainBlockListEndpoint interface {
Create(context.Context, StatusPageSubsDomainBlockList) (*StatusPageSubsDomainBlockList, error)
List(context.Context, StatusPageSubsDomainBlockListListOptions) (*ListResult[StatusPageSubsDomainBlockList], error)
Update(context.Context, PrimaryKeyable, StatusPageSubsDomainBlockList) (*StatusPageSubsDomainBlockList, error)
Get(context.Context, PrimaryKeyable) (*StatusPageSubsDomainBlockList, error)
Delete(context.Context, PrimaryKeyable) error
}
type StatusPageSubsDomainBlockListListResponse ¶
type StatusPageSubsDomainBlockListListResponse struct {
Count int64 `json:"count,omitempty"`
Results []StatusPageSubsDomainBlockList `json:"results,omitempty"`
}
func (StatusPageSubsDomainBlockListListResponse) CountItems ¶ added in v2.6.0
func (r StatusPageSubsDomainBlockListListResponse) CountItems() int64
func (StatusPageSubsDomainBlockListListResponse) List ¶
func (r StatusPageSubsDomainBlockListListResponse) List() []StatusPageSubsDomainBlockList
type StatusPageSubsDomainBlockListResponse ¶
type StatusPageSubsDomainBlockListResponse StatusPageSubsDomainBlockList
func (StatusPageSubsDomainBlockListResponse) Item ¶
func (r StatusPageSubsDomainBlockListResponse) Item() StatusPageSubsDomainBlockList
type StatusPageSubscriber ¶
type StatusPageSubscriber struct {
PK int64 `json:"id"`
Target string `json:"target"`
Type string `json:"type"`
ForceValidationSMS bool `json:"force_validation_sms"`
}
func (StatusPageSubscriber) PrimaryKey ¶
func (s StatusPageSubscriber) PrimaryKey() PrimaryKey
type StatusPageSubscriberCreateResponse ¶
type StatusPageSubscriberCreateResponse struct {
Results StatusPageSubscriber `json:"results,omitempty"`
}
func (StatusPageSubscriberCreateResponse) Item ¶
func (r StatusPageSubscriberCreateResponse) Item() StatusPageSubscriber
type StatusPageSubscriberEndpoint ¶
type StatusPageSubscriberEndpoint interface {
Create(context.Context, StatusPageSubscriber) (*StatusPageSubscriber, error)
List(context.Context, StatusPageSubscriberListOptions) (*ListResult[StatusPageSubscriber], error)
Get(context.Context, PrimaryKeyable) (*StatusPageSubscriber, error)
Delete(context.Context, PrimaryKeyable) error
}
type StatusPageSubscriberListResponse ¶
type StatusPageSubscriberListResponse struct {
Count int64 `json:"count,omitempty"`
Results []StatusPageSubscriber `json:"results,omitempty"`
}
func (StatusPageSubscriberListResponse) CountItems ¶ added in v2.6.0
func (r StatusPageSubscriberListResponse) CountItems() int64
func (StatusPageSubscriberListResponse) List ¶
func (r StatusPageSubscriberListResponse) List() []StatusPageSubscriber
type StatusPageSubscriberResponse ¶
type StatusPageSubscriberResponse StatusPageSubscriber
func (StatusPageSubscriberResponse) Item ¶
func (r StatusPageSubscriberResponse) Item() StatusPageSubscriber
type StatusPageUser ¶
type StatusPageUser struct {
PK int64 `json:"pk"`
Email string `json:"email"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
IsActive bool `json:"is_active,omitempty"`
}
func (StatusPageUser) PrimaryKey ¶
func (s StatusPageUser) PrimaryKey() PrimaryKey
type StatusPageUserCreateUpdateResponse ¶
type StatusPageUserCreateUpdateResponse struct {
Results StatusPageUser `json:"results,omitempty"`
}
func (StatusPageUserCreateUpdateResponse) Item ¶
func (r StatusPageUserCreateUpdateResponse) Item() StatusPageUser
type StatusPageUserEndpoint ¶
type StatusPageUserEndpoint interface {
Create(context.Context, StatusPageUser) (*StatusPageUser, error)
Update(context.Context, PrimaryKeyable, StatusPageUser) (*StatusPageUser, error)
List(context.Context, StatusPageUserListOptions) (*ListResult[StatusPageUser], error)
Get(context.Context, PrimaryKeyable) (*StatusPageUser, error)
Delete(context.Context, PrimaryKeyable) error
}
type StatusPageUserListResponse ¶
type StatusPageUserListResponse struct {
Count int64 `json:"count,omitempty"`
Results []StatusPageUser `json:"results,omitempty"`
}
func (StatusPageUserListResponse) CountItems ¶ added in v2.6.0
func (r StatusPageUserListResponse) CountItems() int64
func (StatusPageUserListResponse) List ¶
func (r StatusPageUserListResponse) List() []StatusPageUser
type StatusPageUserResponse ¶
type StatusPageUserResponse StatusPageUser
func (StatusPageUserResponse) Item ¶
func (r StatusPageUserResponse) Item() StatusPageUser
type StatusPagesEndpoint ¶
type StatusPagesEndpoint interface {
List(context.Context, StatusPageListOptions) (*ListResult[StatusPage], error)
Create(context.Context, StatusPage) (*StatusPage, error)
Update(context.Context, PrimaryKeyable, StatusPage) (*StatusPage, error)
Get(context.Context, PrimaryKeyable) (*StatusPage, error)
Delete(context.Context, PrimaryKeyable) error
Components(PrimaryKeyable) StatusPageComponentEndpoint
Incidents(PrimaryKeyable) StatusPageIncidentEndpoint
Metrics(PrimaryKeyable) StatusPageMetricEndpoint
Subscribers(PrimaryKeyable) StatusPageSubscriberEndpoint
SubscriptionDomainAllowList(PrimaryKeyable) StatusPageSubsDomainAllowListEndpoint
SubscriptionDomainBlockList(PrimaryKeyable) StatusPageSubsDomainBlockListEndpoint
Users(PrimaryKeyable) StatusPageUserEndpoint
CurrentStatus(PrimaryKeyable) StatusPageCurrentStatusEndpoint
StatusHistory(PrimaryKeyable) StatusPageStatusHistoryEndpoint
}
func NewStatusPagesEndpoint ¶
func NewStatusPagesEndpoint(cbd CBD) StatusPagesEndpoint
type Subaccount ¶ added in v2.4.0
type Subaccount struct {
PK int64 `json:"pk,omitempty"`
Name string `json:"name" flag:"name"`
URL string `json:"url,omitempty"`
}
Subaccount represents a subaccount in Uptime.com.
func (Subaccount) PrimaryKey ¶ added in v2.4.0
func (s Subaccount) PrimaryKey() PrimaryKey
type SubaccountCreateRequest ¶ added in v2.4.0
type SubaccountCreateRequest struct {
Name string `json:"name" flag:"name"`
}
SubaccountCreateRequest represents the request body for creating a subaccount.
type SubaccountItemResponse ¶ added in v2.4.0
type SubaccountItemResponse struct {
Subaccount `json:",inline"`
}
SubaccountItemResponse wraps a single subaccount response.
func (SubaccountItemResponse) Item ¶ added in v2.4.0
func (s SubaccountItemResponse) Item() Subaccount
type SubaccountPacks ¶ added in v2.4.0
type SubaccountPacks struct {
Num int64 `json:"num" flag:"num"`
}
SubaccountPacks represents the request/response for transferring packs. Positive num transfers from main account to subaccount. Negative num transfers from subaccount to main account.
type SubaccountUpdateRequest ¶ added in v2.4.0
type SubaccountUpdateRequest struct {
Name string `json:"name" flag:"name"`
}
SubaccountUpdateRequest represents the request body for updating a subaccount.
type SubaccountsEndpoint ¶ added in v2.4.0
type SubaccountsEndpoint interface {
List(context.Context) ([]Subaccount, error)
Create(context.Context, SubaccountCreateRequest) (*Subaccount, error)
Get(context.Context, PrimaryKeyable) (*Subaccount, error)
Update(context.Context, PrimaryKeyable, SubaccountUpdateRequest) (*Subaccount, error)
TransferPacks(context.Context, PrimaryKeyable, SubaccountPacks) error
}
SubaccountsEndpoint provides access to subaccount operations.
func NewSubaccountsEndpoint ¶ added in v2.4.0
func NewSubaccountsEndpoint(cbd CBD) SubaccountsEndpoint
NewSubaccountsEndpoint creates a new subaccounts endpoint.
type Tag ¶
type Tag struct {
PK int64 `json:"pk,omitempty"`
URL string `json:"url,omitempty"`
Tag string `json:"tag,omitempty"`
ColorHex string `json:"color_hex,omitempty"`
}
Tag represents a check tag in Uptime.com.
func (Tag) PrimaryKey ¶
func (t Tag) PrimaryKey() PrimaryKey
type TagCreateUpdateResponse ¶
type TagCreateUpdateResponse struct {
Results Tag `json:"results,omitempty"`
}
TagCreateUpdateResponse represents a response from the tagsImpl
func (TagCreateUpdateResponse) Item ¶
func (t TagCreateUpdateResponse) Item() Tag
type TagItemResponse ¶
type TagItemResponse = Tag
TagItemResponse represents a response from the tagsImpl.
func (TagItemResponse) Item ¶
func (t TagItemResponse) Item() Tag
type TagListOptions ¶
type TagListOptions struct {
Page int64 `url:"page,omitempty"`
PageSize int64 `url:"page_size,omitempty"`
Search string `url:"search,omitempty"`
Ordering string `url:"ordering,omitempty"`
}
TagListOptions specifies the optional parameters to tag listing API call.
type TagListResponse ¶
type TagListResponse struct {
Count int64 `json:"count,omitempty"`
Next string `json:"next,omitempty"`
Previous string `json:"previous,omitempty"`
Results []Tag `json:"results,omitempty"`
}
TagListResponse represents a list of check tags.
func (TagListResponse) CountItems ¶ added in v2.6.0
func (r TagListResponse) CountItems() int64
func (TagListResponse) List ¶
func (r TagListResponse) List() []Tag
type TagsEndpoint ¶
type TagsEndpoint interface {
List(context.Context, TagListOptions) (*ListResult[Tag], error)
Create(context.Context, Tag) (*Tag, error)
Get(context.Context, PrimaryKeyable) (*Tag, error)
Update(context.Context, PrimaryKeyable, Tag) (*Tag, error)
Delete(context.Context, PrimaryKeyable) error
}
func NewTagsEndpoint ¶
func NewTagsEndpoint(cbd CBD) TagsEndpoint
type User ¶ added in v2.3.0
type User struct {
PK int64 `json:"pk,omitempty"`
URL string `json:"url,omitempty"`
FirstName string `json:"first_name,omitempty"`
LastName string `json:"last_name,omitempty"`
Email string `json:"email,omitempty"`
Password string `json:"password,omitempty"`
IsActive bool `json:"is_active,omitempty"`
IsPrimary bool `json:"is_primary,omitempty"`
AccessLevel string `json:"access_level,omitempty"`
IsAPIEnabled bool `json:"is_api_enabled,omitempty"`
NotifyPaidInvoices bool `json:"notify_paid_invoices,omitempty"`
AssignedSubaccounts []string `json:"assigned_subaccounts,omitempty"`
RequireTwoFactor string `json:"require_two_factor,omitempty"`
MustTwoFactor bool `json:"must_two_factor,omitempty"`
Timezone string `json:"timezone,omitempty"`
Account *UserAccount `json:"account,omitempty"`
}
func (User) PrimaryKey ¶ added in v2.3.0
func (u User) PrimaryKey() PrimaryKey
type UserAccount ¶ added in v2.3.0
type UserCreateRequest ¶ added in v2.3.0
type UserCreateRequest struct {
FirstName string `json:"first_name,omitempty" flag:"first-name"`
LastName string `json:"last_name,omitempty" flag:"last-name"`
Email string `json:"email" flag:"email"`
Password string `json:"password" flag:"password"`
AccessLevel string `json:"access_level,omitempty" flag:"access-level"`
IsAPIEnabled bool `json:"is_api_enabled,omitempty" flag:"api-enabled"`
NotifyPaidInvoices bool `json:"notify_paid_invoices,omitempty" flag:"notify-paid-invoices"`
AssignedSubaccounts []string `json:"assigned_subaccounts,omitempty" flag:"assigned-subaccounts"`
RequireTwoFactor string `json:"require_two_factor,omitempty" flag:"require-two-factor"`
}
type UserCreateUpdateResponse ¶ added in v2.3.0
type UserCreateUpdateResponse struct {
Results User `json:"results"`
}
func (UserCreateUpdateResponse) Item ¶ added in v2.3.0
func (u UserCreateUpdateResponse) Item() User
type UserItemResponse ¶ added in v2.3.0
type UserItemResponse struct {
User `json:",inline"`
}
func (UserItemResponse) Item ¶ added in v2.3.0
func (u UserItemResponse) Item() User
type UserListOptions ¶ added in v2.3.0
type UserListOptions struct {
Page int64 `url:"page,omitempty"`
PageSize int64 `url:"page_size,omitempty"`
Search string `url:"search,omitempty"`
Ordering string `url:"ordering,omitempty"`
Email string `url:"email,omitempty"`
AccessLevel string `url:"access_level,omitempty"`
Subaccount string `url:"subaccount,omitempty"`
}
type UserListResponse ¶ added in v2.3.0
type UserListResponse struct {
Count int64 `json:"count,omitempty"`
Next string `json:"next,omitempty"`
Previous string `json:"previous,omitempty"`
Results []User `json:"results,omitempty"`
}
func (UserListResponse) CountItems ¶ added in v2.6.0
func (r UserListResponse) CountItems() int64
func (UserListResponse) List ¶ added in v2.3.0
func (r UserListResponse) List() []User
type UserUpdateRequest ¶ added in v2.3.0
type UserUpdateRequest struct {
FirstName string `json:"first_name,omitempty" flag:"first-name"`
LastName string `json:"last_name,omitempty" flag:"last-name"`
Email string `json:"email,omitempty" flag:"email"`
Password string `json:"password,omitempty" flag:"password"`
AccessLevel string `json:"access_level,omitempty" flag:"access-level"`
IsAPIEnabled *bool `json:"is_api_enabled,omitempty" flag:"api-enabled"`
NotifyPaidInvoices *bool `json:"notify_paid_invoices,omitempty" flag:"notify-paid-invoices"`
AssignedSubaccounts []string `json:"assigned_subaccounts,omitempty" flag:"assigned-subaccounts"`
RequireTwoFactor string `json:"require_two_factor,omitempty" flag:"require-two-factor"`
}
type UsersEndpoint ¶ added in v2.3.0
type UsersEndpoint interface {
List(context.Context, UserListOptions) (*ListResult[User], error)
Create(context.Context, UserCreateRequest) (*User, error)
Get(context.Context, PrimaryKeyable) (*User, error)
Update(context.Context, PrimaryKeyable, UserUpdateRequest) (*User, error)
Delete(context.Context, PrimaryKeyable) error
Deactivate(context.Context, PrimaryKeyable) (*User, error)
Reactivate(context.Context, PrimaryKeyable) (*User, error)
}
func NewUsersEndpoint ¶ added in v2.3.0
func NewUsersEndpoint(cbd CBD) UsersEndpoint
Source Files
¶
- api.go
- cbd.go
- endpoint.go
- ep_account_usage.go
- ep_alerts.go
- ep_checks.go
- ep_checks_api.go
- ep_checks_blacklist.go
- ep_checks_cloudstatus.go
- ep_checks_cloudstatus_groups.go
- ep_checks_cloudstatus_services.go
- ep_checks_dns.go
- ep_checks_group.go
- ep_checks_heartbeat.go
- ep_checks_http.go
- ep_checks_icmp.go
- ep_checks_imap.go
- ep_checks_locations.go
- ep_checks_malware.go
- ep_checks_ntp.go
- ep_checks_pagespeed.go
- ep_checks_pop.go
- ep_checks_rdap.go
- ep_checks_rum.go
- ep_checks_rum2.go
- ep_checks_smtp.go
- ep_checks_ssh.go
- ep_checks_sslcert.go
- ep_checks_tcp.go
- ep_checks_transaction.go
- ep_checks_udp.go
- ep_checks_webhook.go
- ep_checks_whois.go
- ep_contacts.go
- ep_credentials.go
- ep_dashboards.go
- ep_integrations.go
- ep_maintenance_notifications.go
- ep_maintenance_schedules.go
- ep_outages.go
- ep_probeservers.go
- ep_push_notifications.go
- ep_scheduled_reports.go
- ep_service_variables.go
- ep_slareports.go
- ep_slareports_reporting_groups.go
- ep_statuspages.go
- ep_statuspages_components.go
- ep_statuspages_current_status.go
- ep_statuspages_incidents.go
- ep_statuspages_metrics.go
- ep_statuspages_status_history.go
- ep_statuspages_subs_domain_allow.go
- ep_statuspages_subs_domain_block.go
- ep_statuspages_subscribers.go
- ep_statuspages_users.go
- ep_subaccounts.go
- ep_tags.go
- ep_users.go
- error.go
- options.go
- ptr.go