Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateIncident(title, summary, severity string) (*Incident, error)
- func (c *Client) CreateWebhookEndpoint(url string, events []string) (*WebhookEndpoint, error)
- func (c *Client) DeleteWebhookEndpoint(id string) error
- func (c *Client) GetIncident(id string) (*Incident, error)
- func (c *Client) GetService(id string) (*Service, error)
- func (c *Client) ListIncidents() ([]Incident, error)
- func (c *Client) ListServices() ([]Service, error)
- func (c *Client) ListSeverities() ([]Severity, error)
- type Configuration
- type CreateIncident
- func (c *CreateIncident) Actions() []core.Action
- func (c *CreateIncident) Cancel(ctx core.ExecutionContext) error
- func (c *CreateIncident) Cleanup(ctx core.SetupContext) error
- func (c *CreateIncident) Color() string
- func (c *CreateIncident) Configuration() []configuration.Field
- func (c *CreateIncident) Description() string
- func (c *CreateIncident) Documentation() string
- func (c *CreateIncident) ExampleOutput() map[string]any
- func (c *CreateIncident) Execute(ctx core.ExecutionContext) error
- func (c *CreateIncident) HandleAction(ctx core.ActionContext) error
- func (c *CreateIncident) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (c *CreateIncident) Icon() string
- func (c *CreateIncident) Label() string
- func (c *CreateIncident) Name() string
- func (c *CreateIncident) OutputChannels(configuration any) []core.OutputChannel
- func (c *CreateIncident) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *CreateIncident) Setup(ctx core.SetupContext) error
- type CreateIncidentAttributes
- type CreateIncidentData
- type CreateIncidentRequest
- type CreateIncidentSpec
- type CreateWebhookEndpointAttributes
- type CreateWebhookEndpointData
- type CreateWebhookEndpointRequest
- type Incident
- type IncidentAttributes
- type IncidentData
- type IncidentResponse
- type IncidentsResponse
- type Metadata
- type NodeMetadata
- type OnIncident
- func (t *OnIncident) Actions() []core.Action
- func (t *OnIncident) Cleanup(ctx core.TriggerContext) error
- func (t *OnIncident) Color() string
- func (t *OnIncident) Configuration() []configuration.Field
- func (t *OnIncident) Description() string
- func (t *OnIncident) Documentation() string
- func (t *OnIncident) ExampleData() map[string]any
- func (t *OnIncident) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
- func (t *OnIncident) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (t *OnIncident) Icon() string
- func (t *OnIncident) Label() string
- func (t *OnIncident) Name() string
- func (t *OnIncident) Setup(ctx core.TriggerContext) error
- type OnIncidentConfiguration
- type Rootly
- func (r *Rootly) Actions() []core.Action
- func (r *Rootly) Cleanup(ctx core.IntegrationCleanupContext) error
- func (r *Rootly) Components() []core.Component
- func (r *Rootly) Configuration() []configuration.Field
- func (r *Rootly) Description() string
- func (r *Rootly) HandleAction(ctx core.IntegrationActionContext) error
- func (r *Rootly) HandleRequest(ctx core.HTTPRequestContext)
- func (r *Rootly) Icon() string
- func (r *Rootly) Instructions() string
- func (r *Rootly) Label() string
- func (r *Rootly) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
- func (r *Rootly) Name() string
- func (r *Rootly) Sync(ctx core.SyncContext) error
- func (r *Rootly) Triggers() []core.Trigger
- type RootlyWebhookHandler
- type Service
- type ServiceAttributes
- type ServiceData
- type ServiceResponse
- type ServicesResponse
- type SeveritiesResponse
- type Severity
- type SeverityAttributes
- type SeverityData
- type WebhookConfiguration
- type WebhookEndpoint
- type WebhookEndpointAttributes
- type WebhookEndpointData
- type WebhookEndpointResponse
- type WebhookEvent
- type WebhookMetadata
- type WebhookPayload
Constants ¶
View Source
const BaseURL = "https://api.rootly.com/v1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(http core.HTTPContext, ctx core.IntegrationContext) (*Client, error)
func (*Client) CreateIncident ¶
func (*Client) CreateWebhookEndpoint ¶
func (c *Client) CreateWebhookEndpoint(url string, events []string) (*WebhookEndpoint, error)
func (*Client) DeleteWebhookEndpoint ¶
func (*Client) ListIncidents ¶
func (*Client) ListServices ¶
func (*Client) ListSeverities ¶
type Configuration ¶
type Configuration struct {
APIKey string `json:"apiKey"`
}
type CreateIncident ¶
type CreateIncident struct{}
func (*CreateIncident) Actions ¶
func (c *CreateIncident) Actions() []core.Action
func (*CreateIncident) Cancel ¶
func (c *CreateIncident) Cancel(ctx core.ExecutionContext) error
func (*CreateIncident) Cleanup ¶ added in v0.7.0
func (c *CreateIncident) Cleanup(ctx core.SetupContext) error
func (*CreateIncident) Color ¶
func (c *CreateIncident) Color() string
func (*CreateIncident) Configuration ¶
func (c *CreateIncident) Configuration() []configuration.Field
func (*CreateIncident) Description ¶
func (c *CreateIncident) Description() string
func (*CreateIncident) Documentation ¶
func (c *CreateIncident) Documentation() string
func (*CreateIncident) ExampleOutput ¶
func (c *CreateIncident) ExampleOutput() map[string]any
func (*CreateIncident) Execute ¶
func (c *CreateIncident) Execute(ctx core.ExecutionContext) error
func (*CreateIncident) HandleAction ¶
func (c *CreateIncident) HandleAction(ctx core.ActionContext) error
func (*CreateIncident) HandleWebhook ¶
func (c *CreateIncident) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
func (*CreateIncident) Icon ¶
func (c *CreateIncident) Icon() string
func (*CreateIncident) Label ¶
func (c *CreateIncident) Label() string
func (*CreateIncident) Name ¶
func (c *CreateIncident) Name() string
func (*CreateIncident) OutputChannels ¶
func (c *CreateIncident) OutputChannels(configuration any) []core.OutputChannel
func (*CreateIncident) ProcessQueueItem ¶
func (c *CreateIncident) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*CreateIncident) Setup ¶
func (c *CreateIncident) Setup(ctx core.SetupContext) error
type CreateIncidentData ¶
type CreateIncidentData struct {
Type string `json:"type"`
Attributes CreateIncidentAttributes `json:"attributes"`
}
type CreateIncidentRequest ¶
type CreateIncidentRequest struct {
Data CreateIncidentData `json:"data"`
}
CreateIncidentRequest represents the request to create an incident
type CreateIncidentSpec ¶
type CreateWebhookEndpointData ¶
type CreateWebhookEndpointData struct {
Type string `json:"type"`
Attributes CreateWebhookEndpointAttributes `json:"attributes"`
}
type CreateWebhookEndpointRequest ¶
type CreateWebhookEndpointRequest struct {
Data CreateWebhookEndpointData `json:"data"`
}
type Incident ¶
type Incident struct {
ID string `json:"id"`
Title string `json:"title"`
Summary string `json:"summary"`
Status string `json:"status"`
Severity string `json:"severity"`
StartedAt string `json:"started_at"`
ResolvedAt string `json:"resolved_at"`
MitigatedAt string `json:"mitigated_at"`
URL string `json:"url"`
}
Incident represents a Rootly incident
type IncidentAttributes ¶
type IncidentData ¶
type IncidentData struct {
ID string `json:"id"`
Type string `json:"type"`
Attributes IncidentAttributes `json:"attributes"`
}
type IncidentResponse ¶
type IncidentResponse struct {
Data IncidentData `json:"data"`
}
type IncidentsResponse ¶
type IncidentsResponse struct {
Data []IncidentData `json:"data"`
}
type NodeMetadata ¶
type NodeMetadata struct {
Service *Service `json:"service,omitempty"`
}
NodeMetadata contains metadata stored on trigger and component nodes
type OnIncident ¶
type OnIncident struct{}
func (*OnIncident) Actions ¶
func (t *OnIncident) Actions() []core.Action
func (*OnIncident) Cleanup ¶ added in v0.7.0
func (t *OnIncident) Cleanup(ctx core.TriggerContext) error
func (*OnIncident) Color ¶
func (t *OnIncident) Color() string
func (*OnIncident) Configuration ¶
func (t *OnIncident) Configuration() []configuration.Field
func (*OnIncident) Description ¶
func (t *OnIncident) Description() string
func (*OnIncident) Documentation ¶
func (t *OnIncident) Documentation() string
func (*OnIncident) ExampleData ¶
func (t *OnIncident) ExampleData() map[string]any
func (*OnIncident) HandleAction ¶
func (t *OnIncident) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
func (*OnIncident) HandleWebhook ¶
func (t *OnIncident) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
func (*OnIncident) Icon ¶
func (t *OnIncident) Icon() string
func (*OnIncident) Label ¶
func (t *OnIncident) Label() string
func (*OnIncident) Name ¶
func (t *OnIncident) Name() string
func (*OnIncident) Setup ¶
func (t *OnIncident) Setup(ctx core.TriggerContext) error
type OnIncidentConfiguration ¶
type OnIncidentConfiguration struct {
Events []string `json:"events"`
}
type Rootly ¶
type Rootly struct{}
func (*Rootly) Components ¶
func (*Rootly) Configuration ¶
func (r *Rootly) Configuration() []configuration.Field
func (*Rootly) Description ¶
func (*Rootly) HandleAction ¶
func (r *Rootly) HandleAction(ctx core.IntegrationActionContext) error
func (*Rootly) HandleRequest ¶
func (r *Rootly) HandleRequest(ctx core.HTTPRequestContext)
func (*Rootly) Instructions ¶
func (*Rootly) ListResources ¶
func (r *Rootly) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
type RootlyWebhookHandler ¶ added in v0.7.0
type RootlyWebhookHandler struct{}
func (*RootlyWebhookHandler) Cleanup ¶ added in v0.7.0
func (h *RootlyWebhookHandler) Cleanup(ctx core.WebhookHandlerContext) error
func (*RootlyWebhookHandler) CompareConfig ¶ added in v0.7.0
func (h *RootlyWebhookHandler) CompareConfig(a, b any) (bool, error)
func (*RootlyWebhookHandler) Setup ¶ added in v0.7.0
func (h *RootlyWebhookHandler) Setup(ctx core.WebhookHandlerContext) (any, error)
type Service ¶
type Service struct {
ID string `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
Description string `json:"description"`
}
Service represents a Rootly service
type ServiceAttributes ¶
type ServiceData ¶
type ServiceData struct {
ID string `json:"id"`
Type string `json:"type"`
Attributes ServiceAttributes `json:"attributes"`
}
type ServiceResponse ¶
type ServiceResponse struct {
Data ServiceData `json:"data"`
}
ServiceResponse represents the JSON:API response for a service
type ServicesResponse ¶
type ServicesResponse struct {
Data []ServiceData `json:"data"`
}
ServicesResponse represents the JSON:API response for listing services
type SeveritiesResponse ¶
type SeveritiesResponse struct {
Data []SeverityData `json:"data"`
}
type Severity ¶
type Severity struct {
ID string `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
Description string `json:"description"`
Severity string `json:"severity"`
}
Severity represents a Rootly severity level
type SeverityAttributes ¶
type SeverityData ¶
type SeverityData struct {
ID string `json:"id"`
Type string `json:"type"`
Attributes SeverityAttributes `json:"attributes"`
}
type WebhookConfiguration ¶
type WebhookConfiguration struct {
Events []string `json:"events"`
}
type WebhookEndpoint ¶
type WebhookEndpoint struct {
ID string `json:"id"`
URL string `json:"url"`
Secret string `json:"secret"`
}
WebhookEndpoint represents a Rootly webhook endpoint
type WebhookEndpointData ¶
type WebhookEndpointData struct {
ID string `json:"id"`
Type string `json:"type"`
Attributes WebhookEndpointAttributes `json:"attributes"`
}
type WebhookEndpointResponse ¶
type WebhookEndpointResponse struct {
Data WebhookEndpointData `json:"data"`
}
type WebhookEvent ¶
type WebhookEvent struct {
ID string `json:"id"`
Type string `json:"type"`
IssuedAt string `json:"issued_at"`
}
WebhookEvent represents the event metadata in a Rootly webhook
type WebhookMetadata ¶
type WebhookMetadata struct {
EndpointID string `json:"endpointId"`
}
type WebhookPayload ¶
type WebhookPayload struct {
Event WebhookEvent `json:"event"`
Data map[string]any `json:"data"`
}
WebhookPayload represents the Rootly webhook payload
Click to show internal directories.
Click to hide internal directories.