upapi

package
v2.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

pkg/upapi/ep_maintenance_notifications.go

Index

Constants

This section is empty.

Variables

View Source
var DecodeError = errors.New("error response decode error")

Functions

func BoolPtr added in v2.8.0

func BoolPtr(v bool) *bool

BoolPtr returns a pointer to the given bool value. Use this helper to set *bool fields on Check structs for PATCH operations.

func ErrorFromResponse

func ErrorFromResponse(r *http.Response) error

func StringPtr added in v2.11.0

func StringPtr(v string) *string

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.

func New

func New(opts ...Option) (api API, err error)

New returns a new API client instance.

type AccountUsage added in v2.10.0

type AccountUsage map[string]any

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

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:

  1. Legacy: set ServiceName to a single component name. Deprecated server-side in favour of the group + monitoring_type model below.
  2. 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

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 CheckEscalation struct {
	WaitTime      int       `json:"wait_time"`
	NumRepeats    int       `json:"num_repeats"`
	ContactGroups *[]string `json:"contact_groups,omitempty"`
}

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 CheckPageSpeedConfig struct {
	EmulatedDevice       string `json:"emulated_device,omitempty"`
	ConnectionThrottling string `json:"connection_throttling,omitempty"`
	ExcludeURLs          string `json:"exclude_urls,omitempty"`
	UptimeGradeThreshold string `json:"uptime_grade_threshold,omitempty"`
}

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 CheckStats struct {
	Date                   string   `json:"date"`
	Outages                int64    `json:"outages"`
	DowntimeSecs           int64    `json:"downtime_secs"`
	Uptime                 *float64 `json:"uptime,omitempty"`
	ResponseTime           *float64 `json:"response_time,omitempty"`
	ResponseTimeDatapoints [][]any  `json:"response_time_datapoints,omitempty"`
}

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

type CloudStatusGroup struct {
	ID   int64  `json:"id"`
	Name string `json:"name,omitempty"`
}

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

type CloudStatusGroupListItem struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

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 CloudStatusGroupListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

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

type CloudStatusService added in v2.12.0

type CloudStatusService struct {
	ID       int64  `json:"id"`
	Name     string `json:"name"`
	Title    string `json:"title,omitempty"`
	SubTitle string `json:"sub_title,omitempty"`
	GroupID  int64  `json:"group_id"`
	Group    string `json:"group,omitempty"`
}

type CloudStatusServiceListOptions added in v2.12.0

type CloudStatusServiceListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Group    string `url:"group,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

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

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

type ContactListOptions

type ContactListOptions struct {
	Page              int64  `url:"page,omitempty"`
	PageSize          int64  `url:"page_size,omitempty"`
	Search            string `url:"search,omitempty"`
	Ordering          string `url:"ordering,omitempty"`
	HasOnCallSchedule bool   `url:"has_on_call_schedule,omitempty"`
}

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 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

type CredentialListOptions

type CredentialListOptions struct {
	Page              int64  `url:"page,omitempty"`
	PageSize          int64  `url:"page_size,omitempty"`
	Search            string `url:"search,omitempty"`
	Ordering          string `url:"ordering,omitempty"`
	HasOnCallSchedule bool   `url:"has_on_call_schedule,omitempty"`
}

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

type CredentialResponse

type CredentialResponse Credential

func (CredentialResponse) Item

func (r CredentialResponse) Item() Credential

type CredentialSecret

type CredentialSecret struct {
	Certificate string `json:"certificate,omitempty"`
	Key         string `json:"key,omitempty"`
	Password    string `json:"password,omitempty"`
	Passphrase  string `json:"passphrase,omitempty"`
	Secret      string `json:"secret,omitempty"`
}

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

type DashboardListOptions

type DashboardListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

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 Doer

type Doer interface {
	Do(rq *http.Request) (*http.Response, error)
}

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

func NewEndpointCreator[RequestType any, ResponseType Itemable[ItemType], ItemType any](cbd CBD, endpoint string) EndpointCreator[RequestType, ResponseType, ItemType]

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

func NewEndpointLister[ResponseType Listable[ItemType], ItemType any, OptionsType any](cbd CBD, endpoint string) EndpointLister[Listable[ItemType], ItemType, OptionsType]

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

func NewEndpointUpdater[RequestType any, ResponseType Itemable[ItemType], ItemType any](cbd CBD, endpoint string) EndpointUpdater[RequestType, ResponseType, ItemType]

type Error

type Error struct {
	Response *http.Response
	Code     string      `json:"error_code"`
	Message  string      `json:"error_message"`
	Fields   FieldErrors `json:"error_fields,omitempty"`
}

func NewError

func NewError() *Error

func (Error) Error

func (e Error) Error() string

type FieldErrors added in v2.11.0

type FieldErrors map[string][]any

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 IncidentUpdate struct {
	PK            int64  `json:"id,omitempty"`
	URL           string `json:"url,omitempty"`
	Description   string `json:"description"`
	IncidentState string `json:"incident_state"`
	UpdatedAt     string `json:"updated_at"`
}

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 IntegrationDatadog struct {
	Name          string   `json:"name,omitempty"`
	ContactGroups []string `json:"contact_groups,omitempty"`
	APIKey        string   `json:"api_key,omitempty"`
	APPKey        string   `json:"app_key,omitempty"`
	Region        string   `json:"region,omitempty"`
}

type IntegrationGeckoboard

type IntegrationGeckoboard struct {
	Name          string   `json:"name,omitempty"`
	ContactGroups []string `json:"contact_groups,omitempty"`
	APIKey        string   `json:"api_key,omitempty"`
	DatasetName   string   `json:"dataset_name,omitempty"`
}

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 IntegrationKlipfolio struct {
	Name           string   `json:"name,omitempty"`
	ContactGroups  []string `json:"contact_groups,omitempty"`
	APIKey         string   `json:"api_key,omitempty"`
	DataSourceName string   `json:"data_source_name,omitempty"`
}

type IntegrationLibrato

type IntegrationLibrato struct {
	Name          string   `json:"name,omitempty"`
	ContactGroups []string `json:"contact_groups,omitempty"`
	Email         string   `json:"email,omitempty"`
	APIToken      string   `json:"api_token,omitempty"`
	MetricName    string   `json:"metric_name,omitempty"`
}

type IntegrationListOptions

type IntegrationListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
	Module   string `url:"module,omitempty"`
}

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

type IntegrationMicrosoftTeams

type IntegrationMicrosoftTeams struct {
	Name          string   `json:"name,omitempty"`
	ContactGroups []string `json:"contact_groups,omitempty"`
	WebhookUrl    string   `json:"webhook_url,omitempty"`
}

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 IntegrationPagerduty struct {
	Name          string   `json:"name,omitempty"`
	ContactGroups []string `json:"contact_groups,omitempty"`
	ServiceKey    string   `json:"service_key,omitempty"`
	Autoresolve   bool     `json:"autoresolve"`
}

type IntegrationPushbullet

type IntegrationPushbullet struct {
	Name          string   `json:"name,omitempty"`
	ContactGroups []string `json:"contact_groups,omitempty"`
	Email         string   `json:"email,omitempty"`
}

type IntegrationPushover

type IntegrationPushover struct {
	Name          string   `json:"name,omitempty"`
	ContactGroups []string `json:"contact_groups,omitempty"`
	User          string   `json:"user,omitempty"`
	Priority      int64    `json:"priority,omitempty"`
}

type IntegrationResponse

type IntegrationResponse struct {
	Results Integration `json:"results,omitempty"`
}

func (IntegrationResponse) Item

type IntegrationSlack

type IntegrationSlack struct {
	Name          string   `json:"name,omitempty"`
	ContactGroups []string `json:"contact_groups,omitempty"`
	WebhookURL    string   `json:"webhook_url,omitempty"`
	Channel       string   `json:"channel,omitempty"`
}

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 IntegrationStatuspage struct {
	Name          string   `json:"name,omitempty"`
	ContactGroups []string `json:"contact_groups,omitempty"`
	APIKey        string   `json:"api_key,omitempty"`
	Page          string   `json:"page,omitempty"`
	Component     string   `json:"component,omitempty"`
	Metric        string   `json:"metric,omitempty"`
}

type IntegrationTwitter

type IntegrationTwitter struct {
	Name             string   `json:"name,omitempty"`
	ContactGroups    []string `json:"contact_groups,omitempty"`
	OauthToken       string   `json:"oauth_token,omitempty"`
	OauthTokenSecret string   `json:"oauth_token_secret,omitempty"`
}

type IntegrationVictorops

type IntegrationVictorops struct {
	Name          string   `json:"name,omitempty"`
	ContactGroups []string `json:"contact_groups,omitempty"`
	ServiceKey    string   `json:"service_key,omitempty"`
	RoutingKey    string   `json:"routing_key,omitempty"`
}

type IntegrationWavefront

type IntegrationWavefront struct {
	Name          string   `json:"name,omitempty"`
	ContactGroups []string `json:"contact_groups,omitempty"`
	WavefrontUrl  string   `json:"wavefront_url,omitempty"`
	APIToken      string   `json:"api_token,omitempty"`
}

type IntegrationWebhook

type IntegrationWebhook struct {
	Name             string   `json:"name,omitempty"`
	ContactGroups    []string `json:"contact_groups,omitempty"`
	PostbackUrl      string   `json:"postback_url,omitempty"`
	Headers          string   `json:"headers,omitempty"`
	UseLegacyPayload bool     `json:"use_legacy_payload"`
}

type IntegrationZapier

type IntegrationZapier struct {
	Name          string   `json:"name,omitempty"`
	ContactGroups []string `json:"contact_groups,omitempty"`
	WebhookUrl    string   `json:"webhook_url,omitempty"`
}

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 Itemable

type Itemable[Item any] interface {
	Item() Item
}

type ListResult added in v2.6.0

type ListResult[Item any] struct {
	Items      []Item
	TotalCount int64
}

ListResult contains items and total count from list responses.

type Listable

type Listable[Item any] interface {
	List() []Item
	CountItems() int64
}

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"`
}

func (MaintenanceNotificationCreateUpdateResponse) Item added in v2.13.0

type MaintenanceNotificationListOptions added in v2.13.0

type MaintenanceNotificationListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

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 (MaintenanceNotificationListResponse) List added in v2.13.0

type MaintenanceNotificationResponse added in v2.13.0

type MaintenanceNotificationResponse MaintenanceScheduleNotification

func (MaintenanceNotificationResponse) Item added in v2.13.0

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

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 MaintenanceScheduleListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

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

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

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

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

type Option func(cbd CBD) (CBD, error)

func WithBaseURL

func WithBaseURL(baseurl string) Option

func WithBearerToken added in v2.8.0

func WithBearerToken(token string) Option

func WithRateLimit

func WithRateLimit(rateLimit float64) Option

func WithRateLimitEvery

func WithRateLimitEvery(every time.Duration) Option

func WithRetry

func WithRetry(limit int, maxDelay time.Duration, w io.Writer) Option

func WithSubaccount

func WithSubaccount(subaccount int64) Option

func WithToken

func WithToken(token string) Option

func WithTrace

func WithTrace(w io.Writer) Option

func WithUserAgent

func WithUserAgent(ua string) Option

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

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 PushNotificationProfileCreateRequest struct {
	AppKey        string   `json:"app_key" flag:"app-key"`
	UUID          string   `json:"uuid,omitempty" flag:"uuid"`
	DeviceName    string   `json:"device_name" flag:"device-name"`
	ContactGroups []string `json:"contact_groups" flag:"contact-groups"`
}

type PushNotificationProfileCreateUpdateResponse added in v2.4.0

type PushNotificationProfileCreateUpdateResponse struct {
	PushNotificationProfile `json:",inline"`
}

func (PushNotificationProfileCreateUpdateResponse) Item added in v2.4.0

type PushNotificationProfileItemResponse added in v2.4.0

type PushNotificationProfileItemResponse struct {
	PushNotificationProfile `json:",inline"`
}

func (PushNotificationProfileItemResponse) Item added in v2.4.0

type PushNotificationProfileListOptions added in v2.4.0

type PushNotificationProfileListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

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 (PushNotificationProfileListResponse) List added in v2.4.0

type PushNotificationProfileUpdateRequest added in v2.4.0

type PushNotificationProfileUpdateRequest struct {
	DeviceName    string   `json:"device_name,omitempty" flag:"device-name"`
	ContactGroups []string `json:"contact_groups,omitempty" flag:"contact-groups"`
}

type RequestBuilder

type RequestBuilder interface {
	BuildRequest(ctx context.Context, method string, endpoint string, args any, data any) (*http.Request, error)
}

type ResponseDecoder

type ResponseDecoder interface {
	DecodeResponse(rs *http.Response, data any) error
}

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

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

type SLAReportGroupCreateUpdateResponse

type SLAReportGroupCreateUpdateResponse struct {
	Results SLAReportGroup `json:"results,omitempty"`
}

func (SLAReportGroupCreateUpdateResponse) Item

type SLAReportGroupListOptions

type SLAReportGroupListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

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

type SLAReportGroupResponse

type SLAReportGroupResponse SLAReportGroup

func (SLAReportGroupResponse) Item

type SLAReportListOptions

type SLAReportListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

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

type SLAReportService struct {
	PK   int    `json:"pk,omitempty"`
	Name string `json:"name,omitempty"`
}

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 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

type ScheduledReportListOptions

type ScheduledReportListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

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

type ScheduledReportResponse

type ScheduledReportResponse ScheduledReport

func (ScheduledReportResponse) Item

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 ServiceVariableCreateRequest struct {
	CredentialID int64  `json:"credential_id" flag:"credential-id"`
	PropertyName string `json:"property_name" flag:"property-name"`
	ServiceID    int64  `json:"service_id" flag:"service-id"`
	VariableName string `json:"variable_name" flag:"variable-name"`
}

type ServiceVariableCreateUpdateResponse added in v2.1.0

type ServiceVariableCreateUpdateResponse struct {
	Results ServiceVariable `json:"results,omitempty"`
}

func (ServiceVariableCreateUpdateResponse) Item added in v2.1.0

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

type ServiceVariableListOptions added in v2.1.0

type ServiceVariableListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

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

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 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"`
	CustomFooterHtml          string `json:"custom_footer_html"`
	CustomCss                 string `json:"custom_css"`
	CustomHeaderHtmlInspire   string `json:"custom_header_html_inspire"`
	CustomFooterHtmlInspire   string `json:"custom_footer_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

type StatusPageComponentListOptions

type StatusPageComponentListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

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

type StatusPageComponentResponse

type StatusPageComponentResponse StatusPageComponent

func (StatusPageComponentResponse) Item

type StatusPageCreateUpdateResponse

type StatusPageCreateUpdateResponse struct {
	Results StatusPage `json:"results,omitempty"`
}

func (StatusPageCreateUpdateResponse) Item

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

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

type StatusPageIncidentListOptions

type StatusPageIncidentListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

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

type StatusPageIncidentResponse

type StatusPageIncidentResponse StatusPageIncident

func (StatusPageIncidentResponse) Item

type StatusPageListOptions

type StatusPageListOptions struct {
	Page            int64  `url:"page,omitempty"`
	PageSize        int64  `url:"page_size,omitempty"`
	Search          string `url:"search,omitempty"`
	Ordering        string `url:"ordering,omitempty"`
	VisibilityLevel string `url:"visibility_level,omitempty"`
}

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

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

type StatusPageMetricListOptions

type StatusPageMetricListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

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

type StatusPageMetricResponse

type StatusPageMetricResponse StatusPageMetric

func (StatusPageMetricResponse) Item

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

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 (StatusPageStatusHistoryListResponse) List added in v2.4.0

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

type StatusPageSubsDomainAllowList

type StatusPageSubsDomainAllowList struct {
	PK     int64  `json:"id"`
	Domain string `json:"domain"`
}

func (StatusPageSubsDomainAllowList) PrimaryKey

type StatusPageSubsDomainAllowListCreateUpdateResponse

type StatusPageSubsDomainAllowListCreateUpdateResponse struct {
	Results StatusPageSubsDomainAllowList `json:"results,omitempty"`
}

func (StatusPageSubsDomainAllowListCreateUpdateResponse) Item

type StatusPageSubsDomainAllowListListOptions

type StatusPageSubsDomainAllowListListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

type StatusPageSubsDomainAllowListListResponse

type StatusPageSubsDomainAllowListListResponse struct {
	Count   int64                           `json:"count,omitempty"`
	Results []StatusPageSubsDomainAllowList `json:"results,omitempty"`
}

func (StatusPageSubsDomainAllowListListResponse) CountItems added in v2.6.0

func (StatusPageSubsDomainAllowListListResponse) List

type StatusPageSubsDomainAllowListResponse

type StatusPageSubsDomainAllowListResponse StatusPageSubsDomainAllowList

func (StatusPageSubsDomainAllowListResponse) Item

type StatusPageSubsDomainBlockList

type StatusPageSubsDomainBlockList struct {
	PK     int64  `json:"id"`
	Domain string `json:"domain"`
}

func (StatusPageSubsDomainBlockList) PrimaryKey

type StatusPageSubsDomainBlockListCreateUpdateResponse

type StatusPageSubsDomainBlockListCreateUpdateResponse struct {
	Results StatusPageSubsDomainBlockList `json:"results,omitempty"`
}

func (StatusPageSubsDomainBlockListCreateUpdateResponse) Item

type StatusPageSubsDomainBlockListListOptions

type StatusPageSubsDomainBlockListListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

type StatusPageSubsDomainBlockListListResponse

type StatusPageSubsDomainBlockListListResponse struct {
	Count   int64                           `json:"count,omitempty"`
	Results []StatusPageSubsDomainBlockList `json:"results,omitempty"`
}

func (StatusPageSubsDomainBlockListListResponse) CountItems added in v2.6.0

func (StatusPageSubsDomainBlockListListResponse) List

type StatusPageSubsDomainBlockListResponse

type StatusPageSubsDomainBlockListResponse StatusPageSubsDomainBlockList

func (StatusPageSubsDomainBlockListResponse) Item

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

type StatusPageSubscriberListOptions

type StatusPageSubscriberListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

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

type StatusPageSubscriberResponse

type StatusPageSubscriberResponse StatusPageSubscriber

func (StatusPageSubscriberResponse) Item

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

type StatusPageUserListOptions

type StatusPageUserListOptions struct {
	Page     int64  `url:"page,omitempty"`
	PageSize int64  `url:"page_size,omitempty"`
	Search   string `url:"search,omitempty"`
	Ordering string `url:"ordering,omitempty"`
}

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

type StatusPageUserResponse

type StatusPageUserResponse StatusPageUser

func (StatusPageUserResponse) Item

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

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

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

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 UserAccount struct {
	Name               string `json:"name,omitempty"`
	Timezone           string `json:"timezone,omitempty"`
	DataRegion         string `json:"data_region,omitempty"`
	FreeTrialExpiresAt string `json:"free_trial_expires_at,omitempty"`
}

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

func NewUsersEndpoint added in v2.3.0

func NewUsersEndpoint(cbd CBD) UsersEndpoint

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL