rootly

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const BaseURL = "https://api.rootly.com/v1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Token   string
	BaseURL string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(http core.HTTPContext, ctx core.IntegrationContext) (*Client, error)

func (*Client) CreateIncident

func (c *Client) CreateIncident(title, summary, severity string) (*Incident, error)

func (*Client) CreateWebhookEndpoint

func (c *Client) CreateWebhookEndpoint(url string, events []string) (*WebhookEndpoint, error)

func (*Client) DeleteWebhookEndpoint

func (c *Client) DeleteWebhookEndpoint(id string) error

func (*Client) GetIncident

func (c *Client) GetIncident(id string) (*Incident, error)

func (*Client) GetService

func (c *Client) GetService(id string) (*Service, error)

func (*Client) ListIncidents

func (c *Client) ListIncidents() ([]Incident, error)

func (*Client) ListServices

func (c *Client) ListServices() ([]Service, error)

func (*Client) ListSeverities

func (c *Client) ListSeverities() ([]Severity, error)

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 CreateIncidentAttributes

type CreateIncidentAttributes struct {
	Title    string `json:"title"`
	Summary  string `json:"summary,omitempty"`
	Severity string `json:"severity,omitempty"`
}

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 CreateIncidentSpec struct {
	Title    string `json:"title"`
	Summary  string `json:"summary"`
	Severity string `json:"severity"`
}

type CreateWebhookEndpointAttributes

type CreateWebhookEndpointAttributes struct {
	Name           string   `json:"name"`
	URL            string   `json:"url"`
	EventTypes     []string `json:"event_types"`
	Enabled        bool     `json:"enabled"`
	SigningEnabled bool     `json:"signing_enabled"`
}

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 IncidentAttributes struct {
	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"`
}

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 Metadata

type Metadata struct {
	Services []Service `json:"services"`
}

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) Actions

func (r *Rootly) Actions() []core.Action

func (*Rootly) Cleanup

func (r *Rootly) Cleanup(ctx core.IntegrationCleanupContext) error

func (*Rootly) Components

func (r *Rootly) Components() []core.Component

func (*Rootly) Configuration

func (r *Rootly) Configuration() []configuration.Field

func (*Rootly) Description

func (r *Rootly) Description() string

func (*Rootly) HandleAction

func (r *Rootly) HandleAction(ctx core.IntegrationActionContext) error

func (*Rootly) HandleRequest

func (r *Rootly) HandleRequest(ctx core.HTTPRequestContext)

func (*Rootly) Icon

func (r *Rootly) Icon() string

func (*Rootly) Instructions

func (r *Rootly) Instructions() string

func (*Rootly) Label

func (r *Rootly) Label() string

func (*Rootly) ListResources

func (r *Rootly) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)

func (*Rootly) Name

func (r *Rootly) Name() string

func (*Rootly) Sync

func (r *Rootly) Sync(ctx core.SyncContext) error

func (*Rootly) Triggers

func (r *Rootly) Triggers() []core.Trigger

type RootlyWebhookHandler added in v0.7.0

type RootlyWebhookHandler struct{}

func (*RootlyWebhookHandler) Cleanup added in v0.7.0

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

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 ServiceAttributes struct {
	Name        string `json:"name"`
	Slug        string `json:"slug"`
	Description string `json:"description"`
}

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 SeverityAttributes struct {
	Name        string `json:"name"`
	Slug        string `json:"slug"`
	Description string `json:"description"`
	Severity    string `json:"severity"`
}

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 WebhookEndpointAttributes

type WebhookEndpointAttributes struct {
	URL            string   `json:"url"`
	Secret         string   `json:"secret"`
	EventTypes     []string `json:"event_types"`
	Enabled        bool     `json:"enabled"`
	SigningEnabled bool     `json:"signing_enabled"`
}

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

Jump to

Keyboard shortcuts

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