Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateComponent(params CreateComponentRequest) (Component, error)
- func (c *Client) GetComponent(params GetComponentRequest) (Component, error)
- func (c *Client) GetComponents(params GetComponentsRequest) ([]Component, error)
- func (c *Client) GetPages(params GetPagesRequest) ([]Page, error)
- func (c *Client) UpdateComponent(params UpdateComponentRequest) (Component, error)
- type Component
- type CreateComponentFields
- type CreateComponentRequest
- type Error
- type GetComponentRequest
- type GetComponentsRequest
- type GetPagesRequest
- type Page
- type PageDetails
- type Translations
- type UpdateComponentFields
- type UpdateComponentRequest
Constants ¶
View Source
const BaseUrl = "https://api.instatus.com"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateComponent ¶
func (c *Client) CreateComponent(params CreateComponentRequest) (Component, error)
func (*Client) GetComponent ¶
func (c *Client) GetComponent(params GetComponentRequest) (Component, error)
func (*Client) GetComponents ¶
func (c *Client) GetComponents(params GetComponentsRequest) ([]Component, error)
func (*Client) UpdateComponent ¶
func (c *Client) UpdateComponent(params UpdateComponentRequest) (Component, error)
type Component ¶
type Component struct { Id string `json:"id"` Name string `json:"name"` NameTranslationId *string `json:"nameTranslationId"` Description *string `json:"description"` DescriptionTranslationId *string `json:"descriptionTranslationId"` // TODO: Enum Status string `json:"status"` InternalStatus string `json:"internalStatus"` Order int `json:"order"` ShowUptime bool `json:"showUptime"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` ArchivedAt *time.Time `json:"archivedAt"` SiteId string `json:"siteId"` UniqueEmail string `json:"uniqueEmail"` OldGroup any `json:"oldGroup"` GroupId *string `json:"groupId"` IsParent bool `json:"isParent"` IsCollapsed bool `json:"isCollapsed"` MonitorId *string `json:"monitorId"` NameHtml *string `json:"nameHtml"` NameHtmlTranslationId *string `json:"nameHtmlTranslationId"` DescriptionHtml *string `json:"descriptionHtml"` DescriptionHtmlTranslationId *string `json:"descriptionHtmlTranslationId"` IsThirdParty bool `json:"isThirdParty"` ThirdPartyStatus *string `json:"thirdPartyStatus"` ThirdPartyComponentId *string `json:"thirdPartyComponentId"` ThirdPartyComponentServiceId *string `json:"thirdPartyComponentServiceId"` ImportedFromStatuspage bool `json:"importedFromStatuspage"` StartDate *time.Time `json:"startDate"` Group *Component `json:"group"` Translations Translations `json:"translations"` }
type CreateComponentFields ¶
type CreateComponentRequest ¶
type CreateComponentRequest struct { PageId string Fields CreateComponentFields }
type Error ¶
type GetComponentRequest ¶
type GetComponentsRequest ¶
type GetComponentsRequest struct { PageDetails PageId string }
type GetPagesRequest ¶
type GetPagesRequest struct {
PageDetails
}
type Page ¶
type Page struct { Id string `json:"id"` Subdomain string `json:"subdomain"` Name string `json:"name"` WorkspaceId string `json:"workspaceId"` LogoUrl *string `json:"logoUrl"` FaviconUrl *string `json:"faviconUrl"` WebsiteUrl *string `json:"websiteUrl"` CustomDomain *string `json:"customDomain"` PublicEmail *string `json:"publicEmail"` Twitter *string `json:"twitter"` Status string `json:"status"` SubscribeBySms bool `json:"subscribeBySms"` SendSmsNotifications bool `json:"sendSmsNotifications"` Language string `json:"language"` UseLargeHeader bool `json:"useLargeHeader"` BrandColor string `json:"brandColor"` OkColor string `json:"okColor"` DisruptedColor string `json:"disruptedColor"` DegradedColor string `json:"degradedColor"` DownColor string `json:"downColor"` NoticeColor string `json:"noticeColor"` UnknownColor string `json:"unknownColor"` GoogleAnalytics *string `json:"googleAnalytics"` SmsService *string `json:"smsService"` HtmlInMeta *string `json:"htmlInMeta"` HtmlAboveHeader *string `json:"htmlAboveHeader"` HtmlBelowHeader *string `json:"htmlBelowHeader"` HtmlBelowSummary *string `json:"htmlBelowSummary"` UptimeDaysDisplay string `json:"uptimeDaysDisplay"` UptimeOutageDisplay string `json:"uptimeOutageDisplay"` LaunchDate *time.Time `json:"launchDate"` CssGlobal *string `json:"cssGlobal"` Onboarded *bool `json:"onboarded"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
type PageDetails ¶
type Translations ¶
type UpdateComponentFields ¶
type UpdateComponentFields struct {
Status *string `json:"status,omitempty"`
}
type UpdateComponentRequest ¶
type UpdateComponentRequest struct { PageId string ComponentId string UpdatedFields UpdateComponentFields }
Click to show internal directories.
Click to hide internal directories.