Documentation ¶
Index ¶
- Variables
- func IncidentIDFromURL(incidentStr string) (string, error)
- func NewClient() client
- type Acknowledge
- type CreateMonitorGroupRequest
- type CreateMonitorRequest
- type CreateStatusPageRequest
- type GetMonitorGroupResponse
- type GetMonitorResponse
- type GetStatusPageResponse
- type Incident
- type IncidentAttributes
- type IncidentRelationship
- type ListIncidentResponse
- type ListMonitorGroupResponse
- type ListMonitorResponse
- type ListOnCallResponse
- type ListStatusPageResourcesResponse
- type ListStatusPageResponse
- type Monitor
- type MonitorAttributes
- type MonitorGroup
- type MonitorGroupAttributes
- type OnCall
- type OnCallAttributes
- type OnCallRelationships
- type OnCallUserReferences
- type Pagination
- type Resolve
- type StatusPage
- type StatusPageAttributes
- type StatusPageResource
- type StatusPageResourceAttributes
- type UpdateMonitorRequest
- type UserAttributes
- type UserReferences
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrIncidentAlreadyAcknowledged = errors.New("incident is already acknowledged") ErrIncidentAlreadyResolved = errors.New("incident is already resolved") ErrIncidentNotFound = errors.New("incident not found") ErrUnexpectedStatusCodeFromAPI = errors.New("unexpected status received from better-uptime API") )
Functions ¶
func IncidentIDFromURL ¶ added in v0.1.0
Extracts a betteruptime incident ID from the URL. If an incidentID is provided (and not a URL), it returns that without any further processing
Types ¶
type Acknowledge ¶ added in v0.0.2
type Acknowledge struct {
AcknowledgedBy string `json:"acknowledged_by"`
}
type CreateMonitorRequest ¶
type CreateStatusPageRequest ¶
type CreateStatusPageRequest struct { CompanyName *string `json:"company_name,omitempty"` CompanyURL *string `json:"company_url,omitempty"` ContactURL *string `json:"contact_url,omitempty"` LogoURL *string `json:"logo_url,omitempty"` Timezone *string `json:"timezone,omitempty"` CustomDomain *string `json:"custom_domain,omitempty"` SubDomain *string `json:"subdomain,omitempty"` Announcement *string `json:"announcement,omitempty"` Subscribable *bool `json:"subscribable,omitempty"` HideFromSearchEngines *bool `json:"hide_from_search_engines,omitempty"` PasswordEnabled *bool `json:"password_enabled,omitempty"` Password *string `json:"password,omitempty"` History *int `json:"history,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdateAt *time.Time `json:"updated_at,omitempty"` MinIncidentLength *int `json:"min_incident_length,omitempty"` }
type GetMonitorGroupResponse ¶
type GetMonitorGroupResponse struct {
Data MonitorGroup
}
type GetMonitorResponse ¶
type GetMonitorResponse struct {
Data Monitor
}
type GetStatusPageResponse ¶
type GetStatusPageResponse struct {
Data StatusPage
}
type Incident ¶
type Incident struct { Id string Type string // Attributes map[string]interface{} Attributes IncidentAttributes Relationships map[string]IncidentRelationship }
type IncidentAttributes ¶
type IncidentAttributes struct { Name string Url string Http_method string Cause string Incident_group_id *int Started_at time.Time Acknowledged_at *time.Time Acknowledged_by *string Resolved_at *time.Time Resolved_by *string Response_content *string Response_options *string Regions []string Response_url *string Screenshot_url *string Escalation_policy_id *int Call bool Sms bool Email bool Push bool }
type IncidentRelationship ¶
type ListIncidentResponse ¶
type ListIncidentResponse struct { Data []Incident Pagination Pagination }
type ListMonitorGroupResponse ¶
type ListMonitorGroupResponse struct { Data []MonitorGroup Pagination Pagination }
type ListMonitorResponse ¶
type ListMonitorResponse struct { Data []Monitor Pagination Pagination }
type ListOnCallResponse ¶
type ListOnCallResponse struct { Data []OnCall `json:"data"` Included []UserReferences `json:"included"` Pagination Pagination `json:"pagination"` }
type ListStatusPageResourcesResponse ¶
type ListStatusPageResourcesResponse struct { Data []StatusPageResource `json:"data"` Pagination Pagination `json:"pagination"` }
type ListStatusPageResponse ¶
type ListStatusPageResponse struct { Data []StatusPage Pagination Pagination }
type Monitor ¶
type Monitor struct { Id string Type string Attributes MonitorAttributes }
type MonitorAttributes ¶
type MonitorAttributes struct { Url string `json:"url"` PronounceableName string `json:"pronounceable_name"` Monitor_type string `json:"monitor_type"` Monitor_group_id int `json:"monitor_group_id"` LastCheckedAt time.Time `json:"last_checked_at"` Status string `json:"status"` Policy_id string `json:"policy_id"` Required_keyword string `json:"required_keyword"` Verify_ssl bool `json:"verify_ssl"` Check_frequency int `json:"check_frequency"` Call bool `json:"call"` Sms bool `json:"sms"` Email bool `json:"email"` Push bool `json:"push"` Team_wait bool `json:"team_wait"` Http_method string `json:"http_method"` Request_timeout int `json:"request_timeout"` Recovery_period int `json:"recovery_period"` // Request_headers string `json:"request_headers"` Request_body string `json:"request_body"` Follow_redirects bool `json:"follow_redirects"` Ssl_expiration int `json:"ssl_expiration"` Domain_expiration string `json:"domain_expiration"` Regions []string `json:"regions"` ExpectedStatusCodes []int `json:"expected_status_codes"` Port string `json:"port"` ConfirmationPeriod int `json:"confirmation_period"` PausedAt *time.Time `json:"paused_at"` Paused bool `json:"paused"` MaintenanceFrom *time.Time `json:"maintenance_from"` MaintenanceTo *time.Time `json:"maintenance_to"` MaintenanceTimezone string `json:"maintenance_timezone"` CreatedAt time.Time `json:"created_at"` UpdateAt *time.Time `json:"updated_at"` }
type MonitorGroup ¶
type MonitorGroup struct { Id string Type string Attributes MonitorGroupAttributes }
type MonitorGroupAttributes ¶
type OnCall ¶
type OnCall struct { Id string `json:"id"` Type string `json:"type"` Attributes OnCallAttributes `json:"attributes"` Relationships OnCallRelationships `json:"relationships"` }
type OnCallAttributes ¶
type OnCallRelationships ¶
type OnCallRelationships struct {
OnCallUsers OnCallUserReferences `json:"on_call_users"`
}
type OnCallUserReferences ¶
type StatusPage ¶
type StatusPage struct { Id string Type string Attributes StatusPageAttributes }
type StatusPageAttributes ¶
type StatusPageAttributes struct { CompanyName string `json:"company_name"` CompanyURL string `json:"company_url"` ContactURL string `json:"contact_url"` LogoURL string `json:"logo_url"` CustomDomain string `json:"custom_domain"` Announcement string `json:"announcement"` Subscribable bool `json:"subscribable"` HideFromSearchEngines bool `json:"hide_from_search_engines"` PasswordEnabled bool `json:"password_enabled"` History int `json:"history"` CreatedAt time.Time `json:"created_at"` UpdateAt *time.Time `json:"updated_at"` }
type StatusPageResource ¶
type StatusPageResource struct { Id string `json:"id"` Type string `json:"type"` Attributes StatusPageResourceAttributes `json:"attributes"` }
type StatusPageResourceAttributes ¶
type StatusPageResourceAttributes struct { StatusPageSectionId int `json:"status_page_section_id" yaml:"status_page_section_id"` ResourceId int `json:"resource_id" yaml:"resource_id"` ResourceType string `json:"resource_type" yaml:"resource_type"` History bool `json:"history" yaml:"history"` WidgetType string `json:"widget_type" yaml:"widget_type"` PublicName string `json:"public_name" yaml:"public_name"` Explanation string `json:"explanation" yaml:"explanation"` Position int `json:"position" yaml:"position"` }
type UpdateMonitorRequest ¶ added in v0.1.0
type UpdateMonitorRequest struct {
Paused bool `json:"paused"`
}
type UserAttributes ¶
type UserReferences ¶
type UserReferences struct { Id string `json:"id"` Attributes UserAttributes `json:"attributes"` }
Click to show internal directories.
Click to hide internal directories.