betteruptime

package
v0.0.0-...-84fb89b Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IncidentIDFromURL

func IncidentIDFromURL(incidentStr string) (string, error)

Extracts a betteruptime incident ID from the URL. If an incidentID is provided (and not a URL), it returns that without any further processing

func NewClient

func NewClient() client

Types

type Acknowledge

type Acknowledge struct {
	AcknowledgedBy string `json:"acknowledged_by"`
}

type CreateMonitorGroupRequest

type CreateMonitorGroupRequest struct {
	Name      string `json:"name"`
	Paused    bool   `json:"paused"`
	SortIndex *int   `json:"sort_index"`
}

type CreateMonitorRequest

type CreateMonitorRequest struct {
	Name      string `json:"name"`
	Paused    bool   `json:"paused"`
	SortIndex *int   `json:"sort_index"`
}

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 IncidentRelationship struct {
	Id   string `json:"id"`
	Type string `json:"type"`
}

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"`
	Remember_cookies    bool       `json:"remember_cookies"`
	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 MonitorGroupAttributes struct {
	Name      string     `json:"name"`
	SortIndex int        `json:"sort_index"`
	CreatedAt time.Time  `json:"created_at"`
	UpdateAt  *time.Time `json:"updated_at"`
	Paused    bool       `json:"paused"`
}

type OnCall

type OnCall struct {
	Id            string              `json:"id"`
	Type          string              `json:"type"`
	Attributes    OnCallAttributes    `json:"attributes"`
	Relationships OnCallRelationships `json:"relationships"`
}

type OnCallAttributes

type OnCallAttributes struct {
	Name            string `json:"name" yaml:"name"`
	DefaultCalendar bool   `json:"default_calendar" yaml:"default_calendar"`
}

type OnCallRelationships

type OnCallRelationships struct {
	OnCallUsers OnCallUserReferences `json:"on_call_users"`
}

type OnCallUserReferences

type OnCallUserReferences struct {
	Data []struct {
		Id   string
		Type string
	}
}

type Pagination

type Pagination struct {
	First string
	Last  string
	Prev  *string
	Next  *string
}

type Resolve

type Resolve struct {
	ResolvedBy string `json:"resolved_by"`
}

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 UserAttributes

type UserAttributes struct {
	FirstName    string   `json:"first_name" yaml:"first_name"`
	LastName     string   `json:"last_name" yaml:"last_name"`
	Email        string   `json:"email" yaml:"email"`
	PhoneNumbers []string `json:"phone_numbers" yaml:"phone_numbers"`
}

type UserReferences

type UserReferences struct {
	Id         string         `json:"id"`
	Attributes UserAttributes `json:"attributes"`
}

Jump to

Keyboard shortcuts

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