Documentation
¶
Index ¶
- func JsonPrint(data interface{})
- type BlackoutPeriods
- type Browser
- type BrowserCheckInput
- type BrowserCheckResponse
- type Checks
- type Client
- func (c Client) CreateBrowserCheck(browserCheckDetails *BrowserCheckInput) (*BrowserCheckResponse, *RequestDetails, error)
- func (c Client) CreateHttpCheck(httpCheckDetails *HttpCheckInput) (*HttpCheckResponse, *RequestDetails, error)
- func (c Client) DeleteBrowserCheck(id int) (*DeleteCheck, error)
- func (c Client) DeleteHttpCheck(id int) (*DeleteCheck, error)
- func (c Client) GetCheck(id int) (*GetCheck, *RequestDetails, error)
- func (c Client) GetChecks(params *GetChecksOptions) (*GetChecks, *RequestDetails, error)
- func (c Client) GetHTTPClient() *http.Client
- func (c Client) GetHttpCheck(id int) (*GetHttpCheck, *RequestDetails, error)
- func (c Client) String() string
- func (c Client) UpdateBrowserCheck(id int, browserCheckDetails *BrowserCheckInput) (*BrowserCheckResponse, *RequestDetails, error)
- func (c Client) UpdateHttpCheck(id int, httpCheckDetails *HttpCheckInput) (*HttpCheckResponse, *RequestDetails, error)
- type ClientArgs
- type Connection
- type Cookies
- type DNSOverrides
- type DeleteCheck
- type Errors
- type Escalations
- type ExcludedFiles
- type GetCheck
- type GetChecks
- type GetChecksOptions
- type GetHttpCheck
- type HTTPRequestHeaders
- type HttpCheckInput
- type HttpCheckResponse
- type Integrations
- type JavascriptFiles
- type Links
- type Locations
- type NotificationWindow
- type NotificationWindows
- type Notifications
- type NotifyWho
- type RequestDetails
- type Status
- type Steps
- type SuccessCriteria
- type Tags
- type ThresholdMonitors
- type Viewport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlackoutPeriods ¶
type BlackoutPeriods []struct { StartDate string `json:"start_date,omitempty"` EndDate string `json:"end_date,omitempty"` Timezone string `json:"timezone,omitempty"` StartTime string `json:"start_time,omitempty"` EndTime string `json:"end_time,omitempty"` RepeatType string `json:"repeat_type,omitempty"` DurationInMinutes int `json:"duration_in_minutes,omitempty"` IsRepeat bool `json:"is_repeat,omitempty"` MonthlyRepeatType string `json:"monthly_repeat_type,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` }
type BrowserCheckInput ¶
type BrowserCheckInput struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Frequency int `json:"frequency,omitempty"` Paused bool `json:"paused,omitempty"` Muted bool `json:"muted,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` Links Links `json:"links,omitempty"` Tags []string `json:"tags"` Status Status `json:"status,omitempty"` RoundRobin bool `json:"round_robin,omitempty"` AutoRetry bool `json:"auto_retry,omitempty"` Enabled bool `json:"enabled,omitempty"` BlackoutPeriods BlackoutPeriods `json:"blackout_periods,omitempty"` Locations []int `json:"locations,omitempty"` Integrations []int `json:"integrations,omitempty"` HTTPRequestHeaders HTTPRequestHeaders `json:"http_request_headers,omitempty"` HTTPRequestBody string `json:"http_request_body,omitempty"` HTTPMethod string `json:"http_method,omitempty"` Notifications Notifications `json:"notifications,omitempty"` URL string `json:"url,omitempty"` UserAgent string `json:"user_agent,omitempty"` AutoUpdateUserAgent bool `json:"auto_update_user_agent,omitempty"` Browser Browser `json:"browser,omitempty"` Steps []Steps `json:"steps,omitempty"` Cookies []Cookies `json:"cookies,omitempty"` JavascriptFiles []JavascriptFiles `json:"javascript_files,omitempty"` ExcludedFiles []ExcludedFiles `json:"excluded_files,omitempty"` Viewport Viewport `json:"viewport,omitempty"` EnforceSslValidation bool `json:"enforce_ssl_validation,omitempty"` ThresholdMonitors []ThresholdMonitors `json:"threshold_monitors,omitempty"` DNSOverrides DNSOverrides `json:"dns_overrides,omitempty"` Connection Connection `json:"connection,omitempty"` WaitForFullMetrics bool `json:"wait_for_full_metrics,omitempty"` }
type BrowserCheckResponse ¶
type BrowserCheckResponse struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Frequency int `json:"frequency,omitempty"` Paused bool `json:"paused,omitempty"` Muted bool `json:"muted,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` Links Links `json:"links,omitempty"` Tags Tags `json:"tags,omitempty"` Status Status `json:"status,omitempty"` RoundRobin bool `json:"round_robin,omitempty"` AutoRetry bool `json:"auto_retry,omitempty"` Enabled bool `json:"enabled,omitempty"` BlackoutPeriods BlackoutPeriods `json:"blackout_periods,omitempty"` Locations Locations `json:"locations,omitempty"` Integrations Integrations `json:"integrations,omitempty"` HTTPRequestHeaders HTTPRequestHeaders `json:"http_request_headers,omitempty"` HTTPRequestBody string `json:"http_request_body,omitempty"` HTTPMethod string `json:"http_method,omitempty"` Notifications Notifications `json:"notifications,omitempty"` URL string `json:"url,omitempty"` UserAgent string `json:"user_agent,omitempty"` AutoUpdateUserAgent bool `json:"auto_update_user_agent,omitempty"` Browser Browser `json:"browser,omitempty"` Steps []Steps `json:"steps,omitempty"` Cookies []Cookies `json:"cookies,omitempty"` JavascriptFiles []JavascriptFiles `json:"javascript_files,omitempty"` ExcludedFiles []ExcludedFiles `json:"excluded_files,omitempty"` Viewport Viewport `json:"viewport,omitempty"` EnforceSslValidation bool `json:"enforce_ssl_validation,omitempty"` ThresholdMonitors []ThresholdMonitors `json:"threshold_monitors,omitempty"` DNSOverrides DNSOverrides `json:"dns_overrides,omitempty"` Connection Connection `json:"connection,omitempty"` WaitForFullMetrics bool `json:"wait_for_full_metrics,omitempty"` }
type Checks ¶
type Checks []struct { ID int `json:"id"` Name string `json:"name"` Type string `json:"type"` Frequency int `json:"frequency"` Paused bool `json:"paused"` Muted bool `json:"muted"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Links Links `json:"links"` Status Status `json:"status"` Tags Tags `json:"tags"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewConfigurableClient ¶
func NewConfigurableClient(apiKey string, args ClientArgs) *Client
func (Client) CreateBrowserCheck ¶
func (c Client) CreateBrowserCheck(browserCheckDetails *BrowserCheckInput) (*BrowserCheckResponse, *RequestDetails, error)
func (Client) CreateHttpCheck ¶
func (c Client) CreateHttpCheck(httpCheckDetails *HttpCheckInput) (*HttpCheckResponse, *RequestDetails, error)
func (Client) DeleteBrowserCheck ¶
func (c Client) DeleteBrowserCheck(id int) (*DeleteCheck, error)
func (Client) DeleteHttpCheck ¶
func (c Client) DeleteHttpCheck(id int) (*DeleteCheck, error)
func (Client) GetChecks ¶
func (c Client) GetChecks(params *GetChecksOptions) (*GetChecks, *RequestDetails, error)
GetChecks returns all checks
func (Client) GetHTTPClient ¶
GetHTTPClient returns http client for the purpose of test
func (Client) GetHttpCheck ¶
func (c Client) GetHttpCheck(id int) (*GetHttpCheck, *RequestDetails, error)
func (Client) UpdateBrowserCheck ¶
func (c Client) UpdateBrowserCheck(id int, browserCheckDetails *BrowserCheckInput) (*BrowserCheckResponse, *RequestDetails, error)
func (Client) UpdateHttpCheck ¶
func (c Client) UpdateHttpCheck(id int, httpCheckDetails *HttpCheckInput) (*HttpCheckResponse, *RequestDetails, error)
CreateContact creates a new contact for a user
type ClientArgs ¶
type ClientArgs struct {
// contains filtered or unexported fields
}
type Connection ¶
type DNSOverrides ¶
type DeleteCheck ¶
type Escalations ¶
type Escalations struct { Sms bool `json:"sms,omitempty"` Email bool `json:"email,omitempty"` Call bool `json:"call,omitempty"` AfterMinutes int `json:"after_minutes,omitempty"` NotifyWho []NotifyWho `json:"notify_who,omitempty"` IsRepeat bool `json:"is_repeat,omitempty"` NotificationWindow NotificationWindow `json:"notification_window,omitempty"` }
type ExcludedFiles ¶
type GetCheck ¶
type GetCheck struct { ID int Name string `json:"name"` Type string `json:"type"` Frequency int `json:"frequency,omitempty"` Paused bool `json:"paused,omitempty"` Muted bool `json:"muted,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` Links Links `json:"links,omitempty"` Status Status `json:"status,omitempty"` Notifications Notifications `json:"notifications,omitempty"` ResponseTimeMonitorMilliseconds int `json:"response_time_monitor_milliseconds,omitempty"` HTTPRequestHeaders HTTPRequestHeaders `json:"http_request_headers,omitempty"` HTTPRequestBody string `json:"http_request_body,omitempty"` HTTPMethod string `json:"http_method,omitempty"` RoundRobin bool `json:"round_robin,omitempty"` AutoRetry bool `json:"auto_retry,omitempty"` Enabled bool `json:"enabled,omitempty"` Integrations Integrations `json:"integrations,omitempty"` URL string `json:"url,omitempty"` UserAgent string `json:"user_agent,omitempty"` AutoUpdateUserAgent bool `json:"auto_update_user_agent,omitempty"` Viewport Viewport `json:"viewport,omitempty"` EnforceSslValidation bool `json:"enforce_ssl_validation,omitempty"` Browser Browser `json:"browser,omitempty"` DNSOverrides DNSOverrides `json:"dns_overrides,omitempty"` WaitForFullMetrics bool `json:"wait_for_full_metrics,omitempty"` Tags Tags `json:"tags,omitempty"` BlackoutPeriods BlackoutPeriods `json:"blackout_periods,omitempty"` Locations Locations `json:"locations,omitempty"` Steps []Steps `json:"steps,omitempty"` JavascriptFiles []JavascriptFiles `json:"javascript_files,omitempty"` ThresholdMonitors []ThresholdMonitors `json:"threshold_monitors,omitempty"` ExcludedFiles []ExcludedFiles `json:"excluded_files,omitempty"` Cookies []Cookies `json:"cookies,omitempty"` Connection Connection `json:"connection,omitempty"` SuccessCriteria []SuccessCriteria `json:"success_criteria,omitempty"` }
type GetChecksOptions ¶
type GetChecksOptions struct { Type string `json:"type"` PerPage int `json:"per_page"` Page int `json:"page"` Muted bool `json:"muted"` }
Leaving off "Enabled" filter setting. Can be added later if required.
type GetHttpCheck ¶
type GetHttpCheck struct { ID int Name string `json:"name"` Type string `json:"type"` Frequency int `json:"frequency,omitempty"` Paused bool `json:"paused,omitempty"` Muted bool `json:"muted,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` Links Links `json:"links,omitempty"` Status Status `json:"status,omitempty"` Notifications Notifications `json:"notifications,omitempty"` ResponseTimeMonitorMilliseconds int `json:"response_time_monitor_milliseconds,omitempty"` HTTPRequestHeaders HTTPRequestHeaders `json:"http_request_headers,omitempty"` HTTPRequestBody string `json:"http_request_body,omitempty"` HTTPMethod string `json:"http_method,omitempty"` RoundRobin bool `json:"round_robin,omitempty"` AutoRetry bool `json:"auto_retry,omitempty"` Enabled bool `json:"enabled,omitempty"` Integrations Integrations `json:"integrations,omitempty"` URL string `json:"url,omitempty"` UserAgent string `json:"user_agent,omitempty"` Tags Tags `json:"tags,omitempty"` BlackoutPeriods BlackoutPeriods `json:"blackout_periods,omitempty"` Locations Locations `json:"locations,omitempty"` Connection Connection `json:"connection"` SuccessCriteria []SuccessCriteria `json:"success_criteria,omitempty"` }
type HTTPRequestHeaders ¶
type HTTPRequestHeaders struct {
UserAgent string `json:"User-Agent,omitempty"`
}
type HttpCheckInput ¶
type HttpCheckInput struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Frequency int `json:"frequency,omitempty"` Paused bool `json:"paused,omitempty"` Muted bool `json:"muted,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` Links Links `json:"links,omitempty"` Tags []string `json:"tags"` Status Status `json:"status,omitempty"` RoundRobin bool `json:"round_robin,omitempty"` AutoRetry bool `json:"auto_retry,omitempty"` Enabled bool `json:"enabled,omitempty"` BlackoutPeriods BlackoutPeriods `json:"blackout_periods,omitempty"` Locations []int `json:"locations,omitempty"` Integrations []int `json:"integrations,omitempty"` HTTPRequestHeaders HTTPRequestHeaders `json:"http_request_headers,omitempty"` HTTPRequestBody string `json:"http_request_body,omitempty"` Notifications Notifications `json:"notifications,omitempty"` URL string `json:"url,omitempty"` HTTPMethod string `json:"http_method,omitempty"` SuccessCriteria []SuccessCriteria `json:"success_criteria,omitempty"` Connection Connection `json:"connection,omitempty"` }
type HttpCheckResponse ¶
type HttpCheckResponse struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Frequency int `json:"frequency,omitempty"` Paused bool `json:"paused,omitempty"` Muted bool `json:"muted,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` Links Links `json:"links,omitempty"` Tags Tags `json:"tags,omitempty"` Status Status `json:"status,omitempty"` RoundRobin bool `json:"round_robin,omitempty"` AutoRetry bool `json:"auto_retry,omitempty"` Enabled bool `json:"enabled,omitempty"` BlackoutPeriods BlackoutPeriods `json:"blackout_periods,omitempty"` Locations Locations `json:"locations,omitempty"` Integrations Integrations `json:"integrations,omitempty"` HTTPRequestHeaders HTTPRequestHeaders `json:"http_request_headers,omitempty"` HTTPRequestBody string `json:"http_request_body,omitempty"` Notifications Notifications `json:"notifications,omitempty"` URL string `json:"url,omitempty"` HTTPMethod string `json:"http_method,omitempty"` SuccessCriteria []SuccessCriteria `json:"success_criteria,omitempty"` Connection Connection `json:"connection,omitempty"` }
type Integrations ¶
type JavascriptFiles ¶
type Links ¶
type Links struct { Self string `json:"self,omitempty"` SelfHTML string `json:"self_html,omitempty"` Metrics string `json:"metrics,omitempty"` LastRun string `json:"last_run,omitempty"` }
Common and shared struct models used for more complex requests
type NotificationWindow ¶
type NotificationWindows ¶
type Notifications ¶
type Notifications struct { Sms bool `json:"sms,omitempty"` Email bool `json:"email,omitempty"` Call bool `json:"call,omitempty"` NotifyWho []NotifyWho `json:"notify_who,omitempty"` NotifyAfterFailureCount int `json:"notify_after_failure_count,omitempty"` NotifyOnLocationFailure bool `json:"notify_on_location_failure,omitempty"` NotificationWindows NotificationWindows `json:"notification_windows,omitempty"` Escalations []Escalations `json:"escalations,omitempty"` Muted bool `json:"muted,omitempty"` }
type RequestDetails ¶
type Status ¶
type Status struct { LastCode int `json:"last_code,omitempty"` LastMessage string `json:"last_message,omitempty"` LastResponseTime int `json:"last_response_time,omitempty"` LastRunAt string `json:"last_run_at,omitempty"` LastFailureAt string `json:"last_failure_at,omitempty"` LastAlertAt string `json:"last_alert_at,omitempty"` HasFailure bool `json:"has_failure,omitempty"` HasLocationFailure bool `json:"has_location_failure,omitempty"` }
type Steps ¶
type Steps struct { ItemMethod string `json:"item_method,omitempty"` Value string `json:"value,omitempty"` How string `json:"how,omitempty"` What string `json:"what,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` CreatedAt string `json:"created_at,omitempty"` VariableName string `json:"variable_name,omitempty"` Name string `json:"name,omitempty"` Position int `json:"position,omitempty"` }
type SuccessCriteria ¶
type ThresholdMonitors ¶
type ThresholdMonitors struct { Matcher string `json:"matcher,omitempty"` MetricName string `json:"metric_name,omitempty"` ComparisonType string `json:"comparison_type,omitempty"` Value int `json:"value,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` }
Click to show internal directories.
Click to hide internal directories.